Skip to content

Commit

Permalink
[bitnami/argo-cd] Make it possible to run ArgoCD in HA mode (#27585)
Browse files Browse the repository at this point in the history
* [bitnami/argo-cd] Add option to install application controller as stateful set

Signed-off-by: Max Nitze <max.nitze@mgm-tp.com>

* [bitnami/argo-cd] Add replica env variables to app controller and server

Signed-off-by: Max Nitze <max.nitze@mgm-tp.com>

* [bitnami/argo-cd] Add support for dynamic cluster distribution

https://argo-cd.readthedocs.io/en/stable/operator-manual/dynamic-cluster-distribution/
Signed-off-by: Max Nitze <max.nitze@mgm-tp.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* [bitnami/argo-cd] Fix indentation of pod template and add missing podLabels variable

Signed-off-by: Max Nitze <max.nitze@mgm-tp.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* [bitnami/argo-cd] Fail the rendering of the chart when there are validation messages

Signed-off-by: Max Nitze <max.nitze@mgm-tp.com>

---------

Signed-off-by: Max Nitze <max.nitze@mgm-tp.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Max Nitze <max.nitze@mgm-tp.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
  • Loading branch information
3 people authored Jul 12, 2024
1 parent e924679 commit 8d231f8
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 244 deletions.
8 changes: 6 additions & 2 deletions bitnami/argo-cd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 6.5.8 (2024-07-08)
## 6.6.0 (2024-07-11)

* [bitnami/argo-cd] fix: Use the right port name for livenessProbe. ([#27253](https://github.com/bitnami/charts/pull/27253))
* [bitnami/argo-cd] Make it possible to run ArgoCD in HA mode ([#27585](https://github.com/bitnami/charts/pull/27585))

## <small>6.5.8 (2024-07-08)</small>

* [bitnami/argo-cd] fix: Use the right port name for livenessProbe. (#27253) ([516d67a](https://github.com/bitnami/charts/commit/516d67a0e6c7f6a24fab5d6c000c0c0de27bdd58)), closes [#27253](https://github.com/bitnami/charts/issues/27253)

## <small>6.5.7 (2024-07-05)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ maintainers:
name: argo-cd
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/argo-cd
version: 6.5.8
version: 6.6.0
4 changes: 4 additions & 0 deletions bitnami/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ As an alternative, use one of the preset configurations for pod affinity, pod an

| Name | Description | Value |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `controller.kind` | Kind to deploy ArgoCD application controller in. | `Deployment` |
| `controller.replicaCount` | Number of Argo CD replicas to deploy | `1` |
| `controller.startupProbe.enabled` | Enable startupProbe on Argo CD nodes | `false` |
| `controller.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` |
Expand Down Expand Up @@ -429,6 +430,8 @@ As an alternative, use one of the preset configurations for pod affinity, pod an
| `controller.defaultArgs.selfHealTimeout` | Default self heal timeout for Argo CD controller | `5` |
| `controller.args` | Override default container args (useful when using custom images). Overrides the defaultArgs. | `[]` |
| `controller.extraArgs` | Add extra arguments to the default arguments for the Argo CD controller | `[]` |
| `controller.dynamicClusterDistribution.enabled` | Whether dynamic cluster distribution is enabled. | `false` |
| `controller.dynamicClusterDistribution.heartbeatDuration` | Time to update the cluster sharding (defaults to 10 seconds). | `""` |
| `controller.automountServiceAccountToken` | Mount Service Account token in pod | `true` |
| `controller.hostAliases` | Argo CD pods host aliases | `[]` |
| `controller.podLabels` | Extra labels for Argo CD pods | `{}` |
Expand All @@ -448,6 +451,7 @@ As an alternative, use one of the preset configurations for pod affinity, pod an
| `controller.priorityClassName` | Argo CD pods' priorityClassName | `""` |
| `controller.runtimeClassName` | Name of the runtime class to be used by pod(s) | `""` |
| `controller.lifecycleHooks` | for the Argo CD container(s) to automate configuration before or after startup | `{}` |
| `controller.podManagementPolicy` | podManagementPolicy to manage scaling operation of pods (only in StatefulSet mode) | `""` |
| `controller.extraEnvVars` | Array with extra environment variables to add to Argo CD nodes | `[]` |
| `controller.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Argo CD nodes | `""` |
| `controller.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Argo CD nodes | `""` |
Expand Down
18 changes: 18 additions & 0 deletions bitnami/argo-cd/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,19 @@ Return the Redis&reg; port
{{- end -}}
{{- end -}}

{{/*
Validate Application Controller config
*/}}
{{- define "argocd.validateValues.controller.config" -}}
{{- if gt (int .Values.controller.replicaCount) 1 }}
{{- if and .Values.controller.dynamicClusterDistribution.enabled (not (eq .Values.controller.kind "Deployment")) }}
Argo CD: When running in HA mode with dynamic cluster distribution enabled, the application controller must be installed as a Deployment.
{{- else if and (not .Values.controller.dynamicClusterDistribution.enabled) (not (eq .Values.controller.kind "StatefulSet")) }}
Argo CD: When running in HA mode, the application controller must be installed as a StatefulSet.
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Validate Redis config
*/}}
Expand Down Expand Up @@ -316,10 +329,15 @@ Compile all warnings into a single message.
*/}}
{{- define "argocd.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "argocd.validateValues.controller.config" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.dex.config" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.clusterCredentials" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.externalRedis" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.redis" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}

{{- if $message -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
{{- end -}}
{{- end -}}
Loading

0 comments on commit 8d231f8

Please sign in to comment.