feat(argo-cd): Add global domain configuration (#2499)

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
Petr Drastil 2024-02-16 15:44:51 +01:00 committed by GitHub
parent ba20d95182
commit f8b1fecd81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 80 additions and 49 deletions

View file

@ -163,6 +163,7 @@ Argo Configuration Preset Values (Incluenced by Values configuration)
*/}}
{{- define "argo-cd.config.cm.presets" -}}
{{- $presets := dict -}}
{{- $_ := set $presets "url" (printf "https://%s" .Values.global.domain) -}}
{{- if .Values.configs.styles -}}
{{- $_ := set $presets "ui.cssurl" "./custom/custom.styles.css" -}}
{{- end -}}

View file

@ -14,9 +14,9 @@ metadata:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.applicationSet.name "name" .Values.applicationSet.name) | nindent 4 }}
spec:
secretName: {{ .Values.applicationSet.certificate.secretName }}
commonName: {{ .Values.applicationSet.certificate.domain | quote }}
commonName: {{ .Values.applicationSet.certificate.domain | default .Values.global.domain }}
dnsNames:
- {{ .Values.applicationSet.certificate.domain | quote }}
- {{ .Values.applicationSet.certificate.domain | default .Values.global.domain }}
{{- range .Values.applicationSet.certificate.additionalHosts }}
- {{ . | quote }}
{{- end }}

View file

@ -20,8 +20,7 @@ spec:
ingressClassName: {{ . }}
{{- end }}
rules:
{{- if .Values.applicationSet.ingress.hostname }}
- host: {{ .Values.applicationSet.ingress.hostname }}
- host: {{ .Values.applicationSet.ingress.hostname | default .Values.global.domain }}
http:
paths:
{{- with .Values.applicationSet.ingress.extraPaths }}
@ -34,7 +33,6 @@ spec:
name: {{ include "argo-cd.applicationSet.fullname" . }}
port:
number: {{ .Values.applicationSet.service.port }}
{{- end }}
{{- range .Values.applicationSet.ingress.extraHosts }}
- host: {{ .name | quote }}
http:

View file

@ -8,7 +8,7 @@ metadata:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
data:
context: |
argocdUrl: {{ .Values.notifications.argocdUrl | quote }}
argocdUrl: {{ .Values.notifications.argocdUrl | default (printf "https://%s" .Values.global.domain) }}
{{- with .Values.notifications.context }}
{{- toYaml . | nindent 4 }}
{{- end }}

View file

@ -14,9 +14,9 @@ metadata:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
spec:
secretName: {{ .Values.server.certificate.secretName }}
commonName: {{ .Values.server.certificate.domain | quote }}
commonName: {{ .Values.server.certificate.domain | default .Values.global.domain }}
dnsNames:
- {{ .Values.server.certificate.domain | quote }}
- {{ .Values.server.certificate.domain | default .Values.global.domain }}
{{- range .Values.server.certificate.additionalHosts }}
- {{ . | quote }}
{{- end }}

View file

@ -1,5 +1,5 @@
{{- if and .Values.server.ingressGrpc.enabled (eq .Values.server.ingress.controller "generic") -}}
{{- $hostname := .Values.server.ingressGrpc.hostname | default (printf "grpc.%s" .Values.server.ingress.hostname) -}}
{{- $hostname := printf "grpc.%s" (.Values.server.ingress.hostname | default .Values.global.domain) -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
@ -21,7 +21,7 @@ spec:
ingressClassName: {{ . }}
{{- end }}
rules:
- host: {{ $hostname }}
- host: {{ .Values.server.ingressGrpc.hostname | default $hostname }}
http:
paths:
{{- with .Values.server.ingressGrpc.extraPaths }}

View file

@ -22,7 +22,7 @@ spec:
ingressClassName: {{ . }}
{{- end }}
rules:
- host: {{ .Values.server.ingress.hostname }}
- host: {{ .Values.server.ingress.hostname | default .Values.global.domain }}
http:
paths:
{{- with .Values.server.ingress.extraPaths }}
@ -57,7 +57,7 @@ spec:
- {{ .Values.server.ingress.hostname }}
{{- range .Values.server.ingress.extraHosts }}
{{- if .name }}
- {{ .name }}
- {{ .name }}
{{- end }}
{{- end }}
secretName: argocd-server-tls