Skip to content

Commit dfd8b2e

Browse files
patch - private registry external-argocd support and values structure fix (#436)
1 parent a11f00b commit dfd8b2e

33 files changed

+157
-106
lines changed

charts/gitops-runtime/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ The utility will output 4 files into the folder:
103103
3. `values-images-no-tags.yaml` - a values file with all image values with the private registry **excluding tags**. If provided through --values to helm install/upgrade command - it will override all images to use the private registry.
104104
4. `values-images-with-tags.yaml` - The same as 3 but with tags **included**.
105105

106+
For usage with external ArgoCD run the utility with `EXTERNAL_ARGOCD` environment variable set to `true`.
107+
```
108+
docker run -e EXTERNAL_ARGOCD=true -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.0.0 <local_registry>
109+
```
110+
106111
## Openshift
107112

108113
```yaml
@@ -166,14 +171,14 @@ sealed-secrets:
166171
| 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 |
167172
| app-proxy.image.pullPolicy | string | `"IfNotPresent"` | |
168173
| app-proxy.image.repository | string | `"quay.io/codefresh/cap-app-proxy"` | |
169-
| app-proxy.image.tag | string | `"1.3353.1"` | |
174+
| app-proxy.image.tag | string | `"1.3389.0"` | |
170175
| app-proxy.imagePullSecrets | list | `[]` | |
171176
| app-proxy.initContainer.command[0] | string | `"./init.sh"` | |
172177
| app-proxy.initContainer.env | object | `{}` | |
173178
| app-proxy.initContainer.extraVolumeMounts | list | `[]` | Extra volume mounts for init container |
174179
| app-proxy.initContainer.image.pullPolicy | string | `"IfNotPresent"` | |
175180
| app-proxy.initContainer.image.repository | string | `"quay.io/codefresh/cap-app-proxy-init"` | |
176-
| app-proxy.initContainer.image.tag | string | `"1.3336.1"` | |
181+
| app-proxy.initContainer.image.tag | string | `"1.3389.0"` | |
177182
| app-proxy.initContainer.resources.limits | object | `{}` | |
178183
| app-proxy.initContainer.resources.requests.cpu | string | `"0.2"` | |
179184
| app-proxy.initContainer.resources.requests.memory | string | `"256Mi"` | |
@@ -305,13 +310,6 @@ sealed-secrets:
305310
| gitops-operator.fullnameOverride | string | `""` | |
306311
| gitops-operator.image | object | `{}` | |
307312
| gitops-operator.imagePullSecrets | list | `[]` | |
308-
| gitops-operator.kube-rbac-proxy.image.tag | string | `"v0.16.0"` | |
309-
| gitops-operator.kube-rbac-proxy.resources.limits.cpu | string | `"500m"` | |
310-
| gitops-operator.kube-rbac-proxy.resources.limits.memory | string | `"128Mi"` | |
311-
| gitops-operator.kube-rbac-proxy.resources.requests.cpu | string | `"100m"` | |
312-
| gitops-operator.kube-rbac-proxy.resources.requests.memory | string | `"64Mi"` | |
313-
| gitops-operator.kube-rbac-proxy.securityContext.allowPrivilegeEscalation | bool | `false` | |
314-
| gitops-operator.kube-rbac-proxy.securityContext.capabilities.drop[0] | string | `"ALL"` | |
315313
| gitops-operator.libraryMode | bool | `true` | Do not change unless instructed otherwise by Codefresh support |
316314
| gitops-operator.nameOverride | string | `""` | |
317315
| gitops-operator.nodeSelector | object | `{}` | |
@@ -321,6 +319,12 @@ sealed-secrets:
321319
| gitops-operator.resources.limits | object | `{}` | |
322320
| gitops-operator.resources.requests.cpu | string | `"100m"` | |
323321
| gitops-operator.resources.requests.memory | string | `"128Mi"` | |
322+
| gitops-operator.resources.resources.limits.cpu | string | `"500m"` | |
323+
| gitops-operator.resources.resources.limits.memory | string | `"128Mi"` | |
324+
| gitops-operator.resources.resources.requests.cpu | string | `"100m"` | |
325+
| gitops-operator.resources.resources.requests.memory | string | `"64Mi"` | |
326+
| gitops-operator.resources.securityContext.allowPrivilegeEscalation | bool | `false` | |
327+
| gitops-operator.resources.securityContext.capabilities.drop[0] | string | `"ALL"` | |
324328
| gitops-operator.serviceAccount.annotations | object | `{}` | |
325329
| gitops-operator.serviceAccount.create | bool | `true` | |
326330
| gitops-operator.serviceAccount.name | string | `"gitops-operator-controller-manager"` | |

charts/gitops-runtime/README.md.gotmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ The utility will output 4 files into the folder:
104104
3. `values-images-no-tags.yaml` - a values file with all image values with the private registry **excluding tags**. If provided through --values to helm install/upgrade command - it will override all images to use the private registry.
105105
4. `values-images-with-tags.yaml` - The same as 3 but with tags **included**.
106106

107+
108+
For usage with external ArgoCD run the utility with `EXTERNAL_ARGOCD` environment variable set to `true`.
109+
```
110+
docker run -e EXTERNAL_ARGOCD=true -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:{{ template "chart.version" . }} <local_registry>
111+
```
112+
113+
107114
## Openshift
108115

109116
```yaml
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Values file used to render all image values
2+
global:
3+
codefresh:
4+
accountId: 628a80b693a15c0f9c13ab75 # Codefresh Account id for ilia-codefresh for now, needs to be some test account
5+
gitIntegration:
6+
provider:
7+
name: 'GITHUB'
8+
apiUrl: 'https://api.github.com'
9+
userToken:
10+
secretKeyRef:
11+
name: mysecret
12+
key: myvalue
13+
optional: true
14+
15+
runtime:
16+
name: default
17+
18+
ingress:
19+
enabled: false
20+
21+
repoCredentialsTemplate:
22+
url: 'https://github.com'
23+
username: 'username'
24+
password: 'dummy'
25+
26+
argo-rollouts:
27+
dashboard:
28+
enabled: true
29+
30+
argo-cd:
31+
enabled: false
32+
33+
garage-workflows-artifact-storage:
34+
enabled: true

charts/gitops-runtime/templates/app-proxy/config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{{ $argoCdUrl := include "codefresh-gitops-runtime.argocd.server.url" . }}
33
{{ $argoCdUsername := include "codefresh-gitops-runtime.argocd.server.username-cm" . }}
44
{{ $appProxyContext := deepCopy . }}
5-
{{ $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
6-
{{ $_ := set $appProxyContext.Values "global" (get .Values "global") }}
5+
{{ $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
6+
{{ $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
77
{{- if not $appProxyContext.Values.config.argoCdUrl }}
88
{{ $_ := set $appProxyContext.Values.config "argoCdUrl" $argoCdUrl }}
99
{{- end }}
@@ -14,7 +14,7 @@
1414
{{- $_ := set $appProxyContext.Values.config "argoWorkflowsUrl" $argoWorkflowsUrl }}
1515
{{- end }}
1616
{{- end}}
17-
{{- if not (index .Values "argo-cd" "enabled") }}
17+
{{- if not (index $.Values "argo-cd" "enabled") }}
1818
{{- $_ := set $appProxyContext.Values.config "isExternalArgoCD" "true" }}
1919
{{- else }}
2020
{{- $_ := set $appProxyContext.Values.config "isExternalArgoCD" "false" }}

charts/gitops-runtime/templates/app-proxy/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $appProxyContext := deepCopy . }}
2-
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3-
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
2+
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
3+
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
44
{{- $_ := set $appProxyContext.Values "argo-cd" (get .Values "argo-cd") }}
55

66
{{/* Merge environment variables with the ones in _app-proxy-env.yaml */}}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{{- $appProxyContext := deepCopy . }}
2-
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3-
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
2+
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
3+
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
44
{{- if (index (get $appProxyContext "Values") "image-enrichment" "enabled") }}
55
{{- include "cap-app-proxy.image-enrichment.resources.role" $appProxyContext }}
66
---
77
{{- include "cap-app-proxy.image-enrichment.resources.role-binding" $appProxyContext }}
8-
{{- end }}
8+
{{- end }}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $appProxyContext := deepCopy . }}
2-
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3-
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
2+
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
3+
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
44
{{- if (index (get $appProxyContext "Values") "image-enrichment" "enabled") }}
55
{{- include "cap-app-proxy.image-enrichment.resources.sa" $appProxyContext }}
6-
{{- end }}
6+
{{- end }}

charts/gitops-runtime/templates/app-proxy/pdb.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $appProxyContext := deepCopy . }}
2-
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3-
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
2+
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
3+
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
44

55
{{- if $appProxyContext.Values.pdb.enabled }}
66
{{- include "cap-app-proxy.resources.pdb" $appProxyContext }}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{{- $appProxyContext := deepCopy . }}
2-
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3-
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
4-
{{- include "cap-app-proxy.resources.rbac" $appProxyContext }}
2+
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
3+
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
4+
{{- include "cap-app-proxy.resources.rbac" $appProxyContext }}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{{- $appProxyContext := deepCopy . }}
2-
{{- $_ := set $appProxyContext "Values" (get .Values "app-proxy") }}
3-
{{- $_ := set $appProxyContext.Values "global" (get .Values "global") }}
4-
{{- include "cap-app-proxy.resources.service" $appProxyContext }}
2+
{{- $_ := set $appProxyContext "Values" (deepCopy (get .Values "app-proxy")) }}
3+
{{- $_ := set $appProxyContext.Values "global" (deepCopy (get .Values "global")) }}
4+
{{- include "cap-app-proxy.resources.service" $appProxyContext }}

0 commit comments

Comments
 (0)