chore(argo-cd): Add chart tests and usage info in README for HA (#951)
* chore: Reconfigure KinD to 1 control-plane and 3 worker nodes This prepares chart testing of 'argo-cd' chart with redis-ha enabled. Redis-ha defines hard pod anti-affinity and requires multiple worker nodes. Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * chore(argo-cd): Add chart tests for HA Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Add HA chapter to README Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Skip HPA tests of ArgoCD Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
parent
7ce743b266
commit
fbea5aa49b
8 changed files with 95 additions and 3 deletions
7
.github/configs/kind-config.yaml
vendored
Normal file
7
.github/configs/kind-config.yaml
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
kind: Cluster
|
||||||
|
apiVersion: kind.x-k8s.io/v1alpha4
|
||||||
|
nodes:
|
||||||
|
- role: control-plane
|
||||||
|
- role: worker
|
||||||
|
- role: worker
|
||||||
|
- role: worker
|
||||||
8
.github/workflows/lint-and-test.yml
vendored
8
.github/workflows/lint-and-test.yml
vendored
|
|
@ -39,6 +39,8 @@ jobs:
|
||||||
- name: Create kind cluster
|
- name: Create kind cluster
|
||||||
uses: helm/kind-action@v1.2.0
|
uses: helm/kind-action@v1.2.0
|
||||||
if: steps.list-changed.outputs.changed == 'true'
|
if: steps.list-changed.outputs.changed == 'true'
|
||||||
|
with:
|
||||||
|
config: .github/configs/kind-config.yaml
|
||||||
|
|
||||||
- name: Deploy latest ArgoCD CRDs when testing ArgoCD extensions
|
- name: Deploy latest ArgoCD CRDs when testing ArgoCD extensions
|
||||||
if: |
|
if: |
|
||||||
|
|
@ -48,6 +50,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
kubectl apply -f charts/argo-cd/crds
|
kubectl apply -f charts/argo-cd/crds
|
||||||
|
|
||||||
|
- name: Skip HPA tests of ArgoCD
|
||||||
|
if: contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
|
||||||
|
run: |
|
||||||
|
## Metrics API not available in kind cluster
|
||||||
|
rm charts/argo-cd/ci/ha-autoscaling-values.yaml
|
||||||
|
|
||||||
- name: Run chart-testing (install)
|
- name: Run chart-testing (install)
|
||||||
run: ct install --config ./.github/configs/ct-install.yaml
|
run: ct install --config ./.github/configs/ct-install.yaml
|
||||||
if: steps.list-changed.outputs.changed == 'true'
|
if: steps.list-changed.outputs.changed == 'true'
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
/*.tgz
|
/*.tgz
|
||||||
output
|
output
|
||||||
|
ci/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
appVersion: 2.1.3
|
appVersion: 2.1.3
|
||||||
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||||
name: argo-cd
|
name: argo-cd
|
||||||
version: 3.25.2
|
version: 3.25.3
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||||
keywords:
|
keywords:
|
||||||
|
|
@ -21,4 +21,4 @@ dependencies:
|
||||||
condition: redis-ha.enabled
|
condition: redis-ha.enabled
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- "[Changed]: Reorganize some files in repo, move applications.yaml and projects.yaml into argocd-configs."
|
- "[Added]: Chart testing for HA setups"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,52 @@ This is a **community maintained** chart. This chart installs [argo-cd](https://
|
||||||
|
|
||||||
The default installation is intended to be similar to the provided ArgoCD [releases](https://github.com/argoproj/argo-cd/releases).
|
The default installation is intended to be similar to the provided ArgoCD [releases](https://github.com/argoproj/argo-cd/releases).
|
||||||
|
|
||||||
This chart currently installs the non-HA version of ArgoCD.
|
## High Availability
|
||||||
|
|
||||||
|
This chart installs the non-HA version of ArgoCD by default. If you want to run ArgoCD in HA mode, you can use one of the example values in the next sections.
|
||||||
|
Please also have a look into the upstream [Operator Manual regarding High Availability](https://argoproj.github.io/argo-cd/operator-manual/high_availability/) to understand how scaling of ArgoCD works in detail.
|
||||||
|
|
||||||
|
> **Warning:**
|
||||||
|
> You need at least 3 worker nodes as the HA mode of redis enforces Pods to run on separate nodes.
|
||||||
|
|
||||||
|
### HA mode with autoscaling
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
redis-ha:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
controller:
|
||||||
|
enableStatefulSet: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 2
|
||||||
|
|
||||||
|
repoServer:
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 2
|
||||||
|
```
|
||||||
|
|
||||||
|
### HA mode without autoscaling
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
redis-ha:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
controller:
|
||||||
|
enableStatefulSet: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
replicas: 2
|
||||||
|
env:
|
||||||
|
- name: ARGOCD_API_SERVER_REPLICAS
|
||||||
|
value: '2'
|
||||||
|
|
||||||
|
repoServer:
|
||||||
|
replicas: 2
|
||||||
|
```
|
||||||
### Synchronizing Changes from Original Repository
|
### Synchronizing Changes from Original Repository
|
||||||
|
|
||||||
In the original [ArgoCD repository](https://github.com/argoproj/argo-cd/) an [`manifests/install.yaml`](https://github.com/argoproj/argo-cd/blob/master/manifests/install.yaml) is generated using `kustomize`. It's the basis for the installation as [described in the docs](https://argo-cd.readthedocs.io/en/stable/getting_started/#1-install-argo-cd).
|
In the original [ArgoCD repository](https://github.com/argoproj/argo-cd/) an [`manifests/install.yaml`](https://github.com/argoproj/argo-cd/blob/master/manifests/install.yaml) is generated using `kustomize`. It's the basis for the installation as [described in the docs](https://argo-cd.readthedocs.io/en/stable/getting_started/#1-install-argo-cd).
|
||||||
|
|
|
||||||
1
charts/argo-cd/ci/default-values.yaml
Normal file
1
charts/argo-cd/ci/default-values.yaml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# Test with default values
|
||||||
16
charts/argo-cd/ci/ha-autoscaling-values.yaml
Normal file
16
charts/argo-cd/ci/ha-autoscaling-values.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Test High Availability with autoscaling
|
||||||
|
redis-ha:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
controller:
|
||||||
|
enableStatefulSet: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 2
|
||||||
|
|
||||||
|
repoServer:
|
||||||
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 2
|
||||||
15
charts/argo-cd/ci/ha-static-values.yaml
Normal file
15
charts/argo-cd/ci/ha-static-values.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Test High Availability without autoscaling
|
||||||
|
redis-ha:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
controller:
|
||||||
|
enableStatefulSet: true
|
||||||
|
|
||||||
|
server:
|
||||||
|
replicas: 2
|
||||||
|
env:
|
||||||
|
- name: ARGOCD_API_SERVER_REPLICAS
|
||||||
|
value: '2'
|
||||||
|
|
||||||
|
repoServer:
|
||||||
|
replicas: 2
|
||||||
Loading…
Add table
Add a link
Reference in a new issue