From 8425213cbe54e5cda2693d65c9fc763bd42a4815 Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Fri, 3 Dec 2021 23:19:29 +0100 Subject: [PATCH] feat(argo-cd): Support for additional labels (#929) * Update: bump chart version Signed-off-by: Nicolas Lamirault * Update: additional labels Signed-off-by: Nicolas Lamirault * Add: bump chart version Signed-off-by: Nicolas Lamirault * Update: changelog Signed-off-by: Nicolas Lamirault * Fix: Redis label version Signed-off-by: Nicolas Lamirault * Fix: Redis labels Signed-off-by: Nicolas Lamirault * Fix: Redis labels Signed-off-by: Nicolas Lamirault * Fix: typo Signed-off-by: Nicolas Lamirault * Update: use with term Signed-off-by: Nicolas Lamirault * Fix: remove version from helper Signed-off-by: Nicolas Lamirault * docs: Use correct comment style and rerun helm-docs Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 ++-- charts/argo-cd/README.md | 3 ++- charts/argo-cd/README.md.gotmpl | 3 ++- charts/argo-cd/templates/_helpers.tpl | 3 +++ charts/argo-cd/values.yaml | 4 ++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 31db2ff0..98e0d162 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.1.7 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.26.12 +version: 3.27.0 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Added]: add custom initContainers support to all Deployments" + - "[Added]: Support for additional labels" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index cf1c86de..82bf16e4 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -210,6 +210,7 @@ NAME: my-release | configs.tlsCertsAnnotations | object | `{}` | TLS certificate configmap annotations | | createAggregateRoles | bool | `false` | Create clusterroles that extend existing clusterroles to interact with argo-cd crds | | fullnameOverride | string | `""` | String to fully override `"argo-cd.fullname"` | +| global.additionalLabels | object | `{}` | Additional labels to add to all resources | | global.hostAliases | list | `[]` | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files | | global.image.imagePullPolicy | string | `"IfNotPresent"` | If defined, a imagePullPolicy applied to all ArgoCD deployments | | global.image.repository | string | `"quay.io/argoproj/argocd"` | If defined, a repository applied to all ArgoCD deployments | @@ -634,7 +635,7 @@ server: ``` ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) [ArgoCD RBAC policy]: https://argoproj.github.io/argo-cd/operator-manual/rbac/ [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ diff --git a/charts/argo-cd/README.md.gotmpl b/charts/argo-cd/README.md.gotmpl index bc2c0855..f9ad0b57 100644 --- a/charts/argo-cd/README.md.gotmpl +++ b/charts/argo-cd/README.md.gotmpl @@ -274,7 +274,8 @@ server: ``` -{{ template "helm-docs.versionFooter" . }} +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) [ArgoCD RBAC policy]: https://argoproj.github.io/argo-cd/operator-manual/rbac/ [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index e11b43da..523f6a92 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -137,6 +137,9 @@ helm.sh/chart: {{ include "argo-cd.chart" .context }} {{ include "argo-cd.selectorLabels" (dict "context" .context "component" .component "name" .name) }} app.kubernetes.io/managed-by: {{ .context.Release.Service }} app.kubernetes.io/part-of: argocd +{{- with .context.Values.global.additionalLabels }} +{{ toYaml . }} +{{- end }} {{- end }} {{/* diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index fbadb467..c3f6cd75 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -35,6 +35,10 @@ global: # hostnames: # - git.myhostname + # -- Additional labels to add to all resources + additionalLabels: {} + # app: argo-cd + networkPolicy: # -- Create NetworkPolicy objects for all components create: false