Skip to content

Commit aef76f8

Browse files
Merge branch 'stable/0.25' into bump-image-3-1-5-sync
2 parents 976674a + 5bcad07 commit aef76f8

File tree

19 files changed

+571
-270
lines changed

19 files changed

+571
-270
lines changed

.github/workflows/component-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
chmod 700 get_helm.sh
6464
6565
./get_helm.sh
66-
helm repo add gitea-charts https://dl.gitea.com/charts/
6766
helm repo add mockserver https://www.mock-server.com
6867
6968

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
See official documentation here: https://codefresh.io/docs/docs/installation/gitops/hybrid-gitops-helm-installation/
44

5-
65
## To adopt argoproj crds:
76

87
1. Make sure kubectl is on the runtime cluster context

charts/gitops-runtime/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: 0.1.75
33
description: A Helm chart for Codefresh gitops runtime
44
name: gitops-runtime
5-
version: '0.24.3'
5+
version: '0.24.5'
66
home: https://github.com/codefresh-io/gitops-runtime-helm
77
icon: https://avatars1.githubusercontent.com/u/11412079?v=3
88
keywords:

charts/gitops-runtime/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ gitops-operator:
294294
|-----|------|---------|-------------|
295295
| app-proxy.affinity | object | `{}` | |
296296
| app-proxy.config.argoCdUrl | string | `nil` | ArgoCD Url. determined by chart logic. Do not change unless you are certain you need to |
297-
| app-proxy.config.argoCdUsername | string | `"admin"` | ArgoCD user to be used by app-proxy |
297+
| app-proxy.config.argoCdUsername | string | `""` | deprecated. use `global.external-argo-cd.auth.username` instead |
298298
| app-proxy.config.argoWorkflowsInsecure | string | `"true"` | |
299299
| app-proxy.config.argoWorkflowsUrl | string | `nil` | Workflows server url. Determined by chart logic. Do not change unless you are certain you need to |
300300
| app-proxy.config.clusterChunkSize | int | `50` | define cluster list size per request to report the cluster state to platform, e.g. if you have 90 clusters and set clusterChunkSize: 40, it means cron job will report cluster state to platform in 3 iterations (40,40,10) - reduce this value if you have a lot of clusters and the cron job is failing with payload too large error - use 0 to sync all clusters at once |
@@ -306,13 +306,13 @@ gitops-operator:
306306
| app-proxy.extraVolumeMounts | list | `[]` | Extra volume mounts for main container |
307307
| app-proxy.extraVolumes | list | `[]` | extra volumes |
308308
| app-proxy.fullnameOverride | string | `"cap-app-proxy"` | |
309-
| app-proxy.image-enrichment | object | `{"config":{"clientHeartbeatIntervalInSeconds":5,"concurrencyCmKey":"imageReportExecutor","concurrencyCmName":"workflow-synchronization-semaphores","images":{"gitEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-git-info","tag":"1.1.16-main"},"jiraEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info","tag":"1.1.16-main"},"reportImage":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.16-main"}},"podGcStrategy":"OnWorkflowCompletion","ttlActiveInSeconds":900,"ttlAfterCompletionInSeconds":86400},"enabled":true,"serviceAccount":{"annotations":null,"create":true,"name":"codefresh-image-enrichment-sa"}}` | Image enrichment process configuration |
310-
| app-proxy.image-enrichment.config | object | `{"clientHeartbeatIntervalInSeconds":5,"concurrencyCmKey":"imageReportExecutor","concurrencyCmName":"workflow-synchronization-semaphores","images":{"gitEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-git-info","tag":"1.1.16-main"},"jiraEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info","tag":"1.1.16-main"},"reportImage":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.16-main"}},"podGcStrategy":"OnWorkflowCompletion","ttlActiveInSeconds":900,"ttlAfterCompletionInSeconds":86400}` | Configurations for image enrichment workflow |
309+
| app-proxy.image-enrichment | object | `{"config":{"clientHeartbeatIntervalInSeconds":5,"concurrencyCmKey":"imageReportExecutor","concurrencyCmName":"workflow-synchronization-semaphores","images":{"gitEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-git-info","tag":"1.1.17-main"},"jiraEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info","tag":"1.1.17-main"},"reportImage":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.17-main"}},"podGcStrategy":"OnWorkflowCompletion","ttlActiveInSeconds":900,"ttlAfterCompletionInSeconds":86400},"enabled":true,"serviceAccount":{"annotations":null,"create":true,"name":"codefresh-image-enrichment-sa"}}` | Image enrichment process configuration |
310+
| app-proxy.image-enrichment.config | object | `{"clientHeartbeatIntervalInSeconds":5,"concurrencyCmKey":"imageReportExecutor","concurrencyCmName":"workflow-synchronization-semaphores","images":{"gitEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-git-info","tag":"1.1.17-main"},"jiraEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info","tag":"1.1.17-main"},"reportImage":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.17-main"}},"podGcStrategy":"OnWorkflowCompletion","ttlActiveInSeconds":900,"ttlAfterCompletionInSeconds":86400}` | Configurations for image enrichment workflow |
311311
| app-proxy.image-enrichment.config.clientHeartbeatIntervalInSeconds | int | `5` | Client heartbeat interval in seconds for image enrichemnt workflow |
312312
| app-proxy.image-enrichment.config.concurrencyCmKey | string | `"imageReportExecutor"` | The name of the key in the configmap to use as synchronization semaphore |
313313
| app-proxy.image-enrichment.config.concurrencyCmName | string | `"workflow-synchronization-semaphores"` | The name of the configmap to use as synchronization semaphore, see https://argoproj.github.io/argo-workflows/synchronization/ |
314-
| app-proxy.image-enrichment.config.images | object | `{"gitEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-git-info","tag":"1.1.16-main"},"jiraEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info","tag":"1.1.16-main"},"reportImage":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.16-main"}}` | Enrichemnt images |
315-
| app-proxy.image-enrichment.config.images.reportImage | object | `{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.16-main"}` | Report image enrichment task image |
314+
| app-proxy.image-enrichment.config.images | object | `{"gitEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-git-info","tag":"1.1.17-main"},"jiraEnrichment":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-image-enricher-jira-info","tag":"1.1.17-main"},"reportImage":{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.17-main"}}` | Enrichemnt images |
315+
| app-proxy.image-enrichment.config.images.reportImage | object | `{"registry":"quay.io","repository":"codefreshplugins/argo-hub-codefresh-csdp-report-image-info","tag":"1.1.17-main"}` | Report image enrichment task image |
316316
| app-proxy.image-enrichment.config.podGcStrategy | string | `"OnWorkflowCompletion"` | Pod grabage collection strategy. By default all pods will be deleted when the enrichment workflow completes. |
317317
| app-proxy.image-enrichment.config.ttlActiveInSeconds | int | `900` | Maximum allowed runtime for the enrichment workflow |
318318
| app-proxy.image-enrichment.config.ttlAfterCompletionInSeconds | int | `86400` | Number of seconds to live after completion |
@@ -330,7 +330,7 @@ gitops-operator:
330330
| app-proxy.initContainer.extraVolumeMounts | list | `[]` | Extra volume mounts for init container |
331331
| app-proxy.initContainer.image.pullPolicy | string | `"IfNotPresent"` | |
332332
| app-proxy.initContainer.image.repository | string | `"quay.io/codefresh/cap-app-proxy-init"` | |
333-
| app-proxy.initContainer.image.tag | string | `"1.3750.0"` | |
333+
| app-proxy.initContainer.image.tag | string | `"1.3791.0"` | |
334334
| app-proxy.initContainer.resources.limits | object | `{}` | |
335335
| app-proxy.initContainer.resources.requests.cpu | string | `"0.2"` | |
336336
| app-proxy.initContainer.resources.requests.memory | string | `"256Mi"` | |

charts/gitops-runtime/templates/_components/cap-app-proxy/_config.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
{{- define "cap-app-proxy.resources.configmap-documented-configs"}}
2-
argoCdUrl: {{ .Values.config.argoCdUrl }}
3-
argoCdUsername: {{ .Values.config.argoCdUsername }}
1+
{{- define "cap-app-proxy.resources.configmap-documented-configs" }}
42
argoWorkflowsInsecure: {{ .Values.config.argoWorkflowsInsecure | quote }}
5-
argoWorkflowsUrl: {{ default "" .Values.config.argoWorkflowsUrl }}
3+
clusterChunkSize: {{ .Values.config.clusterChunkSize | quote }}
64
cors: {{ .Values.global.codefresh.url }}
7-
{{- with .Values.config.clusterChunkSize }}
8-
clusterChunkSize: {{ . | quote }}
9-
{{- end }}
10-
env: {{ .Values.config.env | quote}}
115
isConfigurationRuntime: {{ .Values.global.runtime.isConfigurationRuntime | quote }}
126
isExternalArgoCD: {{ .Values.global.runtime.isExternalArgoCD | quote }}
137
runtimeName: {{ required "global.runtime.name is required" .Values.global.runtime.name | quote}}
148
isNamespacedRuntime: {{ .Values.global.runtime.singleNamespace | quote }}
15-
skipGitPermissionValidation: {{ .Values.config.skipGitPermissionValidation | quote }}
169
logLevel: {{ .Values.config.logLevel | quote }}
1710
{{- $enrichmentValues := get .Values "image-enrichment" }}
1811
{{- if $enrichmentValues.enabled }}
@@ -31,7 +24,7 @@ enrichmentJiraEnrichmentImage: {{ printf "%s/%s:%s" $enrichmentValues.config.ima
3124

3225
{{- define "cap-app-proxy.resources.configmap" }}
3326
{{- $documentedConfigs := (include "cap-app-proxy.resources.configmap-documented-configs" . | fromYaml ) }}
34-
{{- $overrides := omit .Values.config "clusterChunkSize" }}
27+
{{- $overrides := omit .Values.config "argoWorkflowsInsecure" "clusterChunkSize" "cors" }}
3528
{{- $mergedConfig := mergeOverwrite $documentedConfigs $overrides }}
3629
apiVersion: v1
3730
kind: ConfigMap

charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ ARGO_CD_URL:
55
name: cap-app-proxy-cm
66
key: argoCdUrl
77
optional: true
8-
ARGO_CD_TOKEN: {{ include "codefresh-gitops-runtime.argocd.server.token" . | nindent 2 }}
9-
ARGO_CD_USERNAME: {{ include "codefresh-gitops-runtime.argocd.server.username-env-var" . | nindent 2 }}
10-
ARGO_CD_PASSWORD: {{ include "codefresh-gitops-runtime.argocd.server.password" . | nindent 2 }}
118
ARGO_WORKFLOWS_INSECURE:
129
valueFrom:
1310
configMapKeyRef:
@@ -231,8 +228,9 @@ LEADER_ID:
231228
Read defaults from the template above and merge with the values provided in values file
232229
*/}}
233230
{{- define "cap-app-proxy.environment-variables" -}}
234-
{{- $defaults := (include "cap-app-proxy.environment-variables.defaults" . | fromYaml) }}
235-
{{- $overrides := .Values.env }}
236-
{{- $mergedValues := mergeOverwrite $defaults $overrides }}
237-
{{- include "codefresh-gitops-runtime.components.common_helpers.container-templates.env-vars" $mergedValues }}
231+
{{- $defaults := (include "cap-app-proxy.environment-variables.defaults" . | fromYaml) }}
232+
{{- $argoCdAuth := (include "codefresh-gitops-runtime.argocd-auth" . | fromYaml) }}
233+
{{- $overrides := .Values.env }}
234+
{{- $mergedValues := mergeOverwrite $defaults $argoCdAuth $overrides }}
235+
{{- include "codefresh-gitops-runtime.components.common_helpers.container-templates.env-vars" $mergedValues }}
238236
{{- end -}}

charts/gitops-runtime/templates/_components/cf-argocd-extras/event-reporter/_statefulset.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
{{- $_ := set $context.Values.container.env.REDIS_PASSWORD.valueFrom.secretKeyRef "key" (default "redis-password" $vals.externalRedis.existingSecretKeyRef.key) }}
1616
{{- end }}
1717

18-
{{- if and (eq (index $context.Values "global" "external-argo-cd" "auth" "type") "token") }}
19-
{{- if not (index $context.Values "global" "external-argo-cd" "auth" "token") }}
20-
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_NAME" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.name is required" (index $context.Values "global" "external-argo-cd" "auth" "tokenSecretKeyRef" "name")) }}
21-
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_KEY" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.key is required" (index $context.Values "global" "external-argo-cd" "auth" "tokenSecretKeyRef" "key" )) }}
22-
{{- else }}
18+
{{- if not (index .Values "argo-cd" "enabled") }}
19+
{{- $argoCdAuth := (index .Values "global" "external-argo-cd" "auth") }}
20+
{{- if (eq $argoCdAuth.type "token") }}
21+
{{- if $argoCdAuth.token }}
2322
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_NAME" "gitops-runtime-argo-cd-token" }}
2423
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_KEY" "token" }}
24+
{{- else if $argoCdAuth.tokenSecretKeyRef }}
25+
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_NAME" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.name is required" $argoCdAuth.tokenSecretKeyRef.name) }}
26+
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_KEY" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.key is required" $argoCdAuth.tokenSecretKeyRef.key) }}
27+
{{- else }}
28+
{{ fail ".Values.global.external-argo-cd.auth.type is 'token' and .Values.global.external-argo-cd.auth.token or .Values.global.external-argo-cd.auth.tokenSecretKeyRef are not set" }}
29+
{{- end }}
2530
{{- end }}
2631
{{- end }}
2732

charts/gitops-runtime/templates/_components/cf-argocd-extras/sources-server/_deployment.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
{{- $_ := set $context.Values.container.env.REDIS_PASSWORD.valueFrom.secretKeyRef "key" (default "redis-password" $vals.externalRedis.existingSecretKeyRef.key) }}
1616
{{- end }}
1717

18-
{{- if and (eq (index $context.Values "global" "external-argo-cd" "auth" "type") "token") }}
19-
{{- if not (index $context.Values "global" "external-argo-cd" "auth" "token") }}
20-
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_NAME" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.name is required" (index $context.Values "global" "external-argo-cd" "auth" "tokenSecretKeyRef" "name")) }}
21-
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_KEY" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.key is required" (index $context.Values "global" "external-argo-cd" "auth" "tokenSecretKeyRef" "key" )) }}
22-
{{- else }}
18+
{{- if not (index .Values "argo-cd" "enabled") }}
19+
{{- $argoCdAuth := (index .Values "global" "external-argo-cd" "auth") }}
20+
{{- if (eq $argoCdAuth.type "token") }}
21+
{{- if $argoCdAuth.token }}
2322
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_NAME" "gitops-runtime-argo-cd-token" }}
2423
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_KEY" "token" }}
24+
{{- else if $argoCdAuth.tokenSecretKeyRef }}
25+
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_NAME" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.name is required" $argoCdAuth.tokenSecretKeyRef.name) }}
26+
{{- $_ := set $context.Values.container.env "ARGO_CD_TOKEN_SECRET_KEY" (required ".Values.global.external-argo-cd.auth.type is set to 'token' therefore .Values.global.external-argo-cd.auth.tokenSecretKeyRef.key is required" $argoCdAuth.tokenSecretKeyRef.key) }}
27+
{{- else }}
28+
{{ fail ".Values.global.external-argo-cd.auth.type is 'token' and .Values.global.external-argo-cd.auth.token or .Values.global.external-argo-cd.auth.tokenSecretKeyRef are not set" }}
29+
{{- end }}
2530
{{- end }}
2631
{{- end }}
2732

0 commit comments

Comments
 (0)