Skip to content

Commit

Permalink
feat(argo-cd): Support ability to set .Values.namespaceOverride (#2679)
Browse files Browse the repository at this point in the history
* feat(argo-workflows): Allow adding additional ServiceAccounts to RoleBinding (#2676)

remove unnecessary if statements

Signed-off-by: Daniel Beilin <daniel.beilin@outlook.com>
Co-authored-by: Aikawa <yu.croco@gmail.com>
Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* feat(argo-cd): Support ability to set .Values.namespaceOverride

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* fix(argo-cd): typo

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* chore(deps): update actions/create-github-app-token action to v1.10.0 (#2677)

Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* feat(argo-rollouts): Add podLabels at the controller & dashboard level (#2678)

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* feat(argo-cd): Support ability to set .Values.namespaceOverride

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* fix(argo-cd): typo

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* fix(argo-cd): autocorrection

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* fix(argo-cd): typos

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* fix(argo-cd): typos

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* removed auota

Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>

* Update Chart.yaml

Signed-off-by: Andres Vara <46708607+andres-vara@users.noreply.github.com>

---------

Signed-off-by: Daniel Beilin <daniel.beilin@outlook.com>
Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com>
Signed-off-by: Andres Vara <46708607+andres-vara@users.noreply.github.com>
Co-authored-by: Daniel Beilin <144586547+dbeilin@users.noreply.github.com>
Co-authored-by: Aikawa <yu.croco@gmail.com>
Co-authored-by: Andres Vara Parsegov <andres.vara@chase.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: mitchell amihod <mitchell@amihod.com>
  • Loading branch information
7 people committed May 14, 2024
1 parent 87f7176 commit 7be9b01
Show file tree
Hide file tree
Showing 100 changed files with 123 additions and 115 deletions.
10 changes: 3 additions & 7 deletions charts/argo-cd/Chart.yaml
Expand Up @@ -3,7 +3,7 @@ appVersion: v2.11.0
kubeVersion: ">=1.23.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 6.9.1
version: 6.9.2
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
Expand All @@ -26,9 +26,5 @@ annotations:
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: fixed
description: Service option externalIPs is available for all service types
- kind: fixed
description: Service option externalTrafficPolicy is available only for Service types LoadBalancer and NodePort
- kind: fixed
description: Load balancer options are available only for Service type LoadBalancer
- kind: added
description: Support ability to set .Values.namespaceOverride
1 change: 1 addition & 0 deletions charts/argo-cd/README.md
Expand Up @@ -622,6 +622,7 @@ NAME: my-release
| fullnameOverride | string | `""` | String to fully override `"argo-cd.fullname"` |
| kubeVersionOverride | string | `""` | Override the Kubernetes version, which is used to evaluate certain manifests |
| nameOverride | string | `"argocd"` | Provide a name in place of `argocd` |
| namespaceOverride | string | `.Release.Namespace` | Override the namespace |
| openshift.enabled | bool | `false` | enables using arbitrary uid for argo repo server |

## Global Configs
Expand Down
8 changes: 8 additions & 0 deletions charts/argo-cd/templates/_helpers.tpl
Expand Up @@ -218,3 +218,11 @@ Merge Argo Params Configuration with Preset Configuration
{{ $key }}: {{ toString $value | toYaml }}
{{- end }}
{{- end -}}

{{/*
Expand the namespace of the release.
Allows overriding it for multi-namespace deployments in combined charts.
*/}}
{{- define "argo-cd.namespace" -}}
{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
{{- end }}
Expand Up @@ -12,5 +12,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "argo-cd.controller.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "argo-cd.namespace" . }}
{{- end }}
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
{{- end }}
name: {{ template "argo-cd.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
spec:
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "argo-cd.controller.fullname" . }}-metrics
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" "metrics") | nindent 4 }}
{{- with .Values.controller.metrics.service.labels }}
Expand Down
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
name: {{ template "argo-cd.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
spec:
ingress:
- from:
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "argo-cd.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
{{- with .Values.controller.pdb.labels }}
Expand Down
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "argo-cd.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
rules:
Expand Down
Expand Up @@ -2,14 +2,14 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "argo-cd.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "argo-cd.controller.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "argo-cd.controller.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
- kind: ServiceAccount
name: {{ include "argo-cd.controller.serviceAccountName" . }}
namespace: {{ include "argo-cd.namespace" . }}
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
metadata:
name: {{ include "argo-cd.controller.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
{{- with .Values.controller.serviceAccount.annotations }}
annotations:
{{- range $key, $value := . }}
Expand Down
Expand Up @@ -43,7 +43,7 @@ spec:
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
- {{ include "argo-cd.namespace" . }}
selector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.controller.name "name" "metrics") | nindent 6 }}
Expand Down
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
{{- end }}
name: {{ template "argo-cd.controller.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
spec:
Expand Down
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
{{- end }}
name: {{ template "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
spec:
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
rules:
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
roleRef:
Expand All @@ -13,5 +13,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "argo-cd.applicationSet.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "argo-cd.namespace" . }}
{{- end }}
Expand Up @@ -8,7 +8,7 @@ metadata:
{{- end }}
{{- end }}
name: {{ include "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
spec:
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
{{- with .Values.applicationSet.ingress.labels }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "argo-cd.applicationSet.fullname" . }}-metrics
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 4 }}
{{- with .Values.applicationSet.metrics.service.labels }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
spec:
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-applicationset/pdb.yaml
Expand Up @@ -3,7 +3,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
{{- with .Values.applicationSet.pdb.labels }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-applicationset/role.yaml
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
rules:
Expand Down
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
roleRef:
Expand All @@ -12,4 +12,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ include "argo-cd.applicationSet.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
namespace: {{ include "argo-cd.namespace" . }}
Expand Up @@ -8,7 +8,7 @@ metadata:
{{- end }}
{{- end }}
name: {{ template "argo-cd.applicationSet.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
{{- with .Values.applicationSet.service.labels }}
Expand Down
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
automountServiceAccountToken: {{ .Values.applicationSet.serviceAccount.automountServiceAccountToken }}
metadata:
name: {{ include "argo-cd.applicationSet.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
{{- with .Values.applicationSet.serviceAccount.annotations }}
annotations:
{{- range $key, $value := . }}
Expand Down
Expand Up @@ -43,7 +43,7 @@ spec:
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
- {{ include "argo-cd.namespace" . }}
selector:
matchLabels:
{{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.applicationSet.name "name" "metrics") | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-configs/argocd-cm.yaml
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "cm") | nindent 4 }}
{{- with .Values.configs.cm.annotations }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cmd-params-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "cmd-params-cm") | nindent 4 }}
{{- if .Values.configs.params.annotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-configs/argocd-cmp-cm.yaml
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cmp-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" "cmp-cm") | nindent 4 }}
{{- with .Values.configs.cmp.annotations }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: argocd-dex-server-tls
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" "dex-server-tls") | nindent 4 }}
{{- with .Values.dex.certificateSecret.labels }}
Expand Down
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-gpg-keys-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "name" "gpg-keys-cm") | nindent 4 }}
{{- with .Values.configs.gpg.annotations }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
data:
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.notifications.secret.name }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
{{- with .Values.notifications.secret.labels }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-rbac-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "rbac-cm") | nindent 4 }}
{{- with .Values.configs.rbac.annotations }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: argocd-repo-server-tls
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" "repo-server-tls") | nindent 4 }}
{{- with .Values.repoServer.certificateSecret.labels }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-configs/argocd-secret.yaml
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: argocd-secret
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "secret") | nindent 4 }}
{{- with .Values.configs.secret.labels }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: argocd-server-tls
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "server-tls") | nindent 4 }}
{{- with .Values.server.certificateSecret.labels }}
Expand Down
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-ssh-known-hosts-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "name" "ssh-known-hosts-cm") | nindent 4 }}
{{- with .Values.configs.ssh.annotations }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-styles-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }}
data:
Expand Down
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-tls-certs-cm
namespace: {{ .Release.Namespace | quote }}
namespace: {{ include "argo-cd.namespace" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "name" "tls-certs-cm") | nindent 4 }}
{{- with .Values.configs.tls.annotations }}
Expand Down

0 comments on commit 7be9b01

Please sign in to comment.