feat(argo-cd): Move argocd-cm and argocd-rbac-cm to config section (#1528)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
24de82b214
commit
c8f7efb68f
8 changed files with 170 additions and 154 deletions
|
|
@ -34,6 +34,12 @@ DEPRECATED option repoServer.logFormat - Use configs.params.repoServer.log.forma
|
|||
{{- if .Values.repoServer.logLevel }}
|
||||
DEPRECATED option repoServer.logLevel - Use configs.params.repoServer.log.level
|
||||
{{- end }}
|
||||
{{- if or .Values.server.config .Values.server.configEnabled .Values.server.configAnnotations }}
|
||||
DEPRECATED option server.config - Use configs.cm
|
||||
{{- end }}
|
||||
{{- if or .Values.server.rbacConfig .Values.server.rbacConfigCreate .Values.server.rbacConfigAnnotations }}
|
||||
DEPRECATED option server.rbacConfig - Use configs.rbac
|
||||
{{- end }}
|
||||
{{- if .Values.controller.service }}
|
||||
REMOVED option controller.service - Use controller.metrics
|
||||
{{- end }}
|
||||
|
|
@ -52,7 +58,7 @@ In order to access the server UI you have the following options:
|
|||
- Set the `configs.params."server.insecure"` in the values file and terminate SSL at your ingress: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-2-multiple-ingress-objects-and-hosts
|
||||
|
||||
|
||||
{{ if eq (index .Values.server.config "admin.enabled") "true" -}}
|
||||
{{ if eq (index (coalesce .Values.server.config .Values.configs.cm) "admin.enabled") "true" -}}
|
||||
After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:
|
||||
|
||||
kubectl -n {{ .Release.Namespace }} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
|
||||
|
|
|
|||
|
|
@ -161,19 +161,19 @@ Create the name of the notifications bots slack service account to use
|
|||
{{/*
|
||||
Argo Configuration Preset Values (Incluenced by Values configuration)
|
||||
*/}}
|
||||
{{- define "argo-cd.config.presets" -}}
|
||||
{{- if .Values.configs.styles }}
|
||||
{{- define "argo-cd.config.cm.presets" -}}
|
||||
{{- if .Values.configs.styles -}}
|
||||
ui.cssurl: "./custom/custom.styles.css"
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Merge Argo Configuration with Preset Configuration
|
||||
*/}}
|
||||
{{- define "argo-cd.config" -}}
|
||||
{{- if .Values.server.configEnabled -}}
|
||||
{{- toYaml (mergeOverwrite (default dict (fromYaml (include "argo-cd.config.presets" $))) .Values.server.config) }}
|
||||
{{- end -}}
|
||||
{{- define "argo-cd.config.cm" -}}
|
||||
{{- $config := coalesce .Values.server.config (omit .Values.configs.cm "create" "annotations") -}}
|
||||
{{- $preset := include "argo-cd.config.cm.presets" . | fromYaml | default dict -}}
|
||||
{{- mergeOverwrite $preset $config | toYaml }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{{- if .Values.server.configEnabled }}
|
||||
{{- if (coalesce .Values.server.configEnabled .Values.configs.cm.create) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: argocd-cm
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "cm") | nindent 4 }}
|
||||
{{- with .Values.server.configAnnotations }}
|
||||
{{- with (coalesce .Values.server.configAnnotations .Values.configs.cm.annotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
data:
|
||||
{{- include "argo-cd.config" $ | nindent 2 }}
|
||||
{{- include "argo-cd.config.cm" . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{{- if .Values.server.rbacConfigCreate }}
|
||||
{{- if (coalesce .Values.server.rbacConfigCreate .Values.configs.rbac.create) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: argocd-rbac-cm
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "rbac-cm") | nindent 4 }}
|
||||
{{- with .Values.server.rbacConfigAnnotations }}
|
||||
{{- with (coalesce .Values.server.rbacConfigAnnotations .Values.configs.rbac.annotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.server.rbacConfig }}
|
||||
{{- with (coalesce .Values.server.rbacConfig (omit .Values.configs.rbac "create" "annotations")) }}
|
||||
data:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ rules:
|
|||
- pods/log
|
||||
verbs:
|
||||
- get
|
||||
{{- if eq (index .Values.server.config "exec.enabled") "true" }}
|
||||
{{- if eq (index (coalesce .Values.server.config .Values.configs.cm) "exec.enabled") "true" }}
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue