feat(argo-cd): Replace Application Controller StatefullSet with a Deployment and enabled autoscaling
Signed-off-by: SIRICA1 <ricardo.silva@mercedes-benz.io>
This commit is contained in:
parent
9781abdfd8
commit
8f57e93b3d
4 changed files with 62 additions and 16 deletions
|
@ -3,7 +3,7 @@ appVersion: v2.6.4
|
||||||
kubeVersion: ">=1.22.0-0"
|
kubeVersion: ">=1.22.0-0"
|
||||||
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||||
name: argo-cd
|
name: argo-cd
|
||||||
version: 5.25.0
|
version: 5.25.1
|
||||||
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
|
||||||
sources:
|
sources:
|
||||||
|
@ -23,5 +23,5 @@ dependencies:
|
||||||
condition: redis-ha.enabled
|
condition: redis-ha.enabled
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: added
|
- kind: changed
|
||||||
description: Add parameter env to redis exporter
|
description: Replace Application Controller StatefullSet with a Deployment and enabled autoscaling
|
||||||
|
|
|
@ -29,7 +29,9 @@ redis-ha:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
controller:
|
controller:
|
||||||
replicas: 1
|
autoscaling:
|
||||||
|
enabled: true
|
||||||
|
minReplicas: 2
|
||||||
|
|
||||||
server:
|
server:
|
||||||
autoscaling:
|
autoscaling:
|
||||||
|
@ -72,7 +74,7 @@ When installing Argo CD using this helm chart the user should have a similar exp
|
||||||
|
|
||||||
To update the templates and default settings in `values.yaml` it may come in handy to look up the diff of the `manifests/install.yaml` between two versions accordingly. This can either be done directly via github and look for `manifests/install.yaml`:
|
To update the templates and default settings in `values.yaml` it may come in handy to look up the diff of the `manifests/install.yaml` between two versions accordingly. This can either be done directly via github and look for `manifests/install.yaml`:
|
||||||
|
|
||||||
https://github.com/argoproj/argo-cd/compare/v1.8.7...v2.0.0#files_bucket
|
<https://github.com/argoproj/argo-cd/compare/v1.8.7...v2.0.0#files_bucket>
|
||||||
|
|
||||||
Or you clone the repository and do a local `git-diff`:
|
Or you clone the repository and do a local `git-diff`:
|
||||||
|
|
||||||
|
@ -171,9 +173,9 @@ done
|
||||||
|
|
||||||
This version **removes support for**:
|
This version **removes support for**:
|
||||||
|
|
||||||
- deprecated repository credentials (parameter `configs.repositoryCredentials`)
|
* deprecated repository credentials (parameter `configs.repositoryCredentials`)
|
||||||
- option to run application controller as a Deployment
|
* option to run application controller as a Deployment
|
||||||
- the parameters `server.additionalApplications` and `server.additionalProjects`
|
* the parameters `server.additionalApplications` and `server.additionalProjects`
|
||||||
|
|
||||||
Please carefully read the following section if you are using these parameters!
|
Please carefully read the following section if you are using these parameters!
|
||||||
|
|
||||||
|
@ -351,8 +353,8 @@ server:
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Kubernetes: `>=1.22.0-0`
|
* Kubernetes: `>=1.22.0-0`
|
||||||
- Helm v3.0.0+
|
* Helm v3.0.0+
|
||||||
|
|
||||||
## Installing the Chart
|
## Installing the Chart
|
||||||
|
|
||||||
|
@ -956,7 +958,7 @@ server:
|
||||||
|
|
||||||
### Option 2 - Redis HA
|
### Option 2 - Redis HA
|
||||||
|
|
||||||
This option uses the following third-party chart to bootstrap a clustered Redis: https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha.
|
This option uses the following third-party chart to bootstrap a clustered Redis: <https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha>.
|
||||||
For all available configuration options, please read upstream README and/or chart source.
|
For all available configuration options, please read upstream README and/or chart source.
|
||||||
The main options are listed here:
|
The main options are listed here:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
{{- with (mergeOverwrite (deepCopy .Values.global.statefulsetAnnotations) .Values.controller.statefulsetAnnotations) }}
|
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.controller.deploymentAnnotations) }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
@ -11,10 +11,10 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- if not .Values.controller.autoscaling.enabled }}
|
||||||
replicas: {{ .Values.controller.replicas }}
|
replicas: {{ .Values.controller.replicas }}
|
||||||
# TODO: Remove for breaking release as history limit cannot be patched
|
{{- end }}
|
||||||
revisionHistoryLimit: 5
|
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
|
||||||
serviceName: {{ include "argo-cd.controller.fullname" . }}
|
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
|
@ -0,0 +1,44 @@
|
||||||
|
{{- if .Values.controller.autoscaling.enabled }}
|
||||||
|
apiVersion: {{ include "argo-cd.apiVersion.autoscaling" . }}
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" (printf "%s-hpa" .Values.controller.name)) | nindent 4 }}
|
||||||
|
name: {{ template "argo-cd.controller.fullname" . }}-hpa
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ template "argo-cd.controller.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.controller.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
{{- if eq (include "argo-cd.apiVersion.autoscaling" $) "autoscaling/v2beta1" }}
|
||||||
|
targetAverageUtilization: {{ . }}
|
||||||
|
{{- else }}
|
||||||
|
target:
|
||||||
|
averageUtilization: {{ . }}
|
||||||
|
type: Utilization
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }}
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
{{- if eq (include "argo-cd.apiVersion.autoscaling" $) "autoscaling/v2beta1" }}
|
||||||
|
targetAverageUtilization: {{ . }}
|
||||||
|
{{- else }}
|
||||||
|
target:
|
||||||
|
averageUtilization: {{ . }}
|
||||||
|
type: Utilization
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.autoscaling.behavior }}
|
||||||
|
behavior:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
Loading…
Reference in a new issue