Skip to content

Commit 1cb3f64

Browse files
Merge pull request #214 from codefresh-io/release-0.7.2
Release 0.7.2
2 parents 48a2b1a + df2cd1b commit 1cb3f64

File tree

6 files changed

+195
-99
lines changed

6 files changed

+195
-99
lines changed

charts/gitops-runtime/Chart.yaml

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
2-
appVersion: 0.1.49
2+
appVersion: 0.1.50
33
description: A Helm chart for Codefresh gitops runtime
44
name: gitops-runtime
5-
version: 0.7.1
5+
version: 0.7.2
66
home: https://github.com/codefresh-io/gitops-runtime-helm
77
icon: https://avatars1.githubusercontent.com/u/11412079?v=3
88
keywords:
@@ -15,19 +15,19 @@ annotations:
1515
artifacthub.io/alternativeName: "codefresh-gitops-runtime"
1616
artifacthub.io/changes: |
1717
- kind: changed
18-
description: "update codefresh-gitops-operator chart to 1.0.17 to allow missing promotion flow label"
18+
description: "removed promotion-related notifications from argocd-notifications-controller"
1919
- kind: changed
20-
description: "updated cap-app-proxy to 1.2835.0"
21-
- kind: added
22-
description: garage as optional dependency for Argo workflows artifact and log storage
23-
- kind: fixed
24-
description: multiarch image for installer image used in hooks
25-
- kind: fixed
26-
description: multiarch frpc (codefresh-tunnel-client) image
20+
description: "update gitops operator and switch gitops operator to library mode - set ArgoCD image for notifications controller to match other ArgoCD components and set correct workflows url from chart values, stop suspend workflow wrappers in case of degraded apps, and add omitted condition to wrapper workflow"
21+
- kind: changed
22+
description: "updated cap-app-proxy to 1.2875.0, including skipping PAT scopes permissions validations for git providers: BitBucket, BitBucket Server and GitLab; new query promotablePropertiesPreview"
23+
- kind: security
24+
description: "update tunnel client image to a new in-support alpine version"
25+
- kind: changed
26+
description: "update argo-cd to 6.7.18-4-cap-2.10-2024.6.17-77e06d0f6 with v2 event-reporter support of CA cert"
2727
dependencies:
2828
- name: argo-cd
2929
repository: https://codefresh-io.github.io/argo-helm
30-
version: 6.7.18-3-cap-2.10-2024.5.14-9315e75e1
30+
version: 6.7.18-4-cap-2.10-2024.6.17-77e06d0f6
3131
- name: argo-events
3232
repository: https://codefresh-io.github.io/argo-helm
3333
version: 2.0.9-1-cap-CR-19893
@@ -44,12 +44,12 @@ dependencies:
4444
version: 2.14.1
4545
- name: codefresh-tunnel-client
4646
repository: oci://quay.io/codefresh/charts
47-
version: 0.1.16
47+
version: 0.1.17
4848
alias: tunnel-client
4949
condition: tunnel-client.enabled
5050
- name: codefresh-gitops-operator
5151
repository: oci://quay.io/codefresh/charts
52-
version: 1.0.17
52+
version: 1.0.24
5353
alias: gitops-operator
5454
condition: gitops-operator.enabled
5555
- name: garage

charts/gitops-runtime/README.md

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Codefresh gitops runtime
2-
![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) ![AppVersion: 0.1.49](https://img.shields.io/badge/AppVersion-0.1.49-informational?style=flat-square)
2+
![Version: 0.7.2](https://img.shields.io/badge/Version-0.7.2-informational?style=flat-square) ![AppVersion: 0.1.50](https://img.shields.io/badge/AppVersion-0.1.50-informational?style=flat-square)
33

44
## Prerequisites
55

@@ -27,7 +27,7 @@ We have created a helper utility to resolve this issue:
2727
The utility is packaged in a container image. Below are instructions on executing the utility using Docker:
2828

2929
```
30-
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.7.1 <local_registry>
30+
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.7.2 <local_registry>
3131
```
3232
`output_dir` - is a local directory where the utility will output files. <br>
3333
`local_registry` - is your local registry where you want to mirror the images to
@@ -100,14 +100,14 @@ sealed-secrets:
100100
| app-proxy.image-enrichment.serviceAccount.name | string | `"codefresh-image-enrichment-sa"` | Name of the service account to create or the name of the existing one to use |
101101
| app-proxy.image.pullPolicy | string | `"IfNotPresent"` | |
102102
| app-proxy.image.repository | string | `"quay.io/codefresh/cap-app-proxy"` | |
103-
| app-proxy.image.tag | string | `"1.2835.0"` | |
103+
| app-proxy.image.tag | string | `"1.2875.0"` | |
104104
| app-proxy.imagePullSecrets | list | `[]` | |
105105
| app-proxy.initContainer.command[0] | string | `"./init.sh"` | |
106106
| app-proxy.initContainer.env | object | `{}` | |
107107
| app-proxy.initContainer.extraVolumeMounts | list | `[]` | Extra volume mounts for init container |
108108
| app-proxy.initContainer.image.pullPolicy | string | `"IfNotPresent"` | |
109109
| app-proxy.initContainer.image.repository | string | `"quay.io/codefresh/cap-app-proxy-init"` | |
110-
| app-proxy.initContainer.image.tag | string | `"1.2835.0"` | |
110+
| app-proxy.initContainer.image.tag | string | `"1.2875.0"` | |
111111
| app-proxy.initContainer.resources.limits.cpu | string | `"1"` | |
112112
| app-proxy.initContainer.resources.limits.memory | string | `"512Mi"` | |
113113
| app-proxy.initContainer.resources.requests.cpu | string | `"0.2"` | |
@@ -156,16 +156,6 @@ sealed-secrets:
156156
| argo-cd.eventReporter.replicas | int | `3` | Amount of shards to handle applications events |
157157
| argo-cd.eventReporter.version | string | `"v2"` | Switches between old and new reporter version. Possible values: v1, v2. For v2 `argo-cd.eventReporter.enabled=true` is required |
158158
| argo-cd.fullnameOverride | string | `"argo-cd"` | |
159-
| argo-cd.notifications.bots.slack | object | `{}` | |
160-
| argo-cd.notifications.enabled | bool | `true` | |
161-
| argo-cd.notifications.notifiers."service.webhook.cf-promotion-app-revision-changed-notifier" | string | `"url: http://gitops-operator:8082/app-revision-changed\nheaders:\n- name: Content-Type\n value: application/json\n"` | |
162-
| argo-cd.notifications.subscriptions[0].recipients[0] | string | `"cf-promotion-app-revision-changed-notifier"` | |
163-
| argo-cd.notifications.subscriptions[0].triggers[0] | string | `"cf-promotion-on-deployed-trigger"` | |
164-
| argo-cd.notifications.subscriptions[1].recipients[0] | string | `"cf-promotion-app-revision-changed-notifier"` | |
165-
| argo-cd.notifications.subscriptions[1].triggers[0] | string | `"cf-promotion-on-out-of-sync-trigger"` | |
166-
| argo-cd.notifications.templates."template.cf-promotion-app-revision-changed-template" | string | `"webhook:\n cf-promotion-app-revision-changed-notifier:\n method: POST\n body: |\n {\n \"APP_NAMESPACE\": {{ .app.metadata.namespace | quote }},\n \"APP_NAME\": {{ .app.metadata.name | quote }},\n \"REPO_URL\": {{ call .repo.RepoURLToHTTPS .app.spec.source.repoURL | quote }},\n \"BRANCH\": {{ .app.spec.source.targetRevision | quote }},\n \"PATH\": {{ .app.spec.source.path | quote }},\n \"PREV_COMMIT_SHA\": {{ (index .app.status.history (sub (len .app.status.history) 2)).revision | quote }},\n \"CURRENT_COMMIT_SHA\": {{ .app.status.operationState.syncResult.revision | quote }}\n }\n"` | |
167-
| argo-cd.notifications.triggers."trigger.cf-promotion-on-deployed-trigger" | string | `"- description: Application is synced and healthy. Triggered once per commit.\n when: get(app.spec.syncPolicy, \"automated\") != nil && app.status.sync.status == \"Synced\" && app.status.health.status == \"Healthy\" && app.status.operationState.syncResult.revision != nil\n oncePer: app.status.operationState.syncResult.revision\n send:\n - cf-promotion-app-revision-changed-template\n"` | |
168-
| argo-cd.notifications.triggers."trigger.cf-promotion-on-out-of-sync-trigger" | string | `"- description: Application is out of sync (when autoHeal is off). Triggered once per commit.\n when: get(app.spec.syncPolicy, \"automated\") == nil && app.status.sync.status == \"OutOfSync\" && app.status.operationState.syncResult.revision != nil\n oncePer: app.status.operationState.syncResult.revision\n send:\n - cf-promotion-app-revision-changed-template\n"` | |
169159
| argo-events.crds.install | bool | `false` | |
170160
| argo-events.fullnameOverride | string | `"argo-events"` | |
171161
| argo-rollouts.controller.replicas | int | `1` | |
@@ -241,6 +231,10 @@ sealed-secrets:
241231
| garage-workflows-artifact-storage.persistence.meta.storageClass | string | `""` | When empty value empty the default storage class for the cluster will be used |
242232
| garage-workflows-artifact-storage.resources | object | `{}` | Resources for garage pods. For smaller deployments at least 100m CPU and 1024Mi memory is reccommended. For larger deployments double this size. |
243233
| gitops-operator.affinity | object | `{}` | |
234+
| gitops-operator.argoCdNotifications | object | `{"image":{},"imageOverride":false,"resources":{}}` | Builtin notifications controller used by gitops-operator for promotion related notifications |
235+
| gitops-operator.argoCdNotifications.image | object | `{}` | Set image.repository and image.tag notifications image used by the gitops operator. Ignored unless imageOverride is set to true. |
236+
| gitops-operator.argoCdNotifications.imageOverride | bool | `false` | If set to true allows to override notifications image used by the gitops operator. When set to false the version of ArgoCD will be set to the version used for all other ArgoCD components. |
237+
| gitops-operator.argoCdNotifications.resources | object | `{}` | Resources for notifications controller used by gitops-operator. |
244238
| gitops-operator.crds | object | `{"additionalLabels":{},"annotations":{},"install":true,"keep":false}` | Codefresh gitops operator crds |
245239
| gitops-operator.crds.additionalLabels | object | `{}` | Additional labels for gitops operator CRDs |
246240
| gitops-operator.crds.annotations | object | `{}` | Annotations on gitops operator CRDs |
@@ -258,6 +252,7 @@ sealed-secrets:
258252
| gitops-operator.kube-rbac-proxy.resources.requests.memory | string | `"64Mi"` | |
259253
| gitops-operator.kube-rbac-proxy.securityContext.allowPrivilegeEscalation | bool | `false` | |
260254
| gitops-operator.kube-rbac-proxy.securityContext.capabilities.drop[0] | string | `"ALL"` | |
255+
| gitops-operator.libraryMode | bool | `true` | Do not change unless instructed otherwise by Codefresh support |
261256
| gitops-operator.nameOverride | string | `""` | |
262257
| gitops-operator.nodeSelector | object | `{}` | |
263258
| gitops-operator.podAnnotations | object | `{}` | |

charts/gitops-runtime/templates/_helpers.tpl

+17-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ Determine argocd server service name. Must be called with chart root context
8080
{{- template "argo-cd.server.fullname" (dict "Values" (get .Values "argo-cd")) }}
8181
{{- end }}
8282

83+
{{/*
84+
Determine argocd repo server service name. Must be called with chart root context
85+
*/}}
86+
{{- define "codefresh-gitops-runtime.argocd.reposerver.servicename" -}}
87+
{{/* For now use template from ArgoCD chart until better approach */}}
88+
{{- template "argo-cd.repoServer.fullname" (dict "Values" (get .Values "argo-cd")) }}
89+
{{- end }}
90+
91+
{{/*
92+
Determine argocd argocd repo server port
93+
*/}}
94+
{{- define "codefresh-gitops-runtime.argocd.reposerver.serviceport" -}}
95+
{{/* For now use template from ArgoCD chart until better approach */}}
96+
{{- index .Values "argo-cd" "repoServer" "service" "port" }}
97+
{{- end }}
98+
8399
{{/*
84100
Determine argocd servicename. Must be called with chart root context
85101
*/}}
@@ -283,4 +299,4 @@ valueFrom:
283299
key: {{ include "codefresh-gitops-runtime.runtime-gitcreds.password.secretkey" . }}
284300
optional: true
285301
{{- end }}
286-
# ------------------------------------------------------------------------------------------------------------
302+
# ------------------------------------------------------------------------------------------------------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{- if index (get .Values "gitops-operator") "libraryMode" }}
2+
{{- $gitopsOperatorContext := (index .Subcharts "gitops-operator")}}
3+
{{- $argoCDImageDict := index .Subcharts "argo-cd" "Values" "global" "image" }}
4+
{{- if not $argoCDImageDict.tag }}
5+
{{- $_ := set $argoCDImageDict "tag" (get .Subcharts "argo-cd").Chart.AppVersion }}
6+
{{- end }}
7+
8+
9+
{{/* Set ArgoCD image */}}
10+
{{- if not (index .Values "gitops-operator" "argoCdNotifications.imageOverride") }}
11+
{{- $_ := set $gitopsOperatorContext.Values.argoCdNotifications.image "repository" $argoCDImageDict.repository }}
12+
{{- $_ := set $gitopsOperatorContext.Values.argoCdNotifications.image "tag" $argoCDImageDict.tag }}
13+
{{- end }}
14+
15+
{{/* Set repo server service and port */}}
16+
{{- $_ := set $gitopsOperatorContext.Values.argoCdNotifications.argocd.repoServer "fullname" (include "codefresh-gitops-runtime.argocd.reposerver.servicename" . ) }}
17+
{{- $_ := set $gitopsOperatorContext.Values.argoCdNotifications.argocd.repoServer "port" (include "codefresh-gitops-runtime.argocd.reposerver.serviceport" . ) }}
18+
19+
20+
{{/* Set workflows url */}}
21+
{{- if index .Values "argo-workflows" "enabled" }}
22+
{{- if not $gitopsOperatorContext.Values.env.ARGO_WF_URL }}
23+
{{- $argoWorkflowsUrl := include "codefresh-gitops-runtime.argo-workflows.server.url" . }}
24+
{{- $_ := set $gitopsOperatorContext.Values.env "ARGO_WF_URL" $argoWorkflowsUrl }}
25+
{{- end }}
26+
{{- end}}
27+
28+
{{- include "gitops-operator.resources" $gitopsOperatorContext}}
29+
30+
{{- end }}

charts/gitops-runtime/tests/gitops-controller-misc_test.yaml

+107-17
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
suite: misc tests on gitops-operator templates generation
22
templates:
3-
- charts/gitops-operator/templates/deployment.yaml
4-
- charts/gitops-operator/templates/sa.yaml
5-
- charts/gitops-operator/templates/rbac.yaml
3+
- "gitops-operator.yaml"
4+
- charts/gitops-operator/*
65
tests:
76
- it: override both images works
8-
template: 'charts/gitops-operator/templates/deployment.yaml'
7+
template: gitops-operator.yaml
8+
documentSelector:
9+
path: kind
10+
value: Deployment
911
values:
1012
- ./values/mandatory-values.yaml
1113
set:
@@ -26,20 +28,25 @@ tests:
2628
value: example.com/repo:0.0.1
2729

2830
- it: override service account name - sa object
29-
template: 'charts/gitops-operator/templates/sa.yaml'
31+
template: gitops-operator.yaml
3032
values:
3133
- ./values/mandatory-values.yaml
3234
set:
3335
gitops-operator.serviceAccount.name: sa-name
3436
asserts:
35-
- equal:
36-
path: metadata.name
37-
value: sa-name
37+
- containsDocument:
38+
kind: ServiceAccount
39+
apiVersion: v1
40+
name: sa-name
41+
any: true
3842

3943
- it: override service account name - deployment
40-
template: 'charts/gitops-operator/templates/deployment.yaml'
44+
template: 'gitops-operator.yaml'
4145
values:
4246
- ./values/mandatory-values.yaml
47+
documentSelector:
48+
path: kind
49+
value: Deployment
4350
set:
4451
gitops-operator.serviceAccount.name: sa-name
4552
asserts:
@@ -48,7 +55,10 @@ tests:
4855
value: sa-name
4956

5057
- it: overriding of environment variables on main container
51-
template: 'charts/gitops-operator/templates/deployment.yaml'
58+
template: 'gitops-operator.yaml'
59+
documentSelector:
60+
path: kind
61+
value: Deployment
5262
values:
5363
- ./values/mandatory-values.yaml
5464
set:
@@ -59,8 +69,12 @@ tests:
5969
content:
6070
name: PORT
6171
value: "8787"
72+
6273
- it: adding environment variables on main container
63-
template: 'charts/gitops-operator/templates/deployment.yaml'
74+
template: 'gitops-operator.yaml'
75+
documentSelector:
76+
path: kind
77+
value: Deployment
6478
values:
6579
- ./values/mandatory-values.yaml
6680
set:
@@ -71,8 +85,12 @@ tests:
7185
content:
7286
name: SOME_ENV
7387
value: test
88+
7489
- it: setting security context on main container
75-
template: 'charts/gitops-operator/templates/deployment.yaml'
90+
template: 'gitops-operator.yaml'
91+
documentSelector:
92+
path: kind
93+
value: Deployment
7694
values:
7795
- ./values/mandatory-values.yaml
7896
set:
@@ -81,8 +99,12 @@ tests:
8199
- equal:
82100
path: spec.template.spec.containers[1].securityContext.runAsUser
83101
value: 1000
102+
84103
- it: override readiness and liveness probes values
85-
template: 'charts/gitops-operator/templates/deployment.yaml'
104+
template: 'gitops-operator.yaml'
105+
documentSelector:
106+
path: kind
107+
value: Deployment
86108
values:
87109
- ./values/mandatory-values.yaml
88110
set:
@@ -127,8 +149,12 @@ tests:
127149
- equal:
128150
path: spec.template.spec.containers[1].livenessProbe.failureThreshold
129151
value: 1
152+
130153
- it: setting node selector
131-
template: 'charts/gitops-operator/templates/deployment.yaml'
154+
template: 'gitops-operator.yaml'
155+
documentSelector:
156+
path: kind
157+
value: Deployment
132158
values:
133159
- ./values/mandatory-values.yaml
134160
set:
@@ -141,7 +167,10 @@ tests:
141167
test.io/node: "test"
142168

143169
- it: setting tolerations
144-
template: 'charts/gitops-operator/templates/deployment.yaml'
170+
template: 'gitops-operator.yaml'
171+
documentSelector:
172+
path: kind
173+
value: Deployment
145174
values:
146175
- ./values/mandatory-values.yaml
147176
set:
@@ -160,7 +189,10 @@ tests:
160189
effect: "NoSchedule"
161190

162191
- it: setting affinity
163-
template: 'charts/gitops-operator/templates/deployment.yaml'
192+
template: 'gitops-operator.yaml'
193+
documentSelector:
194+
path: kind
195+
value: Deployment
164196
values:
165197
- ./values/mandatory-values.yaml
166198
set:
@@ -189,7 +221,7 @@ tests:
189221
- antarctica-west1
190222

191223
- it: contains all expected roles and role bindings
192-
template: charts/gitops-operator/templates/rbac.yaml
224+
template: gitops-operator.yaml
193225
values:
194226
- ./values/mandatory-values.yaml
195227
asserts:
@@ -248,3 +280,61 @@ tests:
248280
apiVersion: rbac.authorization.k8s.io/v1
249281
name: leader-election
250282
any: true
283+
284+
- it: argocd and workflows overrides for notifications controller
285+
template: gitops-operator.yaml
286+
documentSelector:
287+
path: kind
288+
value: Deployment
289+
values:
290+
- ./values/mandatory-values.yaml
291+
set:
292+
argo-cd.global.image:
293+
repository: "argocd/test"
294+
tag: "test"
295+
argo-cd.fullnameOverride: myargocd
296+
argo-cd.repoServer.service.port: 9080
297+
argo-workflows.enabled: true
298+
argo-workflows.fullnameOverride: argo-test
299+
argo-workflows.server.secure: false
300+
asserts:
301+
- equal:
302+
path: spec.template.spec.containers[2].image
303+
value: argocd/test:test
304+
- contains:
305+
path: spec.template.spec.containers[2].args
306+
content: --argocd-repo-server=myargocd-repo-server:9080
307+
- contains:
308+
path: spec.template.spec.containers[1].env
309+
content:
310+
name: ARGO_WF_URL
311+
value: http://argo-test-server:2746
312+
313+
- it: contains all resources for notifications controller
314+
template: gitops-operator.yaml
315+
values:
316+
- ./values/mandatory-values.yaml
317+
set:
318+
gitops-operator.argoCdNotifications.cm.name: "test-notifications-cm"
319+
gitops-operator.argoCdNotifications.secret.name: "test-notifications-secret"
320+
asserts:
321+
- containsDocument:
322+
kind: ConfigMap
323+
apiVersion: v1
324+
name: test-notifications-cm
325+
any: true
326+
- containsDocument:
327+
kind: Secret
328+
apiVersion: v1
329+
name: test-notifications-secret
330+
any: true
331+
- containsDocument:
332+
kind: ClusterRole
333+
apiVersion: rbac.authorization.k8s.io/v1
334+
name: codefresh-gitops-operator-notifications
335+
any: true
336+
- containsDocument:
337+
kind: ClusterRoleBinding
338+
apiVersion: rbac.authorization.k8s.io/v1
339+
name: codefresh-gitops-operator-notifications
340+
any: true

0 commit comments

Comments
 (0)