From 44acc3cde7d04bc2bfa8b8613defcff49bbd32f4 Mon Sep 17 00:00:00 2001 From: Elliot Maincourt Date: Mon, 13 Sep 2021 18:21:04 +0200 Subject: [PATCH 01/11] feat(argo-workflows): Add controller containerRuntimeExecutors param to configmap (#924) * feat(argo-workflows): Add controller containerRuntimeExecutors param to configmap Signed-off-by: Elliot Maincourt * fix(chart): changes are not cumulative Signed-off-by: Elliot Maincourt --- charts/argo-workflows/Chart.yaml | 4 ++-- .../templates/controller/workflow-controller-config-map.yaml | 4 ++++ charts/argo-workflows/values.yaml | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index 57659f23..cb5f3fe9 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.5.0 +version: 0.5.1 appVersion: "v3.1.8" icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,4 +15,4 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Added]: Add controller namespaceParallelism param to configmap" + - "[Added]: Add controller containerRuntimeExecutors param to configmap" diff --git a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml index ce6f166b..36ecf638 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml @@ -14,6 +14,10 @@ data: {{- end }} {{- end }} containerRuntimeExecutor: {{ .Values.controller.containerRuntimeExecutor }} + {{- with .Values.controller.containerRuntimeExecutors }} + containerRuntimeExecutors: + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.controller.parallelism }} parallelism: {{ .Values.controller.parallelism }} {{- end }} diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index cbbe9491..8e195b47 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -113,6 +113,11 @@ controller: workflowNamespaces: - default containerRuntimeExecutor: docker + # containerRuntimeExecutors: + # - name: emissary + # selector: + # matchLabels: + # workflows.argoproj.io/container-runtime-executor: emissary instanceID: # `instanceID.enabled` configures the controller to filter workflow submissions # to only those which have a matching instanceID attribute. From a801d55710a704b1c155f4c146e6ead6a546d8e7 Mon Sep 17 00:00:00 2001 From: keiSunagawa Date: Wed, 15 Sep 2021 19:30:54 +0900 Subject: [PATCH 02/11] fix(argo-cd): global podLabels/podAnnotations object unexpected merge (#930) * fix(argo-cd): global podLabels/podAnnotations object unexpected merge Signed-off-by: keiSunagawa * fix change log typo Signed-off-by: keiSunagawa --- charts/argo-cd/Chart.yaml | 4 ++-- .../templates/argocd-application-controller/deployment.yaml | 4 ++-- charts/argo-cd/templates/argocd-repo-server/deployment.yaml | 4 ++-- charts/argo-cd/templates/argocd-server/deployment.yaml | 4 ++-- charts/argo-cd/templates/dex/deployment.yaml | 4 ++-- charts/argo-cd/templates/redis/deployment.yaml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 58cd634e..d52a3863 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.17.6 +version: 3.17.7 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-cd/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Upgrade argocd to 2.1.2" + - "[Fixed]: global podLabels/podAnnotations object unexpected merge" diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index a75c1af1..b188892b 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -17,14 +17,14 @@ spec: replicas: {{ .Values.controller.replicas }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.controller.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.controller.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.controller.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.controller.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 9b4c3400..07553973 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -16,14 +16,14 @@ spec: {{- end }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.repoServer.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.repoServer.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.repoServer.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.repoServer.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 05d1a5ae..cbb31207 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -16,14 +16,14 @@ spec: {{- end }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.server.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.server.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.server.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.server.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 97951d01..6eb0281b 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -12,14 +12,14 @@ spec: {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.dex.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.dex.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 8 }} app.kubernetes.io/version: {{ .Values.dex.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.dex.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.dex.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 05d9f43d..9ad7d662 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -13,14 +13,14 @@ spec: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.redis.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.redis.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }} app.kubernetes.io/version: {{ .Values.redis.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.redis.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.redis.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: From 7274e3a094efe9d8ea3a97cde26fe331354b10d2 Mon Sep 17 00:00:00 2001 From: bderdiarian Date: Wed, 15 Sep 2021 15:27:03 -0700 Subject: [PATCH 03/11] feat(argo-workflows): Adding initialDelay param to controller configmap (#926) * Adding initialDelay param to controller configmap Signed-off-by: Brian Derdiarian * Fixing change log Signed-off-by: Brian Derdiarian * Ticking up chart version Signed-off-by: Brian Derdiarian Signed-off-by: brianderdiarian Co-authored-by: Vlad Losev --- charts/argo-workflows/Chart.yaml | 4 ++-- .../templates/controller/workflow-controller-config-map.yaml | 3 +++ charts/argo-workflows/values.yaml | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index cb5f3fe9..f05be3e9 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.5.1 +version: 0.5.2 appVersion: "v3.1.8" icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,4 +15,4 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Added]: Add controller containerRuntimeExecutors param to configmap" + - "[Added]: Add controller initialDelay param to configmap" diff --git a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml index 36ecf638..86c7b709 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml @@ -24,6 +24,9 @@ data: {{- with .Values.controller.namespaceParallelism }} namespaceParallelism: {{ . }} {{- end }} + {{- with .Values.controller.initialDelay }} + initialDelay: {{ . }} + {{- end }} {{- if or .Values.executor.resources .Values.executor.env .Values.executor.securityContext}} executor: {{- with .Values.executor.resources }} diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index 8e195b47..f87b3364 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -44,6 +44,8 @@ controller: parallelism: # Limits the maximum number of incomplete workflows in a namespace namespaceParallelism: + # Resolves ongoing, uncommon AWS EKS bug: https://github.com/argoproj/argo-workflows/pull/4224 + initialDelay: # podAnnotations is an optional map of annotations to be applied to the controller Pods podAnnotations: {} # Optional labels to add to the controller pods From d96cb02a432a9c9d88bdbb2b6ebfc536a57974a7 Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Thu, 16 Sep 2021 19:30:36 +0200 Subject: [PATCH 04/11] fix(argocd-image-updater): Add scratch space for /tmp (#933) Signed-off-by: Marco Kilchhofer --- charts/argocd-image-updater/Chart.yaml | 4 ++-- charts/argocd-image-updater/templates/deployment.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/argocd-image-updater/Chart.yaml b/charts/argocd-image-updater/Chart.yaml index 1ace2616..aecbdb89 100644 --- a/charts/argocd-image-updater/Chart.yaml +++ b/charts/argocd-image-updater/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-image-updater description: A Helm chart for Argo CD Image Updater, a tool to automatically update the container images of Kubernetes workloads which are managed by Argo CD type: application -version: 0.1.0 +version: 0.1.1 appVersion: v0.10.1 home: https://github.com/argoproj-labs/argocd-image-updater icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png @@ -15,4 +15,4 @@ maintainers: url: https://argoproj.github.io/ annotations: artifacthub.io/changes: | - - "[Added]: First chart release" + - "[Fixed]: Add scratch space (emptyDir) for /tmp" diff --git a/charts/argocd-image-updater/templates/deployment.yaml b/charts/argocd-image-updater/templates/deployment.yaml index cfc350ec..515de34b 100644 --- a/charts/argocd-image-updater/templates/deployment.yaml +++ b/charts/argocd-image-updater/templates/deployment.yaml @@ -74,6 +74,8 @@ spec: volumeMounts: - mountPath: /app/config name: registries-conf + - mountPath: /tmp + name: tmp-dir volumes: - configMap: items: @@ -81,6 +83,8 @@ spec: path: registries.conf name: argocd-image-updater-config name: registries-conf + - emptyDir: {} + name: tmp-dir {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} From f10234f340d4f7e2858efbc9bd7b95453c931d0e Mon Sep 17 00:00:00 2001 From: Takumi Sue <23391543+mikutas@users.noreply.github.com> Date: Fri, 17 Sep 2021 02:59:20 +0900 Subject: [PATCH 05/11] feat(argo-cd): add extraContainers to pods besides server (#927) * feat(argo-cd): add extraContainers to pods besides server Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 ++-- charts/argo-cd/README.md | 4 ++++ .../argocd-application-controller/deployment.yaml | 5 ++++- .../templates/argocd-repo-server/deployment.yaml | 5 ++++- .../argo-cd/templates/argocd-server/deployment.yaml | 12 ++++++------ charts/argo-cd/templates/dex/deployment.yaml | 5 ++++- charts/argo-cd/templates/redis/deployment.yaml | 3 +++ charts/argo-cd/values.yaml | 11 +++++++++++ 8 files changed, 38 insertions(+), 11 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index d52a3863..f37108cf 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.17.7 +version: 3.18.0 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-cd/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Fixed]: global podLabels/podAnnotations object unexpected merge" + - "[Added]: extraContainers values were added to pods besides server" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 99114a91..0a9f5cad 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -188,6 +188,7 @@ NAME: my-release | controller.clusterAdminAccess.enabled | Enable RBAC for local cluster deployments. | `true` | | controller.containerPort | Controller listening port. | `8082` | | controller.extraArgs | Additional arguments for the controller. A list of flags | `[]` | +| controller.extraContainers | Additional containers for the controller. A list of containers. | `[]` | | controller.enableStatefulSet | Enable deploying the controller as a StatefulSet instead of a Deployment. Used for HA installations. | `false` | | controller.env | Environment variables for the controller. | `[]` | | controller.envFrom | `envFrom` to pass to the controller. | `[]` (See [values.yaml](values.yaml)) | @@ -243,6 +244,7 @@ NAME: my-release | repoServer.autoscaling.targetMemoryUtilizationPercentage | Average memory utilization percentage for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `50` | | repoServer.containerPort | Repo server port | `8081` | | repoServer.extraArgs | Additional arguments for the repo server. A list of flags. | `[]` | +| repoServer.extraContainers | Additional containers for the repo server. A list of containers. | `[]` | | repoServer.env | Environment variables for the repo server. | `[]` | | repoServer.envFrom | `envFrom` to pass to the repo server. | `[]` (See [values.yaml](values.yaml)) | | repoServer.image.repository | Repository to use for the repo server | `global.image.repository` | @@ -402,6 +404,7 @@ NAME: my-release | dex.metrics.serviceMonitor.relabelings | Prometheus [RelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before scraping | `[]` | | dex.metrics.serviceMonitor.metricRelabelings | Prometheus [MetricRelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion | `[]` | | dex.name | Dex name | `"dex-server"` | +| dex.extraContainers | Additional containers for the Dex server. A list of containers. | `[]` | | dex.env | Environment variables for the Dex server. | `[]` | | dex.envFrom | `envFrom` to pass to the Dex server. | `[]` (See [values.yaml](values.yaml)) | | dex.nodeSelector | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | `{}` | @@ -449,6 +452,7 @@ through `xxx.extraArgs` | redis.image.repository | Redis repository | `"redis"` | | redis.image.tag | Redis tag | `"6.2.1-alpine"` | | redis.extraArgs | Additional arguments for the `redis-server`. A list of flags. | `[]` | +| redis.extraContainers | Additional containers for the redis. A list of containers. | `[]` | | redis.name | Redis name | `"redis"` | | redis.env | Environment variables for the Redis server. | `[]` | | redis.envFrom | `envFrom` to pass to the Redis server. | `[]` (See [values.yaml](values.yaml)) | diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index b188892b..f0ab071f 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -105,7 +105,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} resources: -{{- toYaml .Values.controller.resources | nindent 10 }} + {{- toYaml .Values.controller.resources | nindent 10 }} + {{- with .Values.controller.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.controller.nodeSelector }} nodeSelector: {{- toYaml .Values.controller.nodeSelector | nindent 8 }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 07553973..38cbfcb0 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -113,7 +113,10 @@ spec: successThreshold: {{ .Values.repoServer.readinessProbe.successThreshold }} failureThreshold: {{ .Values.repoServer.readinessProbe.failureThreshold }} resources: -{{- toYaml .Values.repoServer.resources | nindent 10 }} + {{- toYaml .Values.repoServer.resources | nindent 10 }} + {{- with .Values.controller.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.repoServer.nodeSelector }} nodeSelector: {{- toYaml .Values.repoServer.nodeSelector | nindent 8 }} diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index cbb31207..771e7c3b 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -120,14 +120,14 @@ spec: successThreshold: {{ .Values.server.readinessProbe.successThreshold }} failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }} resources: -{{- toYaml .Values.server.resources | nindent 10 }} - {{- if .Values.server.lifecycle }} + {{- toYaml .Values.server.resources | nindent 10 }} + {{- if .Values.server.lifecycle }} lifecycle: -{{- toYaml .Values.server.lifecycle | nindent 10 }} + {{- toYaml .Values.server.lifecycle | nindent 10 }} + {{- end }} + {{- with .Values.server.extraContainers }} + {{- toYaml . | nindent 6 }} {{- end }} - {{- if .Values.server.extraContainers }} -{{- toYaml .Values.server.extraContainers | nindent 6 }} - {{- end }} {{- if .Values.server.nodeSelector }} nodeSelector: {{- toYaml .Values.server.nodeSelector | nindent 8 }} diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 6eb0281b..9c409399 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -99,7 +99,10 @@ spec: {{- toYaml .Values.dex.volumeMounts | nindent 8 }} {{- end }} resources: -{{- toYaml .Values.dex.resources | nindent 10 }} + {{- toYaml .Values.dex.resources | nindent 10 }} + {{- with .Values.dex.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.dex.nodeSelector }} nodeSelector: {{- toYaml .Values.dex.nodeSelector | nindent 8 }} diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 9ad7d662..77169592 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -64,6 +64,9 @@ spec: {{- end }} resources: {{- toYaml .Values.redis.resources | nindent 10 }} + {{- with .Values.redis.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.redis.nodeSelector }} nodeSelector: {{- toYaml .Values.redis.nodeSelector | nindent 8 }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 022ecfb2..38421dad 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -220,6 +220,8 @@ controller: enabled: false rules: [] + ## Additional containers to be added to the controller pod. + extraContainers: [] ## Dex dex: @@ -339,6 +341,9 @@ dex: # cpu: 10m # memory: 32Mi + ## Additional containers to be added to the dex pod. + extraContainers: [] + ## Redis redis: enabled: true @@ -419,6 +424,9 @@ redis: volumeMounts: [] volumes: [] + ## Additional containers to be added to the redis pod. + extraContainers: [] + # This key configures Redis-HA subchart and when enabled (redis-ha.enabled=true) # the custom redis deployment is omitted redis-ha: @@ -992,6 +1000,9 @@ repoServer: ## Automount API credentials for the Service Account automountServiceAccountToken: true + ## Additional containers to be added to the repo server pod. + extraContainers: [] + ## Repo server rbac rules # rbac: # - apiGroups: From 258ad7fa648c98d1165321129662940fba5ff52f Mon Sep 17 00:00:00 2001 From: sgavrylenko <13081190+sgavrylenko@users.noreply.github.com> Date: Thu, 16 Sep 2021 21:59:39 +0300 Subject: [PATCH 06/11] feat(argocd-image-updater): Add custom environment variables (#874) * feat(argocd-notifications): Add example for defaultTriggers (#871) * extending chart by optional defaultTriggers Signed-off-by: shortsn * #871 adjustments according review comments Signed-off-by: shortsn * #871 rework using existing field Signed-off-by: shortsn * #871 fixing linebreaks Signed-off-by: shortsn * #871 adjusting version Signed-off-by: shortsn Signed-off-by: Sergiy Gavrylenko * feat(argocd-image-updater): Add custom environment variable Signed-off-by: Sergiy Gavrylenko * feat(argocd-image-updater): Add custom environment variables Signed-off-by: Sergiy Gavrylenko * Revert "feat(argocd-image-updater): Add custom environment variable" This reverts commit c6146d942c97dc694aa7777ec73d649afba1b4ab. Signed-off-by: Sergiy Gavrylenko * feat(argocd-image-updater): Add custom environment variables into deployment Signed-off-by: Sergiy Gavrylenko * chore: Rework PR Signed-off-by: Marco Kilchhofer Co-authored-by: shortsn Co-authored-by: Sergiy Gavrylenko Co-authored-by: Marco Kilchhofer Co-authored-by: Marko Bevc --- charts/argocd-image-updater/Chart.yaml | 4 ++-- charts/argocd-image-updater/README.md | 1 + charts/argocd-image-updater/templates/deployment.yaml | 3 +++ charts/argocd-image-updater/values.yaml | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/argocd-image-updater/Chart.yaml b/charts/argocd-image-updater/Chart.yaml index aecbdb89..bf652d50 100644 --- a/charts/argocd-image-updater/Chart.yaml +++ b/charts/argocd-image-updater/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-image-updater description: A Helm chart for Argo CD Image Updater, a tool to automatically update the container images of Kubernetes workloads which are managed by Argo CD type: application -version: 0.1.1 +version: 0.2.0 appVersion: v0.10.1 home: https://github.com/argoproj-labs/argocd-image-updater icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png @@ -15,4 +15,4 @@ maintainers: url: https://argoproj.github.io/ annotations: artifacthub.io/changes: | - - "[Fixed]: Add scratch space (emptyDir) for /tmp" + - "[Added]: Ability to provide custom environment variables" diff --git a/charts/argocd-image-updater/README.md b/charts/argocd-image-updater/README.md index d3440dd6..a3c97ced 100644 --- a/charts/argocd-image-updater/README.md +++ b/charts/argocd-image-updater/README.md @@ -67,6 +67,7 @@ The `config.registries` value can be used exactly as it looks in the documentati | config.logLevel | string | `"info"` | ArgoCD Image Update log level | | config.registries | list | `[]` | ArgoCD Image Updater registries list configuration. More information [here](https://argocd-image-updater.readthedocs.io/en/stable/configuration/registries/) | | extraArgs | list | `[]` | Extra arguments for argocd-image-updater not defined in config.argocd | +| extraEnv | list | `[]` | Extra environment variables for argocd-image-updater | | fullnameOverride | string | `""` | Global fullname (argocd-image-updater.fullname in _helpers.tpl) override | | image.pullPolicy | string | `"Always"` | Default image pull policy | | image.repository | string | `"argoprojlabs/argocd-image-updater"` | Default image repository | diff --git a/charts/argocd-image-updater/templates/deployment.yaml b/charts/argocd-image-updater/templates/deployment.yaml index 515de34b..d19ecf4e 100644 --- a/charts/argocd-image-updater/templates/deployment.yaml +++ b/charts/argocd-image-updater/templates/deployment.yaml @@ -51,6 +51,9 @@ spec: optional: true - name: IMAGE_UPDATER_LOGLEVEL value: {{ .Values.config.logLevel }} + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 10 }} + {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" diff --git a/charts/argocd-image-updater/values.yaml b/charts/argocd-image-updater/values.yaml index f939137c..c6bbf4d4 100644 --- a/charts/argocd-image-updater/values.yaml +++ b/charts/argocd-image-updater/values.yaml @@ -27,6 +27,11 @@ extraArgs: [] # - --once # - --registries-conf-path /app/config/registries.conf +# -- Extra environment variables for argocd-image-updater +extraEnv: [] + # - name: AWS_REGION + # value: "us-west-1" + config: # Described in detail here https://argocd-image-updater.readthedocs.io/en/stable/install/running/#flags argocd: From 91aaaf066f1b756c20b27b9e1d464412e415ed7c Mon Sep 17 00:00:00 2001 From: siddharth Date: Fri, 17 Sep 2021 00:35:49 +0530 Subject: [PATCH 07/11] fix(argo-rollouts): use `image.tag` in labels if provided (#913) * argod-rollouts: fix app version label Signed-off-by: sedflix * bump chart and add changelog Signed-off-by: sedflix --- charts/argo-rollouts/Chart.yaml | 4 ++-- charts/argo-rollouts/templates/_helpers.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 74431538..dccdbeeb 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.0.2" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 2.0.1 +version: 2.0.2 icon: https://argoproj.github.io/argo-rollouts/assets/logo.png home: https://github.com/argoproj/argo-helm maintainers: @@ -11,4 +11,4 @@ maintainers: - name: jessesuen annotations: artifacthub.io/changes: | - - "[Fixed]: ServiceMonitor selector labels match metrics Service" + - "[Fixed]: use image.tag in app labels if provided" diff --git a/charts/argo-rollouts/templates/_helpers.tpl b/charts/argo-rollouts/templates/_helpers.tpl index 2e5153b5..f3611889 100644 --- a/charts/argo-rollouts/templates/_helpers.tpl +++ b/charts/argo-rollouts/templates/_helpers.tpl @@ -38,7 +38,7 @@ Common labels helm.sh/chart: {{ include "argo-rollouts.chart" . }} {{ include "argo-rollouts.selectorLabels" . }} {{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +app.kubernetes.io/version: {{ default .Chart.AppVersion $.Values.controller.image.tag | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: argo-rollouts From 804cd4ec5479d7faa5757b4f7a82ebc3cb4ad3a6 Mon Sep 17 00:00:00 2001 From: Sander van Schie Date: Fri, 17 Sep 2021 15:57:26 +0200 Subject: [PATCH 08/11] feat(argo-cd): Add support for topologySpreadConstraints (#917) * feat(argo-cd): Add support for topologySpreadConstraints Signed-off-by: Sander van Schie * Apply suggestions from code review Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 +- charts/argo-cd/README.md | 5 +++ .../deployment.yaml | 11 +++++ .../argocd-repo-server/deployment.yaml | 11 +++++ .../templates/argocd-server/deployment.yaml | 11 +++++ charts/argo-cd/templates/dex/deployment.yaml | 11 +++++ .../argo-cd/templates/redis/deployment.yaml | 11 +++++ charts/argo-cd/values.yaml | 40 +++++++++++++++++++ 8 files changed, 102 insertions(+), 2 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index f37108cf..30488923 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.18.0 +version: 3.19.0 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-cd/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Added]: extraContainers values were added to pods besides server" + - "[Added]: Add support for topologySpreadConstraints" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 0a9f5cad..5e1459a2 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -181,6 +181,7 @@ NAME: my-release | Parameter | Description | Default | |-----|---------|-------------| | controller.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| controller.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | controller.args.operationProcessors | define the controller `--operation-processors` | `"10"` | | controller.args.appResyncPeriod | define the controller `--app-resync` | `"180"` | | controller.args.selfHealTimeout | define the controller `--self-heal-timeout-seconds` | `"5"` | @@ -237,6 +238,7 @@ NAME: my-release | Property | Description | Default | |-----|---------|-------------| | repoServer.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| repoServer.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | repoServer.autoscaling.enabled | Enable Horizontal Pod Autoscaler ([HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)) for the repo server | `false` | | repoServer.autoscaling.minReplicas | Minimum number of replicas for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `1` | | repoServer.autoscaling.maxReplicas | Maximum number of replicas for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `5` | @@ -292,6 +294,7 @@ NAME: my-release | Parameter | Description | Default | |-----|---------|-------------| | server.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| server.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | server.autoscaling.enabled | Enable Horizontal Pod Autoscaler ([HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)) for the server | `false` | | server.autoscaling.minReplicas | Minimum number of replicas for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `1` | | server.autoscaling.maxReplicas | Maximum number of replicas for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `5` | @@ -387,6 +390,7 @@ NAME: my-release | Property | Description | Default | |-----|---------|-------------| | dex.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| dex.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | dex.containerPortGrpc | GRPC container port | `5557` | | dex.containerPortHttp | HTTP container port | `5556` | | dex.enabled | Enable dex | `true` | @@ -446,6 +450,7 @@ through `xxx.extraArgs` | Parameter | Description | Default | |-----|---------|-------------| | redis.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| redis.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | redis.containerPort | Redis container port | `6379` | | redis.enabled | Enable redis | `true` | | redis.image.imagePullPolicy | Redis imagePullPolicy | `"IfNotPresent"` | diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index f0ab071f..90963613 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -120,6 +120,17 @@ spec: {{- if .Values.controller.affinity }} affinity: {{- toYaml .Values.controller.affinity | nindent 8 }} + {{- end }} + {{- with .Values.controller.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.controller.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.controllerServiceAccountName" . }} {{- with .Values.global.hostAliases }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 38cbfcb0..eabc1920 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -128,6 +128,17 @@ spec: {{- if .Values.repoServer.affinity }} affinity: {{- toYaml .Values.repoServer.affinity | nindent 8 }} + {{- end }} + {{- with .Values.repoServer.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.repoServer.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.repoServerServiceAccountName" . }} {{- with .Values.global.hostAliases }} diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 771e7c3b..c84d9d95 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -139,6 +139,17 @@ spec: {{- if .Values.server.affinity }} affinity: {{- toYaml .Values.server.affinity | nindent 8 }} + {{- end }} + {{- with .Values.server.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.server.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.serverServiceAccountName" . }} {{- with .Values.global.hostAliases }} diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 9c409399..5fe78628 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -114,6 +114,17 @@ spec: {{- if .Values.dex.affinity }} affinity: {{- toYaml .Values.dex.affinity | nindent 8 }} + {{- end }} + {{- with .Values.dex.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.dex.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.dexServiceAccountName" . }} volumes: diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 77169592..f5003466 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -79,6 +79,17 @@ spec: affinity: {{- toYaml .Values.redis.affinity | nindent 8 }} {{- end }} + {{- with .Values.redis.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + app.kubernetes.io/name: {{ include "argo-cd.name" $ }}-{{ $.Values.redis.name }} + {{- end }} + {{- end }} + {{- end }} {{- if .Values.redis.volumes }} volumes: {{- toYaml .Values.redis.volumes | nindent 8}} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 38421dad..526660ab 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -143,6 +143,14 @@ controller: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" resources: {} @@ -323,6 +331,14 @@ dex: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -390,6 +406,14 @@ redis: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -535,6 +559,14 @@ server: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -948,6 +980,14 @@ repoServer: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts From 489443e3875f1c80f1819cfd7a608da94753f9d8 Mon Sep 17 00:00:00 2001 From: Artem Yakimenko Date: Sat, 18 Sep 2021 02:39:06 +1000 Subject: [PATCH 09/11] feat(argo-rollouts): Default to keeping CRD's on helm uninstall (#922) Signed-off-by: Artem --- charts/argo-rollouts/Chart.yaml | 4 ++-- charts/argo-rollouts/README.md | 1 + charts/argo-rollouts/templates/crds/analysis-run-crd.yaml | 3 +++ .../argo-rollouts/templates/crds/analysis-template-crd.yaml | 3 +++ .../templates/crds/cluster-analysis-template-crd.yaml | 3 +++ charts/argo-rollouts/templates/crds/experiment-crd.yaml | 3 +++ charts/argo-rollouts/templates/crds/rollout-crd.yaml | 3 +++ charts/argo-rollouts/values.yaml | 1 + 8 files changed, 19 insertions(+), 2 deletions(-) diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index dccdbeeb..e6634acb 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.0.2" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 2.0.2 +version: 2.1.0 icon: https://argoproj.github.io/argo-rollouts/assets/logo.png home: https://github.com/argoproj/argo-helm maintainers: @@ -11,4 +11,4 @@ maintainers: - name: jessesuen annotations: artifacthub.io/changes: | - - "[Fixed]: use image.tag in app labels if provided" + - "[Added]: Keep CRDs on Helm uninstall by default, add corresponding option" diff --git a/charts/argo-rollouts/README.md b/charts/argo-rollouts/README.md index 9fcd862a..52ced182 100644 --- a/charts/argo-rollouts/README.md +++ b/charts/argo-rollouts/README.md @@ -48,6 +48,7 @@ If dashboard is installed by `--set dashboard.enabled=true`, checkout the argo-r | controller.metrics.serviceMonitor.additionalLabels | object | `{}` | Labels to be added to the ServiceMonitor | | imagePullSecrets | list | `[]` | Registry secret names as an array | | installCRDs | bool | `true` | Install and upgrade CRDs | +| keepCRDs | bool | `true` | Keep CRD's on helm uninstall | | crdAnnotations | object | `{}` | Annotations to be added to all CRDs | | podAnnotations | object | `{}` | Annotations to be added to the Rollout pods | | podLabels | object | `{}` | Labels to be added to the Rollout pods | diff --git a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml index 08786ca0..1ed7df98 100644 --- a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml index 12fc5340..85eafd38 100644 --- a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml index e357b4d2..76866712 100644 --- a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/experiment-crd.yaml b/charts/argo-rollouts/templates/crds/experiment-crd.yaml index 5f9f8cfc..7965030a 100644 --- a/charts/argo-rollouts/templates/crds/experiment-crd.yaml +++ b/charts/argo-rollouts/templates/crds/experiment-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 10d0a8e1..748d5897 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index 4c288b98..f706f1e8 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -1,4 +1,5 @@ installCRDs: true +keepCRDs: true clusterInstall: true From 7477b33cba5961bea54eaf63eded687b64877fd3 Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Fri, 17 Sep 2021 19:47:11 +0200 Subject: [PATCH 10/11] feat(argo-cd): Add ability to scrape redis metrics (#892) * feat(argo-cd): Add ability to scrape redis metrics Signed-off-by: Marco Kilchhofer * Bump chart version Signed-off-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 +- charts/argo-cd/README.md | 19 +++++++++ .../argo-cd/templates/redis/deployment.yaml | 18 +++++++++ .../templates/redis/metrics-service.yaml | 28 +++++++++++++ .../templates/redis/networkpolicy.yaml | 7 ++++ .../templates/redis/servicemonitor.yaml | 39 +++++++++++++++++++ charts/argo-cd/values.yaml | 31 +++++++++++++++ 7 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 charts/argo-cd/templates/redis/metrics-service.yaml create mode 100644 charts/argo-cd/templates/redis/servicemonitor.yaml diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 30488923..9976c962 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.19.0 +version: 3.20.0 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-cd/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Added]: Add support for topologySpreadConstraints" + - "[Added]: Ability to scrape redis metrics" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 5e1459a2..d9834553 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -469,6 +469,25 @@ through `xxx.extraArgs` | redis.securityContext | Redis Pod Security Context | See [values.yaml](values.yaml) | | redis.servicePort | Redis service port | `6379` | | redis.tolerations | [Tolerations for use with node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | +| redis.metrics.enabled | Deploy metrics service and redis-exporter sidecar | `false` | +| redis.metrics.image.repository | redis-exporter image repository | `quay.io/bitnami/redis-exporter` | +| redis.metrics.image.tag | redis-exporter image tag | `1.26.0-debian-10-r2` | +| redis.metrics.image.imagePullPolicy | redis-exporter image PullPolicy | `IfNotPresent` | +| redis.metrics.containerPort | Port to use for redis-exporter sidecar | `9121` | +| redis.metrics.resources | Resource limits and requests for redis-exporter sidecar | `{}` | +| redis.metrics.service.type | Metrics service type | `ClusterIP` | +| redis.metrics.service.clusterIP | Metrics service clusterIP. `None` makes a "headless service" (no virtual IP) | `None` | +| redis.metrics.service.annotations | Metrics service annotations | `{}` | +| redis.metrics.service.labels | Metrics service labels | `{}` | +| redis.metrics.service.servicePort | Metrics service port | `9121` | +| redis.metrics.service.portName | Metrics service port name | `http-metrics` | +| redis.metrics.serviceMonitor.enabled | Enable a prometheus ServiceMonitor | `false` | +| redis.metrics.serviceMonitor.interval | Interval at which metrics should be scraped | `30s` | +| redis.metrics.serviceMonitor.relabelings | Prometheus [RelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before scraping | `[]` | +| redis.metrics.serviceMonitor.metricRelabelings | Prometheus [MetricRelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion | `[]` | +| redis.metrics.serviceMonitor.selector | Prometheus ServiceMonitor selector labels | `{}` | +| redis.metrics.serviceMonitor.namespace | Prometheus ServiceMonitor namespace | `` | +| redis.metrics.serviceMonitor.additionalLabels | Additional labels to add to the Prometheus ServiceMonitor | `{}` | | redis-ha | Configures [Redis HA subchart](https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha) The properties below have been changed from the subchart defaults | | | redis-ha.enabled | Enables the Redis HA subchart and disables the custom Redis single node deployment| `false` | | redis-ha.exporter.enabled | If `true`, the prometheus exporter sidecar is enabled | `true` | diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index f5003466..fa01c7b4 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -64,6 +64,24 @@ spec: {{- end }} resources: {{- toYaml .Values.redis.resources | nindent 10 }} + {{- if .Values.redis.metrics.enabled }} + - name: metrics + env: + - name: REDIS_ADDR + value: {{ printf "redis://localhost:%v" .Values.redis.containerPort }} + - name: REDIS_EXPORTER_WEB_LISTEN_ADDRESS + value: {{ printf "0.0.0.0:%v" .Values.redis.metrics.containerPort }} + image: {{ .Values.redis.metrics.image.repository }}:{{ .Values.redis.metrics.image.tag }} + imagePullPolicy: {{ .Values.redis.metrics.image.imagePullPolicy}} + ports: + - containerPort: {{ .Values.redis.metrics.containerPort }} + name: metrics + protocol: TCP + resources: {{- toYaml .Values.redis.metrics.resources | nindent 10 }} + {{- with .Values.redis.containerSecurityContext }} + securityContext: {{- toYaml . | nindent 10 }} + {{- end }} + {{- end }} {{- with .Values.redis.extraContainers }} {{- toYaml . | nindent 6 }} {{- end }} diff --git a/charts/argo-cd/templates/redis/metrics-service.yaml b/charts/argo-cd/templates/redis/metrics-service.yaml new file mode 100644 index 00000000..e799b5ea --- /dev/null +++ b/charts/argo-cd/templates/redis/metrics-service.yaml @@ -0,0 +1,28 @@ +{{- $redisHa := (index .Values "redis-ha") -}} +{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "argo-cd.redis.fullname" . }}-metrics + {{- with .Values.redis.metrics.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + {{- with .Values.redis.metrics.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.redis.metrics.service.clusterIP }} + clusterIP: {{ . }} + {{- end }} + ports: + - name: {{ .Values.redis.metrics.service.portName }} + protocol: TCP + port: {{ .Values.redis.metrics.service.servicePort }} + targetPort: metrics + selector: + {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + type: {{ .Values.redis.metrics.service.type }} +{{- end }} diff --git a/charts/argo-cd/templates/redis/networkpolicy.yaml b/charts/argo-cd/templates/redis/networkpolicy.yaml index 881e257c..8b564add 100644 --- a/charts/argo-cd/templates/redis/networkpolicy.yaml +++ b/charts/argo-cd/templates/redis/networkpolicy.yaml @@ -21,6 +21,13 @@ spec: ports: - port: redis protocol: TCP + {{- if .Values.redis.metrics.enabled }} + - from: + - namespaceSelector: {} + ports: + - port: metrics + protocol: TCP + {{- end }} podSelector: matchLabels: {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 6 }} diff --git a/charts/argo-cd/templates/redis/servicemonitor.yaml b/charts/argo-cd/templates/redis/servicemonitor.yaml new file mode 100644 index 00000000..b7029b74 --- /dev/null +++ b/charts/argo-cd/templates/redis/servicemonitor.yaml @@ -0,0 +1,39 @@ +{{- $redisHa := (index .Values "redis-ha") -}} +{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled .Values.redis.metrics.serviceMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "argo-cd.redis.fullname" . }} + {{- with .Values.redis.metrics.serviceMonitor.namespace }} + namespace: {{ . }} + {{- end }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + {{- with .Values.redis.metrics.serviceMonitor.selector }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.redis.metrics.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + endpoints: + - port: {{ .Values.redis.metrics.service.portName }} + {{- with .Values.redis.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + path: /metrics + {{- with .Values.redis.metrics.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.redis.metrics.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 6 }} +{{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 526660ab..9f828c8e 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -451,6 +451,37 @@ redis: ## Additional containers to be added to the redis pod. extraContainers: [] + metrics: + enabled: false + image: + repository: quay.io/bitnami/redis-exporter + tag: 1.26.0-debian-10-r2 + imagePullPolicy: IfNotPresent + containerPort: 9121 + resources: {} + # limits: + # cpu: 50m + # memory: 64Mi + # requests: + # cpu: 10m + # memory: 32Mi + service: + type: ClusterIP + clusterIP: None + annotations: {} + labels: {} + servicePort: 9121 + portName: http-metrics + serviceMonitor: + enabled: false + interval: 30s + relabelings: [] + metricRelabelings: [] + selector: {} + # prometheus: kube-prometheus + # namespace: monitoring + additionalLabels: {} + # This key configures Redis-HA subchart and when enabled (redis-ha.enabled=true) # the custom redis deployment is omitted redis-ha: From c7584ab51dbe1d7ef975a4938e0f130184a8dc76 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Fri, 17 Sep 2021 15:51:13 -0400 Subject: [PATCH 11/11] feat(argo-workflows): Allow setting the metrics port name (#934) * Allow setting the metrics port name Here, we scrape every pod that has a .*-metrics port here But the helm chart is locked to `metrics` which our Prometheus doesn't see This PR will make it configurable with a default value of `metrics` Signed-off-by: Julien Duchesne * Bump version Signed-off-by: Julien Duchesne * Bump minor version Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-workflows/Chart.yaml | 4 ++-- .../templates/controller/workflow-controller-deployment.yaml | 2 +- charts/argo-workflows/values.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index f05be3e9..0c78db41 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.5.2 +version: 0.6.0 appVersion: "v3.1.8" icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,4 +15,4 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Added]: Add controller initialDelay param to configmap" + - "[Added]: Add controller metricsConfig.portName parameter" diff --git a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml index 7dee67e5..1cd28df2 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml @@ -75,7 +75,7 @@ spec: resources: {{- toYaml .Values.controller.resources | nindent 12 }} ports: - - name: metrics + - name: {{ .Values.controller.metricsConfig.portName }} containerPort: {{ .Values.controller.metricsConfig.port }} - containerPort: 6060 livenessProbe: {{ .Values.controller.livenessProbe | toYaml | nindent 12 }} diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index f87b3364..735ecb44 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -57,6 +57,7 @@ controller: enabled: false path: /metrics port: 9090 + portName: metrics servicePort: 8080 servicePortName: metrics # the controller container's securityContext