Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common automatic update #36

Merged
merged 118 commits into from
Apr 29, 2024

Commits on Jan 18, 2024

  1. Set the user's passwd entry inside the container

    The reason for this is somewhat multi-faceted, but boils down to the
    fact that openssh does not consult the $HOME variable to find .ssh/*
    files but only relies to the home folder entry in /etc/passwd.
    
    So what might happen is the following scenario:
    1. The remote is ssh based: `origin  [email protected]:validatedpatterns/industrial-edge`
    2. The main Makefile invokes `git remote show origin` which triggers an ssh connection
    3. The ssh connection fails because ssh ignores the $HOME variable and instead relies on the home in `getent passwd`. Which is set to:
       ```
       fedora:*:1000:1000:fedora Cloud User:/home/fedora/industrial-edge:/bin/sh
       ```
    4. Newer podmans set the user's home folder automagically to the folder
       that is passed as current working directory (in our case we pass `-w
       $(pwd)`)
    
    Under these circumstances ssh connection will fail because git+ssh will
    look for ssh files in the current folder (aka entry in /etc/passwd):
    
            debug1: identity file /home/fedora/industrial-edge/.ssh/id_rsa type -1
            debug1: identity file /home/fedora/industrial-edge/.ssh/id_rsa-cert type -1
    
    Fix this by making sure we force an /etc/passwd entry for the user
    running podman that points to the $HOME directory (aka /pattern-home
    inside the container).
    mbaldessari committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    c6ab55e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #428 from mbaldessari/fix-ssh

    Set the user's passwd entry inside the container
    mbaldessari authored Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a77e700 View commit details
    Browse the repository at this point in the history
  3. Upgrade helm to v3.13.2

    This is the version we use in gitops-1.11 which is the new default
    mbaldessari committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    23969cc View commit details
    Browse the repository at this point in the history
  4. Merge pull request #430 from mbaldessari/fix-helm-version-ci

    Upgrade helm to v3.13.2
    mbaldessari authored Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a6d7dfc View commit details
    Browse the repository at this point in the history
  5. Drop old patch around null subkeys

    Now that we switched to gitops-1.11, the helm version is recent enough
    that we're not affected by the subkey null bug any longer.
    mbaldessari committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    e678328 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. Merge pull request #429 from mbaldessari/drop-unneeded-patches

    Drop old patch around null subkeys
    mbaldessari authored Jan 22, 2024
    Configuration menu
    Copy the full SHA
    350de51 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Do check for remote existance all the time

    At the time we disabled the `validate-origin` target when running from
    inside the container as it apparently caused issues for some folks.
    I think now that we run as the user inside the container, the chances of
    this not working are reduced, so let's reenable this.
    
    Tested as follows:
    
        ❯ ./pattern.sh make TARGET_ORIGIN=upstream validate-origin
        Checking repository:
          https://github.com/hybrid-cloud-patterns/multicloud-gitops - branch 'nonexisting': NOT FOUND
        make: *** [Makefile:12: validate-origin] Error 2
    
        ❯ ./pattern.sh make TARGET_ORIGIN=upstream validate-origin
        Checking repository:
          https://github.com/hybrid-cloud-patterns/multicloud-gitops - branch 'main': OK
    
        ❯ ./pattern.sh make validate-origin
        Checking repository:
          https://github.com/mbaldessari/multicloud-gitops.git - branch 'main': OK
    
        ❯ ./pattern.sh make  validate-origin
        Checking repository:
          https://github.com/mbaldessari/multicloud-gitops.git - branch 'nonexisting': NOT FOUND
        make: *** [Makefile:12: validate-origin] Error 2
    mbaldessari committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    aa72a78 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #431 from mbaldessari/validate-origin

    Validate origin inside podman as well
    mbaldessari authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    7d9e66b View commit details
    Browse the repository at this point in the history
  3. Run validate-prereq only when not in a container

    There is no point in testing the requirements when we use the container,
    as we guarantee that those exist in there.
    
    Tested as follows:
    
        ❯ make validate-prereq
        make -f common/Makefile validate-prereq
        make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        Checking prerequisites:
          Check for 'git helm oc ansible': OK
          Check for python-kubernetes: OK
          Check for kubernetes.core collection: OK
        make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        ❯ ./pattern.sh make  validate-prereq
        make -f common/Makefile validate-prereq
        make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        Skipping prerequisites check as we're running inside a container
        make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
    mbaldessari committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    05c51c1 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #432 from mbaldessari/validate-prereq

    Run validate-prereq only when not in a container
    mbaldessari authored Jan 23, 2024
    Configuration menu
    Copy the full SHA
    b27dbfd View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Bump dorny/paths-filter from 2 to 3

    Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 2 to 3.
    - [Release notes](https://github.com/dorny/paths-filter/releases)
    - [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
    - [Commits](dorny/paths-filter@v2...v3)
    
    ---
    updated-dependencies:
    - dependency-name: dorny/paths-filter
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Jan 29, 2024
    Configuration menu
    Copy the full SHA
    b4eb4d9 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Merge pull request #433 from validatedpatterns/dependabot/github_acti…

    …ons/dorny/paths-filter-3
    
    Bump dorny/paths-filter from 2 to 3
    mbaldessari authored Jan 30, 2024
    Configuration menu
    Copy the full SHA
    415f681 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Add support for parsing secrets into intermediate structure and creating

    k8s secret objects
    
    Ensure only push_secrets runs from vault_utils
    
    Update makefile - remove extra targets and make fix none
    
    Revert version bump as we only add fields
    
    Conditionalize check change output
    
    Start module to load parsed secrets into vault
    
    New machinery for vault secrets loading
    
    Make the linters pass again
    
    Inject policies
    
    Add some more code to test readiness to load
    
    Correct typo
    
    Add vault_hub
    
    Add vaultMount
    
    Rename new modules to v2
    
    Update inject_field method
    
    Correct field typo
    
    Temporarily print command
    
    Add more logic
    
    Hopefully fix secret loading issue with counter
    
    Count per secret
    
    Pick stuff out of secret that we need
    
    Fix lint issue
    
    Refactor tests to use fixture constants
    
    Correctly spell exclusion for ansible-lint
    
    Provide a target to exercise legacy code path
    
    Add error exists for missing args and update docs
    
    Reverse test for override
    
    Also process base64 for generated secrets
    
    Be more explicit about what we load
    
    Test framework for loading parsed_secret data
    
    Fix linting errors
    
    Finish test suite
    
    Last linter stuff
    
    Change schema; code and tests to follow
    
    Add target_namespaces phase 1
    
    more passing, but some still fail
    
    Passing again
    
    All pass
    
    Check the correct variable in golang-external-secrets chart
    
    Update YAML parsing to do decodes right
    
    Add tests and tighten up code for retrieving block yaml quotes
    
    Add test for kubernetes secret object and block yaml
    Martin Jackson committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    4023800 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. Merge pull request #408 from mhjacks/parse_secrets

    Add support for kubernetes backend for ESO
    mhjacks authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    4d0774c View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. Upgrade ESO to v0.9.12

    mbaldessari committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    672da04 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #434 from mbaldessari/eso-0.9.12

    Upgrade ESO to v0.9.12
    mbaldessari authored Feb 9, 2024
    Configuration menu
    Copy the full SHA
    6029db6 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Update vault image to 1.15.5-ubi

    This fixes a few CVEs.
    
    Tested on MCG.
    mbaldessari committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    8157484 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #435 from mbaldessari/vault-update

    Update vault image to 1.15.5-ubi
    mbaldessari authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    d617257 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Use gitops-1.11 in acm as well

    This is mainly for consistency reasons as the value is taken from
    main.gitops anyways.
    mbaldessari committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    dde1055 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #436 from mbaldessari/new-acm

    Use gitops-1.11 in acm as well
    mbaldessari authored Feb 15, 2024
    Configuration menu
    Copy the full SHA
    7877339 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Small gitops channel cleanups

    Mainly for consistency reasons. gitops-1.11 is already the default
    mbaldessari committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    947dd22 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #437 from mbaldessari/gitops-1.11-support2

    Small gitops channel cleanups
    mbaldessari authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    60332c6 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    9614757 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #438 from mbaldessari/argover

    Upgrade namespaced argocd version to v1beta1
    mbaldessari authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    e8b2ec6 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Stop using OpenShiftControllerManager lookups

    When applying the policy to install the cluster-wide argo on regional
    clusters, we do some lookups() on the regional cluster in order to
    pass the version values, domain names, etc.
    
    To get the cluster version we were using the OpenShiftControllerManager
    which is problematic because it does not exist on hyper-shift clusters.
    
    Let's switch to use the ClusterVersion.status.history[0].version entry.
    
    The only smaller caveat is that due to limitations in go templates +
    sprig functions, we cannot really take the last version only when the
    state is "Completed", but we simply take the last version.
    
    This means that during a cluster upgrade on a regional cluster, we will
    include values of the version the cluster is upgrading to, which is
    less than ideal, but it should eventually converge in any case.
    
    For reference the function that guarantees that the ordering of the
    history status in ClusterVersion is preserved is here:
    https://pkg.go.dev/github.com/openshift/api/config/v1#ClusterVersionStatus
    
    Tested on Lester's cluster and on a local cluster of mine.
    
    Co-Authored-By: Lester Claudio <[email protected]>
    mbaldessari and claudiol committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    f0b3d01 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #439 from mbaldessari/fix-acm-hypershift

    Stop using OpenShiftControllerManager lookups
    mbaldessari authored Feb 22, 2024
    Configuration menu
    Copy the full SHA
    a1cd985 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Bump azure/setup-helm from 3 to 4

    Bumps [azure/setup-helm](https://github.com/azure/setup-helm) from 3 to 4.
    - [Release notes](https://github.com/azure/setup-helm/releases)
    - [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md)
    - [Commits](Azure/setup-helm@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: azure/setup-helm
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored Mar 4, 2024
    Configuration menu
    Copy the full SHA
    bd9efba View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Merge pull request #440 from validatedpatterns/dependabot/github_acti…

    …ons/azure/setup-helm-4
    
    Bump azure/setup-helm from 3 to 4
    mbaldessari authored Mar 11, 2024
    Configuration menu
    Copy the full SHA
    acf7c70 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Upgrade ESO to v0.9.13

    mbaldessari committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    48b2e11 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #442 from mbaldessari/eso-0.9.13

    Upgrade ESO to v0.9.13
    mbaldessari authored Mar 21, 2024
    Configuration menu
    Copy the full SHA
    846893d View commit details
    Browse the repository at this point in the history
  3. Upgrade vault to 1.15.6

    mbaldessari committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    24c53e1 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #443 from mbaldessari/vault-1.15.6

    Upgrade vault to 1.15.6
    mbaldessari authored Mar 21, 2024
    Configuration menu
    Copy the full SHA
    1d3e74e View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. Bind mount /etc/pki in the wrapper

    This is useful whenever a custom CA is installed on the system and is
    needed to connect to a remote cluster.
    mbaldessari committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    399370f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #444 from mbaldessari/pki-mount

    Bind mount /etc/pki in the wrapper
    mbaldessari authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    7b12604 View commit details
    Browse the repository at this point in the history
  3. Properly error out in preview-all when we cannot connect to the cluster

    Before:
    
        $ ./pattern.sh make preview-all
        make -f common/Makefile preview-all
        make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        error: Missing or incomplete configuration info.  Please point to an existing, complete config file:
    
          1. Via the command-line flag --kubeconfig
          2. Via the KUBECONFIG environment variable
          3. In your home directory as ~/.kube/config
    
        To view or setup config directly use the 'config' command.
        error: Missing or incomplete configuration info.  Please point to an existing, complete config file:
    
          1. Via the command-line flag --kubeconfig
          2. Via the KUBECONFIG environment variable
          3. In your home directory as ~/.kube/config
    
        To view or setup config directly use the 'config' command.
    
        ...This goes on for many more iterations...
    
    After:
    
        $ ./pattern.sh make preview-all
        make -f common/Makefile preview-all
        make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        Could not access the cluster:
        error: Missing or incomplete configuration info.  Please point to an existing, complete config file:
    
          1. Via the command-line flag --kubeconfig
          2. Via the KUBECONFIG environment variable
          3. In your home directory as ~/.kube/config
    
        To view or setup config directly use the 'config' command.
        make[1]: *** [common/Makefile:59: preview-all] Error 1
        make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        make: *** [Makefile:12: preview-all] Error 2
    mbaldessari committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    a88f040 View commit details
    Browse the repository at this point in the history
  4. Only include values files if they do exist in preview.sh

    This is because in helm we use "ignoreMissingValueFiles: true". I.e. we
    just ignore non existing value files. Let's do the same for the
    preview.sh script.
    
    Before:
    
        ❯ make preview-all
        make -f common/Makefile preview-all
        make[1]: Entering directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        Error: open /home/michele/Engineering/cloud-patterns/multicloud-gitops/overrides/values-None.yaml: no such file or directory
        Error: open /home/michele/Engineering/cloud-patterns/multicloud-gitops/overrides/values-None.yaml: no such file or directory
        Error: open /home/michele/Engineering/cloud-patterns/multicloud-gitops/overrides/values-None.yaml: no such file or directory
        Error: open /home/michele/Engineering/cloud-patterns/multicloud-gitops/overrides/values-None.yaml: no such file or directory
        Error: open /home/michele/Engineering/cloud-patterns/multicloud-gitops/overrides/values-None.yaml: no such file or directory
        common/scripts/preview.sh: eval: line 79: unexpected EOF while looking for matching `"'
        common/scripts/preview.sh: eval: line 79: unexpected EOF while looking for matching `"'
        common/scripts/preview.sh: eval: line 79: unexpected EOF while looking for matching `"'
        make[1]: *** [common/Makefile:59: preview-all] Error 2
        make[1]: Leaving directory '/home/michele/Engineering/cloud-patterns/multicloud-gitops'
        make: *** [Makefile:12: preview-all] Error 2
    
    After:
    
        ❯ make preview-all > /dev/null ; echo $?
        0
    mbaldessari committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ffd421b View commit details
    Browse the repository at this point in the history
  5. Merge pull request #445 from mbaldessari/proper-error-out

    Properly error out in preview-all when we cannot connect to the cluster
    mhjacks authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    f46fb17 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #446 from mbaldessari/ignore-preview-non-existing-…

    …value-files
    
    Only include values files if they do exist in preview.sh
    mhjacks authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ce0c710 View commit details
    Browse the repository at this point in the history
  7. Do not error out in preview when kustomize: true

    When `kustomize: true` simply take the path and call `kustomize build
    <path>`. In any other case keep using helm for templating.
    
    Before:
        ...
        + common/scripts/preview.sh hub compliance-operator https://github.com/mbaldessari/multicloud-gitops.git preview-fixes
        Error: Chart.yaml file is missing
    
    After:
        ...
        + common/scripts/preview.sh hub compliance-operator https://github.com/mbaldessari/multicloud-gitops.git preview-fixes
        apiVersion: console.openshift.io/v1
        kind: ConsoleNotification
        metadata:
          name: purpose-banner
        spec:
          backgroundColor: '#ff0000'
          color: '#fff'
          location: BannerTop
          text: HUBOPS
    mbaldessari committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e6241d9 View commit details
    Browse the repository at this point in the history
  8. Also pass EXTRA_PLAYBOOK_OPTS environment setting

    Martin Jackson committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    8dee997 View commit details
    Browse the repository at this point in the history
  9. Merge pull request #448 from mhjacks/main

    Also pass EXTRA_PLAYBOOK_OPTS environment setting
    mbaldessari authored Mar 25, 2024
    Configuration menu
    Copy the full SHA
    879a300 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. Use oc kustomize

    That is what we have inside the utility container, so let's just rely on
    that
    mbaldessari committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    dafd44b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a2c3a2e View commit details
    Browse the repository at this point in the history
  3. Merge pull request #447 from mbaldessari/kustomize-preview

    Do not error out in preview when kustomize: true
    mhjacks authored Mar 26, 2024
    Configuration menu
    Copy the full SHA
    5376d18 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. Add .global.secretStore.backend in the clustergroup schema

    It is currently not there even though we mention it in the values files.
    mbaldessari committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    c634054 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2024

  1. Fix check for secretStore.backend

    The default function in helm is somewhat unintuitive:
    
        ❯ cat templates/test.yaml
        metadata:
          name: foo
        {{- if eq .Values.global.secretStore.backend "vault" | default "vault" }}
          label: vault_is_here
        {{- else }}
          labe: not_here
        {{- end }}
    
        ❯ helm template --set global.secretStore.backend=foo .
        metadata:
          name: foo
          label: vault_is_here
    
    No matter the value of .Values.global.secretStore.backend, the default
    branch takes over. So let's change this to something that is correct
    albeit somewhat less readable
    
    Tested as follows:
    
        # global.secretStore.backend unset
        ❯ helm template --set global.secretStore.backend=null common/clustergroup |grep unsealjob.yaml |wc -l
        1
    
        # global.secretStore.backend set to 'vault'
        ❯ helm template --set global.secretStore.backend=vault common/clustergroup |grep unsealjob.yaml |wc -l
        1
    
        # global.secretStore.backend set to 'kubernetes'
        ❯ helm template --set global.secretStore.backend=kubernetes common/clustergroup |grep unsealjob.yaml |wc -l
        0
    
        ❯ helm template --set global.secretStore.backend=vault golang-external-secrets |grep -- -backend
          name: vault-backend
    
        ❯ helm template --set global.secretStore.backend=null golang-external-secrets |grep -- -backend
          name: vault-backend
    
        ❯ helm template --set global.secretStore.backend=kubernetes golang-external-secrets |grep -- -backend
          name: kubernetes-backend
    mbaldessari committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    5280f2c View commit details
    Browse the repository at this point in the history
  2. Merge pull request #451 from mbaldessari/clustergroup-schema-secretstore

    Add .global.secretStore.backend in the clustergroup schema
    mbaldessari authored Mar 28, 2024
    Configuration menu
    Copy the full SHA
    08cd952 View commit details
    Browse the repository at this point in the history
  3. Introduce a generic parameter override via the EXTRA_ARGS env variable

    This way a user can decide to modify the podman command line. For
    example to inject additional useful extra variables in the container.
    
    For example:
    
      export EXTRA_ARGS="-e OCP_DOMAIN"
      ./pattern-util.sh make preview-all.sh
    mbaldessari committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    8869f11 View commit details
    Browse the repository at this point in the history
  4. Allow overriding the oc lookups in preview.sh

    This allows us to inject values to ease testing.
    
    Tested as follows:
    
        $ unset OCP_DOMAIN OCP_PLATFORM OCP_VERSION
        $ export EXTRA_ARGS="-e OCP_DOMAIN -e OCP_PLATFORM -e OCP_VERSION"
        $ ./pattern.sh make preview-all &> /tmp/1
        $ export OCP_DOMAIN=adifferentdomain.foo
        $ ./pattern.sh make preview-all &> /tmp/2
        # Templates have effectively changed the domain
        $ diff -u /tmp/1 /tmp/2 | wc -l
        73
    
        $ unset OCP_DOMAIN
    
        # Without the domain change the templates are unchanged
        $ ./pattern.sh make preview-all &> /tmp/3
        $ diff -u /tmp/1 /tmp/3 | wc -l
        0
    
    Note: When using pattern.sh you will need to inject the env variables in
    the container via `export EXTRA_ARGS="-e OCP_PLATFORM -e OCP_VERSION -e OCP_DOMAIN"`
    mbaldessari committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    ba583f5 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2024

  1. Always include values-global.yaml and values-.yaml

    Those are the starting points for setting the values. Without this, for
    example, the rendering of common/acm on the hub is basically empty
    because clusterGroup.isHubCluster won't be true.
    mbaldessari committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    66d426d View commit details
    Browse the repository at this point in the history
  2. Merge pull request #453 from mbaldessari/preview-fixes2

    Some more fixes for preview
    mbaldessari authored Mar 29, 2024
    Configuration menu
    Copy the full SHA
    09da2c2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4de8385 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #454 from mbaldessari/preview-fixes3

    Add help and message clarifying that preview has certain limits
    mbaldessari authored Mar 29, 2024
    Configuration menu
    Copy the full SHA
    60dc2cc View commit details
    Browse the repository at this point in the history
  5. Add clustergroup support to preview target

    With this the preview all should be a lot more complete and useful.
    
    Closes: validatedpatterns/common#452
    mbaldessari committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    d7e913b View commit details
    Browse the repository at this point in the history
  6. Merge pull request #455 from mbaldessari/preview-clustergroup

    Add clustergroup support to preview target
    mbaldessari authored Mar 29, 2024
    Configuration menu
    Copy the full SHA
    8123aa8 View commit details
    Browse the repository at this point in the history
  7. Fix preview when the application's index name is not the same as the …

    …name attribute
    
    This covers the following case:
    foobar:
      name: foo
      namespace: foo
      project: foo
      path: charts/all/foo
    
    The preview.sh script is passed the name attribute of the application
    `foo`. So now we first find the key which corresponds to the attribute
    name `foo` and then use that when looking up the other attributes like
    path, etc.
    
    Closes: validatedpatterns/multicloud-gitops#351
    mbaldessari committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    dd25da0 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #456 from mbaldessari/preview-fixes4

    Fix preview when the application's index name is not the same as the name attribute
    mbaldessari authored Mar 29, 2024
    Configuration menu
    Copy the full SHA
    cc1cf4f View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Force strings in extraParametersNested

    Otherwise if we pass a boolean in the extraParametersNested we will get:
    
      spec.source.helm.parameters[10].value: Invalid value: "boolean":
        spec.source.helm.parameters[10].value in body must be of type string:
        "boolean"
    mbaldessari committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    4ec9d3e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #458 from mbaldessari/extra-nested

    Force strings in extraParametersNested
    mbaldessari authored Apr 8, 2024
    Configuration menu
    Copy the full SHA
    c236989 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. In ACM policies do not use $ARGOCD_APP_SOURCE_* variables

    The reason for this is the following:
    When changing the repo on the hub (by editing the pattern), the
    expectation is that the repo change will replicate from the hub to the
    spokes managed by ACM.
    
    Today this is very unlikely to happen because changing the repo on the
    hub will not change the policy and so ACM will not reapply it on the
    spokes. (I believe there is like a daily repush that happens even when
    the policy has not changed, but that is way too slow to be relied upon).
    
    By using the actual variable the policy will actually change, ACM will
    notice this and push the change on the spokes.
    
    Found while testing disconnected mode.
    
    I am not replacing them everywhere because I am not sure yet if there are
    additional semantics in common/clustergroup that I am unaware of.
    mbaldessari committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    cb77e12 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #460 from mbaldessari/repo-on-spokes

    In ACM policies do not use $ARGOCD_APP_SOURCE_* variables
    mbaldessari authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    f674496 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. Add support for custom CAs

    This feature relies on the VP operator version >= 0.0.44 in order to
    work.
    
    The way to enable this is to add a feature flag called 'initcontainers'
    in the VP operator. Once this is enabled, we will detect this and take
    over the all ArgoCD instances' definition and add initContainers which
    will inject the CAs contained in the trusted-bundle-ca configmap and
    also the openshift internal CA.
    
    Testing protocol:
    
      1. (Operator 0.0.44) MCG deployment with experimentalCapabilities set
         to '' and using a github main upstream (i.e. without this PR)
    
      2. (Operator 0.0.44) MCG deployment with experimentalCapabilities set
         to 'initcontainers' and using a github diconnected common upstream
         (requiring a custom CA) (i.e. with this PR)
    
      3. (Operator 0.0.44) MCG deployment with experimentalCapabilities set
         to '' and using a github diconnected common upstream. (same as 1.2)
         and then set the initcontainer capability on the hub. Checked that
         the .global.experimentalCapabilities property replicated from hub to
         spoke and the initcontainers have been generated correctly
    
      3.1 (Operator 0.0.44) Change the repo from github to an internal one
          that does need the custom ca to work
    
      4. (Operator 0.0.43) Test an old operator with a newer common that
          contains this very branch
    
    Note: Once we will make initcontainers a default feature of the operator
    we will remove the ifs added in this PR and just make it the defaut
    behaviour.
    mbaldessari committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    8dbb5ff View commit details
    Browse the repository at this point in the history
  2. Update tests

    mbaldessari committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    4e75d71 View commit details
    Browse the repository at this point in the history
  3. Support for issue #459

    The changes here support the "Support for merging of namespaces, projects,
    subscriptions and application in overrides/values-common.yaml #459" issue that was opened by
    Northrop Grumman
    
    Files that were changed are:
    clustergroup/templates/_helpers.tpl
    clustergroup/templates/core/namespaces.yaml
    clustergroup/templates/core/operatorgroup.yaml
    clustergroup/templates/plumbing/projects.yaml
    clustergroup/values.schema.json
    examples/values-example.yaml
    
    The idea is that if you define the projects section, or the namespaces section, in two different
    values files using a map construct we will be able to merge both definition of projects into
    the final rendering of the manifests.
    
    The new structure for projects is as follows:
    ```
    clusterGroup:
      ...
      projects:
        project1:
    ```
    
    The new structure for namespaces is as follows:
    ```
    clusterGroup:
      ...
      namespaces:
        namespace1:
        open-cluster-management:
          labels:
            openshift.io/node-selector: ""
            kubernetes.io/os: linux
          annotations:
            openshift.io/cluster-monitoring: "true"
            owner: "namespace owner"
    ```
    The user would need to choose to use a list or a hashmap object.  The user would not be able to use a
    mix of hashes and list to describe projects or namespaces.
    claudiol committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    9b96555 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. Drop unused piece of schema json

    Not entirely sure how this slipped in.
    
    Reported-by: Martin Jackson <[email protected]>
    mbaldessari committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    7128a3f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #464 from mbaldessari/cleanup

    Drop unused piece of schema json
    mbaldessari authored Apr 12, 2024
    Configuration menu
    Copy the full SHA
    6eb410a View commit details
    Browse the repository at this point in the history
  3. Merge pull request #461 from mbaldessari/disconnected

    Custom CA support
    mhjacks authored Apr 12, 2024
    Configuration menu
    Copy the full SHA
    056c315 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2024

  1. Configuration menu
    Copy the full SHA
    36b2cb6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #465 from mbaldessari/log-cleanup

    Small cleanup to remove unneeded log messages
    mbaldessari authored Apr 14, 2024
    Configuration menu
    Copy the full SHA
    f5edc5b View commit details
    Browse the repository at this point in the history
  3. Support for cluster-wide proxy

    If the clusterwide proxy object is configured, let's support it when
    we clone the git repos for the imperative framework.
    mbaldessari committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    247ee65 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #466 from mbaldessari/cluster-proxy

    Support for cluster-wide proxy
    mbaldessari authored Apr 14, 2024
    Configuration menu
    Copy the full SHA
    e6564a2 View commit details
    Browse the repository at this point in the history
  5. Update ESO to 0.9.14

    mbaldessari committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    86164c6 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #467 from mbaldessari/eso-0.9.14

    Update ESO to 0.9.14
    mbaldessari authored Apr 14, 2024
    Configuration menu
    Copy the full SHA
    d5ba36a View commit details
    Browse the repository at this point in the history
  7. Merge pull request #462 from claudiol/helm-merge-values

    feat: Support for issue #459
    mbaldessari authored Apr 14, 2024
    Configuration menu
    Copy the full SHA
    4d2b43c View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. Configuration menu
    Copy the full SHA
    f4bed3a View commit details
    Browse the repository at this point in the history
  2. Merge pull request #468 from mbaldessari/crd-update

    Update CRD from operator v0.0.44
    mbaldessari authored Apr 16, 2024
    Configuration menu
    Copy the full SHA
    a2e86c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2319eea View commit details
    Browse the repository at this point in the history
  4. Merge pull request #469 from mbaldessari/expose-expcap

    Expose main.experimentalCapabilities in operator-install
    mbaldessari authored Apr 16, 2024
    Configuration menu
    Copy the full SHA
    a0cad8d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2ffb55f View commit details
    Browse the repository at this point in the history
  6. Merge pull request #470 from mbaldessari/clustergroup-0.8.3

    Release clustergroup v0.8.3
    mbaldessari authored Apr 16, 2024
    Configuration menu
    Copy the full SHA
    55db211 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Support remote repoURL when previewing templates

    This allows us to have a remote repoURL + path kustomize combo and show
    the resulting templates in `make preview`.
    
    Tested with:
    
        web-terminal:
          name: web-terminal
          namespace: hello-world
          project: hub
          kustomize: true
          targetRevision: main
          repoURL: https://github.com/redhat-cop/gitops-catalog
          path: web-terminal/aggregate/overlays/default
    
    Closes: validatedpatterns/multicloud-gitops#356
    mbaldessari committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    aee5158 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #473 from mbaldessari/preview-fixes5

    Support remote repoURL when previewing templates
    mbaldessari authored Apr 17, 2024
    Configuration menu
    Copy the full SHA
    23d35d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    890ac2e View commit details
    Browse the repository at this point in the history
  4. Namespace argocd.argoproj.io/managed-by label issue

    - Fixed issue in common/clustergroup/templates/_helpers.tpl to render correct label
    claudiol committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    e27624c View commit details
    Browse the repository at this point in the history
  5. Merge pull request #476 from claudiol/fix-namespace-issue

    Namespace argocd.argoproj.io/managed-by label issue
    claudiol authored Apr 17, 2024
    Configuration menu
    Copy the full SHA
    8855d6e View commit details
    Browse the repository at this point in the history
  6. Fixed indenting and duplicate entries in application-policies.yaml

    This corrects Argo error:
    Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): `helm template . --name-template acm --namespace open-cluster-management --kube-version 1.25 --set global.privateRepo=false --set global.experimentalCapabilities=initcontainers --set global.repoURL=https://github.myrepo.com/EnterpriseKubernetes/multicloud-gitops.git --set global.clusterDomain=mydomain.azure.us --set global.clusterPlatform=Azure --set global.hubClusterDomain=mydomain.azure.us --set global.localClusterDomain=mydomain.azure.us --set global.targetRevision=prod --set global.namespace=open-cluster-management --set global.pattern=ekho --set global.clusterVersion=4.12 --values <path to cached source>/values-global.yaml --values <path to cached source>/values-hub.yaml <api versions removed> --include-crds` failed exit status 1: Error: YAML parse error on acm/templates/policies/application-policies.yaml: error converting YAML to JSON: yaml: line 50: did not find expected key Use --debug flag to render out invalid YAML
    
    Also corrects mapping error warning on make preview-acm
    wadebee authored Apr 17, 2024
    Configuration menu
    Copy the full SHA
    13ee338 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Add main.experimentalCapabilities to values.schema.json

    This way it can be set straight from a values-*.yaml file
    
    Tested on MCG.
    mbaldessari committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    50b2f55 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #478 from mbaldessari/fix-schema-capabilities

    Add main.experimentalCapabilities to values.schema.json
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    3d38ce2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    866cd99 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #479 from mbaldessari/v0.8.4

    ClusterGroup v0.8.4
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    2d36b61 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #474 from wadebee/feature/preview-%

    Moved CLUSTERGROUP declaration to restore make preview-% functionality
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    37c93b0 View commit details
    Browse the repository at this point in the history
  6. Move the CLUSTERGROUP env variable for previews inside its section

    This way the code is a bit less confusing and it's more obvious
    when/where CLUSTERGROUP is used.
    
    make preview-% still keeps working as usual and you can override things
    via `make CLUSTERGROUP=group-one preview-hello-world`
    
    Gotta love Makefile's idiosyncrasies around per-target variables
    mbaldessari committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    739a63b View commit details
    Browse the repository at this point in the history
  7. Merge pull request #481 from mbaldessari/make-tweak

    Small makefile tweak
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    93fccbd View commit details
    Browse the repository at this point in the history
  8. Merge pull request #477 from wadebee/acm-app-policies-indenting-fix

    bug: Fixes indenting and duplicate entries in application-policies.yaml
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    e8c9016 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    65eab76 View commit details
    Browse the repository at this point in the history
  10. Drop old comments

    mbaldessari committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    444016b View commit details
    Browse the repository at this point in the history
  11. bug: Fix to generate OperatorGroup definition when namespaces definit…

    …ion has labels
    
    - Added condition to check if operatorGroup key exists  {{- if or $v.operatorGroup (not (hasKey $v "operatorGroup")) }}
    - Default behavior is that we generate an OperatorGroup for a Namespace definition.
    claudiol committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    0283fc2 View commit details
    Browse the repository at this point in the history
  12. Merge pull request #483 from mbaldessari/tests

    Small cleanups
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    2a8870e View commit details
    Browse the repository at this point in the history
  13. Merge pull request #484 from claudiol/fix-for-operator-group

    bug: Fix to generate OperatorGroup definition when namespaces definition has labels
    claudiol authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    82d3e26 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c35d124 View commit details
    Browse the repository at this point in the history
  15. Merge pull request #485 from mbaldessari/pki-missing-folder

    Try fallbacks for /etc/pki when it does not exist
    mbaldessari authored Apr 18, 2024
    Configuration menu
    Copy the full SHA
    6b5118f View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Fix for multiple OperatorGroup rendering

    - Fixed issue with rendering multiple OperatorGroup.  Added the beginning (---) to signal document start.
    - Updated the applications.yaml to include beginning (---) to signal document start.
    claudiol committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    ae12274 View commit details
    Browse the repository at this point in the history
  2. Updated tests for CI

    claudiol committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    6ed1a05 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #486 from claudiol/helper-operatorgroup-fix

    helper operatorgroup fix
    claudiol authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    e32c5fe View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Update ESO to 0.9.16

    mbaldessari committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    74a1f10 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #487 from mbaldessari/eso-0.9.16

    Update ESO to 0.9.16
    mbaldessari authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    0ebc916 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f34fd78 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #488 from mbaldessari/vault-helm-v0.28.0

    Updated vault-helm to v0.28.0
    mbaldessari authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    7f22447 View commit details
    Browse the repository at this point in the history
  5. Use --recurse-submodules when cloning

    In case a git repo has some things split over submodules, let's clone
    those too.
    
    The version of git in the imperative image is currently:
    sh-5.1# git version
    git version 2.39.3
    
    Tested with:
    sh-5.1# git clone --recurse-submodules --single-branch --branch main --depth 1 -- "https://github.com/validatedpatterns/multicloud-gitops" /tmp/
    Cloning into '/tmp'...
    remote: Enumerating objects: 426, done.
    remote: Counting objects: 100% (426/426), done.
    remote: Compressing objects: 100% (343/343), done.
    remote: Total 426 (delta 87), reused 221 (delta 40), pack-reused 0
    Receiving objects: 100% (426/426), 545.98 KiB | 1.78 MiB/s, done.
    Resolving deltas: 100% (87/87), done.
    
    Co-Authored-By: Sergio Garcia Martinez <[email protected]>
    mbaldessari and soukron committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    dd6be56 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #489 from mbaldessari/recursive-clone

    Use --recurse-submodules when cloning
    mbaldessari authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    4d04000 View commit details
    Browse the repository at this point in the history
  7. Drop support for IIB on OCP 4.12

    The last job we ran with that for IIB was more than 4 months ago.
    mbaldessari committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    60600dc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f50deb9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5702167 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    84f7434 View commit details
    Browse the repository at this point in the history
  11. Check for prereqs for IIB

    mbaldessari committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    109027c View commit details
    Browse the repository at this point in the history
  12. Merge pull request #491 from mbaldessari/prereqs

    Check for prereqs for IIB
    mbaldessari authored Apr 22, 2024
    Configuration menu
    Copy the full SHA
    20cb31e View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. Configuration menu
    Copy the full SHA
    3c853b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4383b9 View commit details
    Browse the repository at this point in the history