From dee9f7de628a3423b587599933f621b014cde2d8 Mon Sep 17 00:00:00 2001 From: Leonardo Murillo Date: Wed, 3 Feb 2021 07:51:58 -0600 Subject: [PATCH] feat(argo-cd): enable support for lifecycle hooks on ArgoCD Server (#547) Signed-off-by: Leonardo Murillo --- charts/argo-cd/Chart.yaml | 2 +- charts/argo-cd/README.md | 1 + charts/argo-cd/templates/argocd-server/deployment.yaml | 4 ++++ charts/argo-cd/values.yaml | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 24e20051..3d447531 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.7.11 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 2.11.7 +version: 2.12.0 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 411692ef..fb6db560 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -224,6 +224,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | server.ingressGrpc.tls | Ingress TLS configuration for dedicated [gRPC-ingress] | `[]` | | server.route.enabled | Enable a OpenShift route for the server | `false` | | server.route.hostname | Hostname of OpenShift route | `""` | +| server.lifecycle | PostStart and PreStop hooks configuration | `{}` | | server.livenessProbe.failureThreshold | [Kubernetes probe configuration](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) | `3` | | server.livenessProbe.initialDelaySeconds | [Kubernetes probe configuration](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) | `10` | | server.livenessProbe.periodSeconds | [Kubernetes probe configuration](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) | `10` | diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index aeec1579..471949e4 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -120,6 +120,10 @@ spec: failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }} resources: {{- toYaml .Values.server.resources | nindent 10 }} + {{- if .Values.server.lifecycle }} + lifecycle: +{{- toYaml .Values.server.lifecycle | nindent 10 }} + {{- end }} {{- if .Values.server.extraContainers }} {{- toYaml .Values.server.extraContainers | nindent 6 }} {{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 0e68c9a7..7e8d00f3 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -366,6 +366,10 @@ server: ## env: [] + ## Specify postStart and preStop lifecycle hooks for your argo-cd-server container + ## + lifecycle: {} + ## Argo server log format: text|json logFormat: text ## Argo server log level