feat(argo-cd): represent cluster credentials as a map (#2648)
So it can be merged with values coming from different sources. Closes #2592 Signed-off-by: Nacho Barrientos <nacho.barrientos@cern.ch>
This commit is contained in:
parent
5652e66777
commit
2c05baf741
4 changed files with 21 additions and 21 deletions
|
@ -3,7 +3,7 @@ appVersion: v2.11.2
|
||||||
kubeVersion: ">=1.23.0-0"
|
kubeVersion: ">=1.23.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: 6.11.1
|
version: 7.0.0
|
||||||
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:
|
||||||
|
@ -27,4 +27,4 @@ annotations:
|
||||||
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: changed
|
- kind: changed
|
||||||
description: Bump argo-cd to v2.11.2
|
description: Represent cluster credentials as a map
|
||||||
|
|
|
@ -695,7 +695,7 @@ NAME: my-release
|
||||||
|
|
||||||
| Key | Type | Default | Description |
|
| Key | Type | Default | Description |
|
||||||
|-----|------|---------|-------------|
|
|-----|------|---------|-------------|
|
||||||
| configs.clusterCredentials | list | `[]` (See [values.yaml]) | Provide one or multiple [external cluster credentials] |
|
| configs.clusterCredentials | object | `{}` (See [values.yaml]) | Provide one or multiple [external cluster credentials] |
|
||||||
| configs.cm."admin.enabled" | bool | `true` | Enable local admin user |
|
| configs.cm."admin.enabled" | bool | `true` | Enable local admin user |
|
||||||
| configs.cm."application.instanceLabelKey" | string | `"argocd.argoproj.io/instance"` | The name of tracking label used by Argo CD for resource pruning |
|
| configs.cm."application.instanceLabelKey" | string | `"argocd.argoproj.io/instance"` | The name of tracking label used by Argo CD for resource pruning |
|
||||||
| configs.cm."exec.enabled" | bool | `false` | Enable exec feature in Argo UI |
|
| configs.cm."exec.enabled" | bool | `false` | Enable exec feature in Argo UI |
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
{{- range .Values.configs.clusterCredentials }}
|
{{- range $cluster_key, $cluster_value := .Values.configs.clusterCredentials }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argo-cd.name" $ }}-cluster-{{ .name }}
|
name: {{ include "argo-cd.name" $ }}-cluster-{{ $cluster_key }}
|
||||||
namespace: {{ $.Release.Namespace | quote }}
|
namespace: {{ $.Release.Namespace | quote }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-cd.labels" (dict "context" $) | nindent 4 }}
|
{{- include "argo-cd.labels" (dict "context" $) | nindent 4 }}
|
||||||
{{- with .labels }}
|
{{- with $cluster_value.labels }}
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
argocd.argoproj.io/secret-type: cluster
|
argocd.argoproj.io/secret-type: cluster
|
||||||
{{- with .annotations }}
|
{{- with $cluster_value.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
@ -19,17 +19,17 @@ metadata:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
stringData:
|
stringData:
|
||||||
name: {{ required "A valid .Values.configs.clusterCredentials[].name entry is required!" .name }}
|
name: {{ required "A valid .Values.configs.clusterCredentials.CLUSTERNAME.name entry is required!" $cluster_key }}
|
||||||
server: {{ required "A valid .Values.configs.clusterCredentials[].server entry is required!" .server }}
|
server: {{ required "A valid .Values.configs.clusterCredentials.CLUSTERNAME.server entry is required!" $cluster_value.server }}
|
||||||
{{- if .namespaces }}
|
{{- if $cluster_value.namespaces }}
|
||||||
namespaces: {{ .namespaces }}
|
namespaces: {{ $cluster_value.namespaces }}
|
||||||
{{- if .clusterResources }}
|
{{- if $cluster_value.clusterResources }}
|
||||||
clusterResources: {{ .clusterResources | quote }}
|
clusterResources: {{ $cluster_value.clusterResources | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .project }}
|
{{- if $cluster_value.project }}
|
||||||
project: {{ .project | quote }}
|
project: {{ $cluster_value.project | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
config: |
|
config: |
|
||||||
{{- required "A valid .Values.configs.clusterCredentials[].config entry is required!" .config | toRawJson | nindent 4 }}
|
{{- required "A valid .Values.configs.clusterCredentials.CLUSTERNAME.config entry is required!" $cluster_value.config | toRawJson | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -418,13 +418,13 @@ configs:
|
||||||
# command: [sh, -c, find . -name env.yaml]
|
# command: [sh, -c, find . -name env.yaml]
|
||||||
|
|
||||||
# -- Provide one or multiple [external cluster credentials]
|
# -- Provide one or multiple [external cluster credentials]
|
||||||
# @default -- `[]` (See [values.yaml])
|
# @default -- `{}` (See [values.yaml])
|
||||||
## Ref:
|
## Ref:
|
||||||
## - https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters
|
## - https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters
|
||||||
## - https://argo-cd.readthedocs.io/en/stable/operator-manual/security/#external-cluster-credentials
|
## - https://argo-cd.readthedocs.io/en/stable/operator-manual/security/#external-cluster-credentials
|
||||||
## - https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters
|
## - https://argo-cd.readthedocs.io/en/stable/user-guide/projects/#project-scoped-repositories-and-clusters
|
||||||
clusterCredentials: []
|
clusterCredentials: {}
|
||||||
# - name: mycluster
|
# mycluster:
|
||||||
# server: https://mycluster.example.com
|
# server: https://mycluster.example.com
|
||||||
# labels: {}
|
# labels: {}
|
||||||
# annotations: {}
|
# annotations: {}
|
||||||
|
@ -433,7 +433,7 @@ configs:
|
||||||
# tlsClientConfig:
|
# tlsClientConfig:
|
||||||
# insecure: false
|
# insecure: false
|
||||||
# caData: "<base64 encoded certificate>"
|
# caData: "<base64 encoded certificate>"
|
||||||
# - name: mycluster2
|
# mycluster2:
|
||||||
# server: https://mycluster2.example.com
|
# server: https://mycluster2.example.com
|
||||||
# labels: {}
|
# labels: {}
|
||||||
# annotations: {}
|
# annotations: {}
|
||||||
|
@ -444,7 +444,7 @@ configs:
|
||||||
# tlsClientConfig:
|
# tlsClientConfig:
|
||||||
# insecure: false
|
# insecure: false
|
||||||
# caData: "<base64 encoded certificate>"
|
# caData: "<base64 encoded certificate>"
|
||||||
# - name: mycluster3-project-scoped
|
# mycluster3-project-scoped:
|
||||||
# server: https://mycluster3.example.com
|
# server: https://mycluster3.example.com
|
||||||
# labels: {}
|
# labels: {}
|
||||||
# annotations: {}
|
# annotations: {}
|
||||||
|
|
Loading…
Reference in a new issue