Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
* @codefresh-io/teamleads @masontikhonov
* @codefresh-io/teamleads @mikhail-klimko @masontikhonov

.github @codefresh-io/DevOps

# any change to the chart should go through devops
/charts/gitops-runtime/templates @codefresh-io/DevOps
/charts/gitops-runtime/tests @codefresh-io/DevOps

# gitops operator crd changes can be approved by some other people
/charts/gitops-runtime/templates/_components/gitops-operator/crds @codefresh-io/DevOps @dmaizel @eti-codefresh @chen-keinan @scme0 @masontikhonov
20 changes: 12 additions & 8 deletions charts/gitops-runtime/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.1.72
description: A Helm chart for Codefresh gitops runtime
name: gitops-runtime
version: 0.0.0
version: 0.32.2
home: https://github.com/codefresh-io/gitops-runtime-helm
icon: https://avatars1.githubusercontent.com/u/11412079?v=3
keywords:
Expand All @@ -13,27 +13,31 @@ maintainers:
url: https://codefresh-io.github.io/
annotations:
artifacthub.io/alternativeName: "codefresh-gitops-runtime"
artifacthub.io/changes: |-
- kind: changed
description: 'Release 0.32.2'
links:
- name: 'Release notes'
url: 'https://github.com/codefresh-io/gitops-runtime-helm/releases/tag/0.32.2'
dependencies:
# The image for this chart was overridden because argocd doesn’t release the chart for 3.3.10 version.
# Don't forget to remove the image override after updating to a new version of the chart.
- name: argo-cd
repository: https://argoproj.github.io/argo-helm
condition: argo-cd.enabled
version: 10.2.2
version: 10.17.2
- name: argo-workflows
repository: https://codefresh-io.github.io/argo-helm
version: 0.45.27-v3.6.7-cap-CFS-16765
version: 0.45.29-v3.6.7-cap-CF-23509
condition: argo-workflows.enabled
- name: sealed-secrets
repository: https://bitnami.github.io/sealed-secrets
version: 2.18.0
version: 2.18.6
condition: sealed-secrets.enabled
- name: codefresh-tunnel-client
repository: oci://quay.io/codefresh/charts
version: 0.1.26
version: 0.1.27
alias: tunnel-client
condition: tunnel-client.enabled
- name: redis-ha
version: 4.33.4
version: 4.39.0
repository: https://dandydeveloper.github.io/charts/
condition: redis-ha.enabled
39 changes: 32 additions & 7 deletions charts/gitops-runtime/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Codefresh gitops runtime
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![AppVersion: 0.1.72](https://img.shields.io/badge/AppVersion-0.1.72-informational?style=flat-square)
![Version: 0.32.2](https://img.shields.io/badge/Version-0.32.2-informational?style=flat-square) ![AppVersion: 0.1.72](https://img.shields.io/badge/AppVersion-0.1.72-informational?style=flat-square)

## Table of Content

Expand All @@ -16,6 +16,7 @@
- [Upgrading](#upgrading)
- [To 0.23.x](#to-023x)
- [> 0.24.x](#-024x)
- [To 0.32.x](#to-032x)

## Prerequisites

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -187,6 +190,8 @@ data:

| GitOps Runtime version | Supported ArgoCD versions |
|------------------------|---------------------------|
| 0.32.x | >=3.4 <=3.6 |
| 0.31.x | >=3.3 <=3.5 |
| 0.30.x | >=3.2 <=3.4 |
| 0.29.x | >=3.1 <=3.3 |
| 0.28.x | >=3.0 <=3.2 |
Expand All @@ -206,7 +211,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_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.0.0 <local_registry>
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.32.2 <local_registry>
```
`output_dir` - is a local directory where the utility will output files. <br>
`local_registry` - is your local registry where you want to mirror the images to
Expand All @@ -219,7 +224,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_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.0.0 <local_registry>
docker run -e EXTERNAL_ARGOCD=true -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.32.2 <local_registry>
```

## Openshift
Expand Down Expand Up @@ -279,6 +284,7 @@ app-proxy:
matchLabels:
app: cap-app-proxy

# gitops-operator is disabled by default (End-of-Life).
gitops-operator:
replicaCount: 2
pdb:
Expand Down Expand Up @@ -456,6 +462,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 |
Expand Down Expand Up @@ -649,7 +674,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/ |
Expand All @@ -664,7 +689,7 @@ global:
| gitops-operator.env.<<[0].OTEL_TRACES_SAMPLER | string | `"parentbased_always_on"` | OTel sampler to be used for traces. Ref: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/ |
| gitops-operator.env.GITOPS_OPERATOR_VERSION | string | `"0.11.1"` | |
| gitops-operator.fullnameOverride | string | `""` | |
| gitops-operator.image | object | `{"registry":"quay.io","repository":"codefresh/codefresh-gitops-operator","tag":"569808d"}` | GitOps operator image |
| gitops-operator.image | object | `{"registry":"quay.io","repository":"codefresh/codefresh-gitops-operator","tag":"0681822"}` | GitOps operator image |
| gitops-operator.imagePullSecrets | list | `[]` | |
| gitops-operator.nameOverride | string | `""` | |
| gitops-operator.nodeSelector | object | `{}` | |
Expand Down Expand Up @@ -805,15 +830,15 @@ global:
| redis-ha.topologySpreadConstraints.maxSkew | string | `""` (defaults to `1`) | Max skew of pods tolerated |
| redis-ha.topologySpreadConstraints.topologyKey | string | `""` (defaults to `topology.kubernetes.io/zone`) | Topology key for spread |
| redis-ha.topologySpreadConstraints.whenUnsatisfiable | string | `""` (defaults to `ScheduleAnyway`) | Enforcement policy, hard or soft |
| redis-secret-init | object | `{"affinity":{},"image":{"registry":"docker.io","repository":"alpine/kubectl","tag":"1.37.0"},"nodeSelector":{},"tolerations":[]}` | Enable hook job to create redis secret |
| redis-secret-init | object | `{"affinity":{},"image":{"registry":"docker.io","repository":"alpine/kubectl","tag":"1.37.2"},"nodeSelector":{},"tolerations":[]}` | Enable hook job to create redis secret |
| redis.image | object | `{"registry":"public.ecr.aws","repository":"docker/library/redis","tag":"8.2.1-alpine"}` | Redis image |
| redis.metrics | object | `{"enabled":true,"env":{},"envFrom":[],"image":{"registry":"ghcr.io","repository":"oliver006/redis_exporter","tag":"v1.72.1"},"livenessProbe":{"enabled":true,"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":15},"readinessProbe":{"enabled":true,"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":15},"resources":{},"serviceMonitor":{"enabled":false}}` | Enable metrics sidecar |
| redis.metrics.serviceMonitor | object | `{"enabled":false}` | Enable a prometheus ServiceMonitor |
| redis.pdb | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":"","minAvailable":1}` | Enabled Pod Disruption Budget for redis |
| redis.readinessProbe | object | `{"enabled":true,"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":15}` | Probes configuration |
| redis.service | object | `{"annotations":{},"labels":{},"ports":{"metrics":{"port":9121,"targetPort":9121},"redis":{"port":6379,"targetPort":6379}},"type":"ClusterIP"}` | Service configuration |
| redis.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Create ServiceAccount for redis |
| sealed-secrets | object | `{"fullnameOverride":"sealed-secrets-controller","image":{"registry":"quay.io","repository":"codefresh/sealed-secrets-controller","tag":"0.36.0"},"keyrenewperiod":"720h","resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"200m","memory":"512Mi"}}}` | --------------------------------------------------------------------------------------------------------------------- |
| sealed-secrets | object | `{"fullnameOverride":"sealed-secrets-controller","image":{"registry":"quay.io","repository":"codefresh/sealed-secrets-controller","tag":"0.41.2"},"keyrenewperiod":"720h","resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"200m","memory":"512Mi"}}}` | --------------------------------------------------------------------------------------------------------------------- |
| tunnel-client | object | `{"affinity":{},"enabled":true,"libraryMode":true,"nodeSelector":{},"tolerations":[],"tunnelServer":{"host":"register-tunnels.cf-cd.com","subdomainHost":"tunnels.cf-cd.com"}}` | Tunnel based runtime. Not supported for on-prem platform. In on-prem use ingress based runtimes. |
| tunnel-client.enabled | bool | `true` | Will only be used if global.runtime.ingress.enabled = false |
| tunnel-client.libraryMode | bool | `true` | Do not change this value! Breaks chart logic |
25 changes: 25 additions & 0 deletions charts/gitops-runtime/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [Upgrading](#upgrading)
- [To 0.23.x](#to-023x)
- [> 0.24.x](#-024x)
- [To 0.32.x](#to-032x)

## Prerequisites

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -190,6 +193,8 @@ data:

| GitOps Runtime version | Supported ArgoCD versions |
|------------------------|---------------------------|
| 0.32.x | >=3.4 <=3.6 |
| 0.31.x | >=3.3 <=3.5 |
| 0.30.x | >=3.2 <=3.4 |
| 0.29.x | >=3.1 <=3.3 |
| 0.28.x | >=3.0 <=3.2 |
Expand Down Expand Up @@ -284,6 +289,7 @@ app-proxy:
matchLabels:
app: cap-app-proxy

# gitops-operator is disabled by default (End-of-Life).
gitops-operator:
replicaCount: 2
pdb:
Expand Down Expand Up @@ -461,4 +467,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" . }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ NAMESPACE:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
REQUIRED_VERSION_CONSTRAINT: ">=3.2 <=3.4"
REQUIRED_VERSION_CONSTRAINT: ">=3.4 <=3.6"
{{- end -}}

{{- define "installer.validate-values.environment-variables" -}}
Expand Down
2 changes: 2 additions & 0 deletions charts/gitops-runtime/tests/custom-ca_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/gitops-runtime/tests/external_argocd_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions charts/gitops-runtime/tests/gitops-operator-disabled_test.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions charts/gitops-runtime/tests/gitops-operator_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions charts/gitops-runtime/tests/global_constraints_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions charts/gitops-runtime/values-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions charts/gitops-runtime/values-multi-runtimes-first.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions charts/gitops-runtime/values-multi-runtimes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions charts/gitops-runtime/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ sealed-secrets:
image:
registry: 'quay.io'
repository: 'codefresh/sealed-secrets-controller'
tag: '0.36.0'
tag: '0.41.2'
resources:
limits:
cpu: 500m
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -670,7 +671,7 @@ gitops-operator:
image:
registry: quay.io
repository: codefresh/codefresh-gitops-operator
tag: 569808d
tag: "0681822"
env:
!!merge <<:
- *otel-config
Expand Down Expand Up @@ -745,7 +746,7 @@ redis-secret-init:
image:
registry: docker.io
repository: alpine/kubectl
tag: 1.37.0
tag: 1.37.2
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down
Loading