diff --git a/charts/gitops-runtime/Chart.yaml b/charts/gitops-runtime/Chart.yaml index 6f9391dc5..d7378b20e 100644 --- a/charts/gitops-runtime/Chart.yaml +++ b/charts/gitops-runtime/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 0.1.72 description: A Helm chart for Codefresh gitops runtime name: gitops-runtime -version: 0.31.3 +version: 0.31.4 home: https://github.com/codefresh-io/gitops-runtime-helm icon: https://avatars1.githubusercontent.com/u/11412079?v=3 keywords: @@ -15,10 +15,10 @@ annotations: artifacthub.io/alternativeName: "codefresh-gitops-runtime" artifacthub.io/changes: |- - kind: changed - description: 'Release 0.31.3' + description: 'Release 0.32.0' links: - name: 'Release notes' - url: 'https://github.com/codefresh-io/gitops-runtime-helm/releases/tag/0.31.3' + url: 'https://github.com/codefresh-io/gitops-runtime-helm/releases/tag/0.32.0' dependencies: - name: argo-cd repository: https://argoproj.github.io/argo-helm diff --git a/charts/gitops-runtime/README.md b/charts/gitops-runtime/README.md index b156e16d7..01bd18d03 100644 --- a/charts/gitops-runtime/README.md +++ b/charts/gitops-runtime/README.md @@ -1,5 +1,5 @@ ## Codefresh gitops runtime -![Version: 0.31.3](https://img.shields.io/badge/Version-0.31.3-informational?style=flat-square) ![AppVersion: 0.1.72](https://img.shields.io/badge/AppVersion-0.1.72-informational?style=flat-square) +![Version: 0.32.0](https://img.shields.io/badge/Version-0.32.0-informational?style=flat-square) ![AppVersion: 0.1.72](https://img.shields.io/badge/AppVersion-0.1.72-informational?style=flat-square) ## Table of Content @@ -16,6 +16,7 @@ - [Upgrading](#upgrading) - [To 0.23.x](#to-023x) - [> 0.24.x](#-024x) + - [To 0.32.x](#to-032x) ## Prerequisites @@ -60,6 +61,7 @@ argo-workflows: enabled: false tunnel-client: enabled: false +# gitops-operator is disabled by default (End-of-Life). gitops-operator: crds: install: false @@ -76,6 +78,7 @@ argo-cd: argo-workflows: crds: install: true +# gitops-operator is disabled by default (End-of-Life). gitops-operator: crds: install: true @@ -207,7 +210,7 @@ We have created a helper utility to resolve this issue: The utility is packaged in a container image. Below are instructions on executing the utility using Docker: ``` -docker run -v :/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.31.3 +docker run -v :/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.32.0 ``` `output_dir` - is a local directory where the utility will output files.
`local_registry` - is your local registry where you want to mirror the images to @@ -220,7 +223,7 @@ The utility will output 4 files into the folder: For usage with external ArgoCD run the utility with `EXTERNAL_ARGOCD` environment variable set to `true`. ``` -docker run -e EXTERNAL_ARGOCD=true -v :/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.31.3 +docker run -e EXTERNAL_ARGOCD=true -v :/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.32.0 ``` ## Openshift @@ -280,6 +283,7 @@ app-proxy: matchLabels: app: cap-app-proxy +# gitops-operator is disabled by default (End-of-Life). gitops-operator: replicaCount: 2 pdb: @@ -457,6 +461,25 @@ global: ... ``` +### To 0.32.x + +#### GitOps operator is disabled by default + +The GitOps operator has reached End-of-Life and `.Values.gitops-operator.enabled` now defaults to `false`. +On upgrade, the chart removes the `gitops-operator` Deployment, ServiceAccount, RBAC, PDB, the `promotion-template` ServiceAccount/RBAC, and the operator CRDs +(`products`, `promotionflows`, `promotionpolicies`, `promotiontasks`, `promotiontemplates`, `restrictedgitsources` in the `codefresh.io` group). + +> [!WARNING] +> Deleting a CRD deletes all custom resources of that kind in the cluster. +> To keep the CRDs and their resources, set `gitops-operator.crds.keep: true` in your **currently installed** release (run `helm upgrade` with it first), and only then upgrade to 0.32.x. + +If you still rely on the GitOps operator(you use restricted-git-sources with your runtime), enable it explicitly when upgrading: + +```yaml +gitops-operator: + enabled: true +``` + ## Values | Key | Type | Default | Description | @@ -650,7 +673,7 @@ global: | gitops-operator.crds.annotations | object | `{}` | Annotations on gitops operator CRDs | | gitops-operator.crds.install | bool | `true` | Whether or not to install CRDs | | gitops-operator.crds.keep | bool | `false` | Keep CRDs if gitops runtime release is uninstalled | -| gitops-operator.enabled | bool | `true` | | +| gitops-operator.enabled | bool | `false` | Enable the GitOps operator. Disabled by default, the operator is End-of-Life. Set to `true` only if you still rely on it | | gitops-operator.env.<<[0].OTEL_EXPORTER_OTLP_COMPRESSION | string | `"gzip"` | Specifies the compression algorithm to be used for all telemetry data. Ref: https://opentelemetry.io/docs/specs/otel/protocol/exporter/ | | gitops-operator.env.<<[0].OTEL_EXPORTER_OTLP_ENDPOINT | string | `"http://localhost:4317"` | Base endpoint URL for all OpenTelemetry signals. Ref: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/ | | gitops-operator.env.<<[0].OTEL_EXPORTER_OTLP_PROTOCOL | string | `"grpc"` | Specifies the OTLP transport protocol to be used for all telemetry data. Ref: https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/ | diff --git a/charts/gitops-runtime/README.md.gotmpl b/charts/gitops-runtime/README.md.gotmpl index ce0ad4bcc..fa7e29b86 100644 --- a/charts/gitops-runtime/README.md.gotmpl +++ b/charts/gitops-runtime/README.md.gotmpl @@ -16,6 +16,7 @@ - [Upgrading](#upgrading) - [To 0.23.x](#to-023x) - [> 0.24.x](#-024x) + - [To 0.32.x](#to-032x) ## Prerequisites @@ -60,6 +61,7 @@ argo-workflows: enabled: false tunnel-client: enabled: false +# gitops-operator is disabled by default (End-of-Life). gitops-operator: crds: install: false @@ -76,6 +78,7 @@ argo-cd: argo-workflows: crds: install: true +# gitops-operator is disabled by default (End-of-Life). gitops-operator: crds: install: true @@ -285,6 +288,7 @@ app-proxy: matchLabels: app: cap-app-proxy +# gitops-operator is disabled by default (End-of-Life). gitops-operator: replicaCount: 2 pdb: @@ -462,4 +466,23 @@ global: ... ``` +### To 0.32.x + +#### GitOps operator is disabled by default + +The GitOps operator has reached End-of-Life and `.Values.gitops-operator.enabled` now defaults to `false`. +On upgrade, the chart removes the `gitops-operator` Deployment, ServiceAccount, RBAC, PDB, the `promotion-template` ServiceAccount/RBAC, and the operator CRDs +(`products`, `promotionflows`, `promotionpolicies`, `promotiontasks`, `promotiontemplates`, `restrictedgitsources` in the `codefresh.io` group). + +> [!WARNING] +> Deleting a CRD deletes all custom resources of that kind in the cluster. +> To keep the CRDs and their resources, set `gitops-operator.crds.keep: true` in your **currently installed** release (run `helm upgrade` with it first), and only then upgrade to 0.32.x. + +If you still rely on the GitOps operator(you use restricted-git-sources with your runtime), enable it explicitly when upgrading: + +```yaml +gitops-operator: + enabled: true +``` + {{ template "chart.valuesSection" . }} diff --git a/charts/gitops-runtime/tests/custom-ca_test.yaml b/charts/gitops-runtime/tests/custom-ca_test.yaml index afd63ede0..cc0f12899 100644 --- a/charts/gitops-runtime/tests/custom-ca_test.yaml +++ b/charts/gitops-runtime/tests/custom-ca_test.yaml @@ -11,6 +11,8 @@ templates: - _components/cap-app-proxy/_deployment.yaml - _components/cap-app-proxy/_config.yaml - codefresh-cm.yaml +set: + gitops-operator.enabled: true tests: - it: test chart created secret contents - default secret key diff --git a/charts/gitops-runtime/tests/external_argocd_test.yaml b/charts/gitops-runtime/tests/external_argocd_test.yaml index e145efd5b..88f8cfa8b 100644 --- a/charts/gitops-runtime/tests/external_argocd_test.yaml +++ b/charts/gitops-runtime/tests/external_argocd_test.yaml @@ -8,6 +8,8 @@ templates: - _components/gitops-operator/* - app-proxy/external-argocd-token.yaml - codefresh-cm.yaml +set: + gitops-operator.enabled: true tests: - it: app-proxy ConfigMap should have valid ArgoCd URL values: diff --git a/charts/gitops-runtime/tests/gitops-controller-misc_test.yaml b/charts/gitops-runtime/tests/gitops-controller-misc_test.yaml index 01cfe4019..702c0aa5b 100644 --- a/charts/gitops-runtime/tests/gitops-controller-misc_test.yaml +++ b/charts/gitops-runtime/tests/gitops-controller-misc_test.yaml @@ -2,6 +2,8 @@ suite: misc tests on gitops-operator templates generation templates: - gitops-operator/* - _components/gitops-operator/* +set: + gitops-operator.enabled: true tests: - it: override both images works template: gitops-operator/deployment.yaml diff --git a/charts/gitops-runtime/tests/gitops-operator-disabled_test.yaml b/charts/gitops-runtime/tests/gitops-operator-disabled_test.yaml new file mode 100644 index 000000000..2d8d13a90 --- /dev/null +++ b/charts/gitops-runtime/tests/gitops-operator-disabled_test.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: Test GitOps Operator is disabled by default +templates: + - gitops-operator/* +values: + - ./values/mandatory-values.yaml +tests: + - it: should not render any gitops-operator resources by default + asserts: + - hasDocuments: + count: 0 diff --git a/charts/gitops-runtime/tests/gitops-operator_test.yaml b/charts/gitops-runtime/tests/gitops-operator_test.yaml index 8368a8275..4bdfdd4ae 100644 --- a/charts/gitops-runtime/tests/gitops-operator_test.yaml +++ b/charts/gitops-runtime/tests/gitops-operator_test.yaml @@ -3,6 +3,8 @@ suite: Test GitOps Operator templates: - gitops-operator/** - _components/gitops-operator/** +set: + gitops-operator.enabled: true tests: - it: should have LEADER_ELECT set to true if replicaCount is greater than 1 values: diff --git a/charts/gitops-runtime/tests/global_constraints_test.yaml b/charts/gitops-runtime/tests/global_constraints_test.yaml index 3081e1f7e..7ddc90c84 100644 --- a/charts/gitops-runtime/tests/global_constraints_test.yaml +++ b/charts/gitops-runtime/tests/global_constraints_test.yaml @@ -19,6 +19,8 @@ templates: - codefresh-cm.yaml values: - ./values/mandatory-values.yaml +set: + gitops-operator.enabled: true tests: - it: components should have nodeSelector and tolerations from .Values.global values: diff --git a/charts/gitops-runtime/values-ha.yaml b/charts/gitops-runtime/values-ha.yaml index ae9463af9..b46e9e3c8 100644 --- a/charts/gitops-runtime/values-ha.yaml +++ b/charts/gitops-runtime/values-ha.yaml @@ -17,6 +17,7 @@ app-proxy: matchLabels: app: cap-app-proxy +# gitops-operator is disabled by default (End-of-Life). gitops-operator: replicaCount: 2 pdb: diff --git a/charts/gitops-runtime/values-multi-runtimes-first.yaml b/charts/gitops-runtime/values-multi-runtimes-first.yaml index 7edbb31b1..e9052bfdd 100644 --- a/charts/gitops-runtime/values-multi-runtimes-first.yaml +++ b/charts/gitops-runtime/values-multi-runtimes-first.yaml @@ -8,6 +8,7 @@ argo-cd: argo-workflows: crds: install: true +# gitops-operator is disabled by default (End-of-Life). gitops-operator: crds: install: true diff --git a/charts/gitops-runtime/values-multi-runtimes.yaml b/charts/gitops-runtime/values-multi-runtimes.yaml index 5450bdd18..4f20f1a31 100644 --- a/charts/gitops-runtime/values-multi-runtimes.yaml +++ b/charts/gitops-runtime/values-multi-runtimes.yaml @@ -23,6 +23,7 @@ argo-workflows: enabled: false tunnel-client: enabled: false +# gitops-operator is disabled by default (End-of-Life). gitops-operator: crds: install: false diff --git a/charts/gitops-runtime/values.yaml b/charts/gitops-runtime/values.yaml index 1f102cf44..2c39ff23f 100644 --- a/charts/gitops-runtime/values.yaml +++ b/charts/gitops-runtime/values.yaml @@ -640,7 +640,8 @@ app-proxy: # gitops-operator #----------------------------------------------------------------------------------------------------------------------- gitops-operator: - enabled: true + # -- Enable the GitOps operator. Disabled by default, the operator is End-of-Life. Set to `true` only if you still rely on it + enabled: false replicaCount: 1 # -- Codefresh gitops operator crds crds: diff --git a/tests/component-tests/setup/values/runtime.values.yaml b/tests/component-tests/setup/values/runtime.values.yaml index 316ebe80a..194c889fd 100644 --- a/tests/component-tests/setup/values/runtime.values.yaml +++ b/tests/component-tests/setup/values/runtime.values.yaml @@ -12,6 +12,7 @@ # - Configures internal router and app-proxy for test networking. # - Sets a unique runtime name and disables validation steps. # - Uses a test-specific image tag for the gitops-operator. +# - Enables the gitops-operator (disabled by default in the chart). # # These values are used by the Helm install command in the test suite. # ----------------------------------------------------------------------------- @@ -49,3 +50,7 @@ internal-router: app-proxy: config: cors: "http://mockserver.mockserver:1080" + +# gitops-operator is disabled by default; component tests cover promotions, so it must be enabled +gitops-operator: + enabled: true