Skip to content

Commit dbe3ab0

Browse files
Issue with Pre-Upgrade Hook in Ziti Router Chart When Using ArgoCD (#290)
* allow omitting the identity migration pre-upgrade hook * helm-docs: automated action * rename key in values file for preventing the deployment of helm hooks * helm-docs: automated action * add hint regarding the use of this chart in the context of gitops * helm-docs: automated action --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3d61fcf commit dbe3ab0

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

charts/ziti-router/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,19 @@ identity:
302302
| linkListeners.transport.service.enabled | bool | `true` | create a cluster service for the router transport link listener; unnecessary if advertisedHost is shared with edge listener (the default) |
303303
| linkListeners.transport.service.labels | object | `{}` | service labels |
304304
| linkListeners.transport.service.type | string | `"ClusterIP"` | expose the service as a ClusterIP, NodePort, or LoadBalancer |
305+
| noHelmHooks | bool | `false` | disable the execution of hooks, defined within this chart This chart makes use of Helm hooks. Setting this to true will prevent the hooks from being deployed. This is useful when using the chart with tools like ArgoCD |
305306
| nodeSelector | object | `{}` | deployment template spec node selector |
306307
| persistence.accessMode | string | `"ReadWriteOnce"` | PVC access mode: ReadWriteOnce (concurrent mounts not allowed), ReadWriteMany (concurrent allowed) |
307308
| persistence.annotations | object | `{}` | annotations for the PVC |
308309
| persistence.enabled | bool | `true` | required: place a storage claim for the ctrl endpoints state file |
309310
| persistence.existingClaim | string | `""` | A manually managed Persistent Volume and Claim Requires persistence.enabled: true If defined, PVC must be created manually before volume will be bound |
310-
| persistence.size | string | `"50Mi"` | 50Mi is plenty for this state file |
311+
| persistence.size | string | `"50Mi"` | 50Mi is plenty for this state file |
311312
| persistence.storageClass | string | `""` | Storage class of PV to bind. By default it looks for the default storage class. If the PV uses a different storage class, specify that here. |
312313
| persistence.volumeName | string | `nil` | PVC volume name |
313314
| podAnnotations | object | `{}` | annotations to apply to all pods deployed by this chart |
314315
| podSecurityContext | object | `{"fsGroup":2171}` | deployment template spec security context |
315316
| podSecurityContext.fsGroup | int | `2171` | this is the GID of "ziggy" run-as user in the container that has access to any files created by the router process in the emptyDir volume used to persist the list of ctrl endpoints |
316-
| proxy | object | `{}` | Explicit proxy setting in the router configuration. Router can be deployed in a site where all egress traffic is forwarded through an explicit proxy. The enrollment will also be forwarded through the proxy. |
317+
| proxy | object | `{}` | Explicit proxy setting in the router configuration. Router can be deployed in a site where all egress traffic is forwarded through an explicit proxy. The enrollment will also be forwarded through the proxy. |
317318
| resources | object | `{}` | deployment container resources |
318319
| securityContext | string | `nil` | deployment container security context |
319320
| tolerations | list | `[]` | deployment template spec tolerations |

charts/ziti-router/templates/pre-upgrade-configmap.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
{{if not .Values.noHelmHooks}}
22
---
33
apiVersion: v1
44
kind: ConfigMap
@@ -78,4 +78,5 @@ data:
7878
{{ include "ziti-router.fullname" . }}-identity
7979
else
8080
echo "INFO: identity secret does not exist"
81-
fi
81+
fi
82+
{{end}}

charts/ziti-router/templates/pre-upgrade-job.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{if not .Values.noHelmHooks}}
2+
---
13
apiVersion: batch/v1
24
kind: Job
35
metadata:
@@ -72,3 +74,4 @@ spec:
7274
{{- else }}
7375
emptyDir: {}
7476
{{- end }}
77+
{{end}}

charts/ziti-router/templates/pre-upgrade-serviceaccount.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
{{if not .Values.noHelmHooks}}
2+
---
23
apiVersion: v1
34
kind: ServiceAccount
45
metadata:
@@ -40,3 +41,4 @@ subjects:
4041
- kind: ServiceAccount
4142
name: {{ include "ziti-router.fullname" . }}-hook-serviceaccount
4243
namespace: {{ .Release.Namespace }}
44+
{{end}}

charts/ziti-router/values.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ctrl:
77
# -- required control plane endpoint, e.g., ctrl.ziti.example.com:443
88
endpoint: ""
99

10-
# -- Explicit proxy setting in the router configuration. Router can be deployed in a site
10+
# -- Explicit proxy setting in the router configuration. Router can be deployed in a site
1111
# where all egress traffic is forwarded through an explicit proxy.
1212
# The enrollment will also be forwarded through the proxy.
1313
proxy: {}
@@ -373,6 +373,11 @@ tolerations: []
373373
# -- deployment template spec affinity
374374
affinity: {}
375375

376+
# -- disable the execution of hooks, defined within this chart
377+
# This chart makes use of Helm hooks. Setting this to true will prevent the hooks from being deployed.
378+
# This is useful when using the chart with tools like ArgoCD
379+
noHelmHooks: false
380+
376381
## Enable persistence using Persistent Volume Claims
377382
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
378383
##
@@ -399,7 +404,7 @@ persistence:
399404
volumeName:
400405
# -- PVC access mode: ReadWriteOnce (concurrent mounts not allowed), ReadWriteMany (concurrent allowed)
401406
accessMode: ReadWriteOnce
402-
# -- 50Mi is plenty for this state file
407+
# -- 50Mi is plenty for this state file
403408
size: 50Mi
404409
fabric:
405410
metrics:

0 commit comments

Comments
 (0)