From 88a326bacdffde9e065b08ba893a17149584e72e Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 11 Oct 2025 02:34:38 +0530 Subject: platform: Adding argocd helm chart --- .../templates/argocd-configs/argocd-cm.yaml | 17 ++++++++ .../argocd-configs/argocd-cmd-params-cm.yaml | 17 ++++++++ .../templates/argocd-configs/argocd-cmp-cm.yaml | 25 +++++++++++ .../argocd-dex-server-tls-secret.yaml | 25 +++++++++++ .../argocd-configs/argocd-gpg-keys-cm.yaml | 17 ++++++++ .../argocd-configs/argocd-notifications-cm.yaml | 28 +++++++++++++ .../argocd-notifications-secret.yaml | 23 ++++++++++ .../templates/argocd-configs/argocd-rbac-cm.yaml | 19 +++++++++ .../argocd-repo-server-tls-secret.yaml | 25 +++++++++++ .../templates/argocd-configs/argocd-secret.yaml | 49 ++++++++++++++++++++++ .../argocd-configs/argocd-server-tls-secret.yaml | 22 ++++++++++ .../argocd-configs/argocd-ssh-known-hosts-cm.yaml | 21 ++++++++++ .../templates/argocd-configs/argocd-styles-cm.yaml | 12 ++++++ .../argocd-configs/argocd-tls-certs-cm.yaml | 19 +++++++++ .../templates/argocd-configs/cluster-secrets.yaml | 38 +++++++++++++++++ .../argocd-configs/externalredis-secret.yaml | 23 ++++++++++ .../repository-credentials-secret.yaml | 21 ++++++++++ .../argocd-configs/repository-secret.yaml | 21 ++++++++++ 18 files changed, 422 insertions(+) create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmd-params-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmp-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-dex-server-tls-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-gpg-keys-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-rbac-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-repo-server-tls-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-server-tls-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-ssh-known-hosts-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-styles-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-tls-certs-cm.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/cluster-secrets.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/externalredis-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-credentials-secret.yaml create mode 100644 astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-secret.yaml (limited to 'astroshop-platform/argocd-helmchart/templates/argocd-configs') diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cm.yaml new file mode 100644 index 0000000..6bd19f5 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cm.yaml @@ -0,0 +1,17 @@ +{{- if .Values.configs.cm.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-cm + 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 }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +data: + {{- include "argo-cd.config.cm" . | trim | nindent 2 }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmd-params-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmd-params-cm.yaml new file mode 100644 index 0000000..f0c81b2 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmd-params-cm.yaml @@ -0,0 +1,17 @@ +{{- if .Values.configs.params.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-cmd-params-cm + 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 }} + annotations: + {{- range $key, $value := .Values.configs.params.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +data: + {{- include "argo-cd.config.params" . | trim | nindent 2 }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmp-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmp-cm.yaml new file mode 100644 index 0000000..a5d29f6 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-cmp-cm.yaml @@ -0,0 +1,25 @@ +{{- if .Values.configs.cmp.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-cmp-cm + 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 }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +data: + {{- range $cmp_plugin, $cmp_plugin_config := .Values.configs.cmp.plugins }} + {{ $cmp_plugin }}.yaml: | + apiVersion: argoproj.io/v1alpha1 + kind: ConfigManagementPlugin + metadata: + name: {{ $cmp_plugin }} + spec: + {{- toYaml $cmp_plugin_config | nindent 6 }} + {{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-dex-server-tls-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-dex-server-tls-secret.yaml new file mode 100644 index 0000000..747fa13 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-dex-server-tls-secret.yaml @@ -0,0 +1,25 @@ +{{- if and .Values.dex.enabled .Values.dex.certificateSecret.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: argocd-dex-server-tls + 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 }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.dex.certificateSecret.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: kubernetes.io/tls +data: + {{- with .Values.dex.certificateSecret.ca }} + ca.crt: {{ . | b64enc | quote }} + {{- end }} + tls.crt: {{ .Values.dex.certificateSecret.crt | b64enc | quote }} + tls.key: {{ .Values.dex.certificateSecret.key | b64enc | quote }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-gpg-keys-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-gpg-keys-cm.yaml new file mode 100644 index 0000000..ed299b5 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-gpg-keys-cm.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-gpg-keys-cm + namespace: {{ include "argo-cd.namespace" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "name" "gpg-keys-cm") | nindent 4 }} + {{- with .Values.configs.gpg.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +{{- with .Values.configs.gpg.keys }} +data: + {{- toYaml . | nindent 2 }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-cm.yaml new file mode 100644 index 0000000..663862e --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-cm.yaml @@ -0,0 +1,28 @@ +{{- if and .Values.notifications.enabled .Values.notifications.cm.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-notifications-cm + namespace: {{ include "argo-cd.namespace" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }} +data: + context: | + argocdUrl: {{ .Values.notifications.argocdUrl | default (printf "https://%s" .Values.global.domain) }} + {{- with .Values.notifications.context }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.notifications.notifiers }} + {{- toYaml . | nindent 2 }} + {{- end }} + {{- with .Values.notifications.subscriptions }} + subscriptions: | + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.notifications.templates }} + {{- toYaml . | nindent 2 }} + {{- end }} + {{- with .Values.notifications.triggers }} + {{- toYaml . | nindent 2 }} + {{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-secret.yaml new file mode 100644 index 0000000..f64a91f --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-notifications-secret.yaml @@ -0,0 +1,23 @@ +{{- if and .Values.notifications.enabled .Values.notifications.secret.create }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.notifications.secret.name }} + 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 }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.notifications.secret.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: Opaque +stringData: + {{- with .Values.notifications.secret.items }} + {{- toYaml . | nindent 2 }} + {{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-rbac-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-rbac-cm.yaml new file mode 100644 index 0000000..ae48404 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-rbac-cm.yaml @@ -0,0 +1,19 @@ +{{- if .Values.configs.rbac.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-rbac-cm + 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 }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +{{- with (omit .Values.configs.rbac "create" "annotations") }} +data: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-repo-server-tls-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-repo-server-tls-secret.yaml new file mode 100644 index 0000000..8635d64 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-repo-server-tls-secret.yaml @@ -0,0 +1,25 @@ +{{- if .Values.repoServer.certificateSecret.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: argocd-repo-server-tls + 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 }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.repoServer.certificateSecret.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: kubernetes.io/tls +data: + {{- with .Values.repoServer.certificateSecret.ca }} + ca.crt: {{ . | b64enc | quote }} + {{- end }} + tls.crt: {{ .Values.repoServer.certificateSecret.crt | b64enc | quote }} + tls.key: {{ .Values.repoServer.certificateSecret.key | b64enc | quote }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-secret.yaml new file mode 100644 index 0000000..9462be2 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-secret.yaml @@ -0,0 +1,49 @@ +{{- if .Values.configs.secret.createSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: argocd-secret + 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 }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.configs.secret.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: Opaque +{{- if or .Values.configs.secret.githubSecret (or .Values.configs.secret.gitlabSecret .Values.configs.secret.bitbucketUUID .Values.configs.secret.bitbucketServerSecret .Values.configs.secret.gogsSecret (and .Values.configs.secret.azureDevops.username .Values.configs.secret.azureDevops.password) .Values.configs.secret.argocdServerAdminPassword .Values.configs.secret.extra) }} +# Setting a blank data again will wipe admin password/key/cert +data: + {{- with .Values.configs.secret.githubSecret }} + webhook.github.secret: {{ . | b64enc }} + {{- end }} + {{- with .Values.configs.secret.gitlabSecret }} + webhook.gitlab.secret: {{ . | b64enc }} + {{- end }} + {{- with .Values.configs.secret.bitbucketServerSecret }} + webhook.bitbucketserver.secret: {{ . | b64enc }} + {{- end }} + {{- with .Values.configs.secret.bitbucketUUID }} + webhook.bitbucket.uuid: {{ . | b64enc }} + {{- end }} + {{- with .Values.configs.secret.gogsSecret }} + webhook.gogs.secret: {{ . | b64enc }} + {{- end }} + {{- if and .Values.configs.secret.azureDevops.username .Values.configs.secret.azureDevops.password }} + webhook.azuredevops.username: {{ .Values.configs.secret.azureDevops.username | b64enc }} + webhook.azuredevops.password: {{ .Values.configs.secret.azureDevops.password | b64enc }} + {{- end }} + {{- if .Values.configs.secret.argocdServerAdminPassword }} + admin.password: {{ .Values.configs.secret.argocdServerAdminPassword | b64enc }} + admin.passwordMtime: {{ default (dateInZone "2006-01-02T15:04:05Z" (now) "UTC") .Values.configs.secret.argocdServerAdminPasswordMtime | b64enc }} + {{- end }} + {{- range $key, $value := .Values.configs.secret.extra }} + {{ $key }}: {{ $value | b64enc }} + {{- end }} +{{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-server-tls-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-server-tls-secret.yaml new file mode 100644 index 0000000..9711647 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-server-tls-secret.yaml @@ -0,0 +1,22 @@ +{{- if and .Values.server.certificateSecret.enabled (not .Values.server.certificate.enabled) }} +apiVersion: v1 +kind: Secret +metadata: + name: argocd-server-tls + 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 }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.server.certificateSecret.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: kubernetes.io/tls +data: + tls.crt: {{ .Values.server.certificateSecret.crt | b64enc | quote }} + tls.key: {{ .Values.server.certificateSecret.key | b64enc | quote }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-ssh-known-hosts-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-ssh-known-hosts-cm.yaml new file mode 100644 index 0000000..0218d40 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-ssh-known-hosts-cm.yaml @@ -0,0 +1,21 @@ +{{- if .Values.configs.ssh.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-ssh-known-hosts-cm + namespace: {{ include "argo-cd.namespace" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "name" "ssh-known-hosts-cm") | nindent 4 }} + {{- with .Values.configs.ssh.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +data: + ssh_known_hosts: | + {{- .Values.configs.ssh.knownHosts | nindent 4 }} + {{- with .Values.configs.ssh.extraHosts }} + {{- . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-styles-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-styles-cm.yaml new file mode 100644 index 0000000..7742154 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-styles-cm.yaml @@ -0,0 +1,12 @@ +{{- if .Values.configs.styles }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-styles-cm + namespace: {{ include "argo-cd.namespace" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} +data: + custom.styles.css: | + {{- .Values.configs.styles | nindent 4 }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-tls-certs-cm.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-tls-certs-cm.yaml new file mode 100644 index 0000000..3aad401 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/argocd-tls-certs-cm.yaml @@ -0,0 +1,19 @@ +{{- if .Values.configs.tls.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-tls-certs-cm + namespace: {{ include "argo-cd.namespace" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "name" "tls-certs-cm") | nindent 4 }} + {{- with .Values.configs.tls.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +{{- with .Values.configs.tls.certificates }} +data: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/cluster-secrets.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/cluster-secrets.yaml new file mode 100644 index 0000000..956bbf5 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/cluster-secrets.yaml @@ -0,0 +1,38 @@ +{{- range $cluster_key, $cluster_value := .Values.configs.clusterCredentials }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "argo-cd.name" $ }}-cluster-{{ $cluster_key }} + namespace: {{ include "argo-cd.namespace" $ | quote }} + labels: + {{- include "argo-cd.labels" (dict "context" $) | nindent 4 }} + {{- with $cluster_value.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + argocd.argoproj.io/secret-type: cluster + {{- with $cluster_value.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: Opaque +stringData: + {{- if $cluster_value.shard }} + shard: {{ $cluster_value.shard | quote }} + {{- end }} + name: {{ $cluster_key }} + server: {{ required "A valid .Values.configs.clusterCredentials.CLUSTERNAME.server entry is required!" $cluster_value.server }} + {{- if $cluster_value.namespaces }} + namespaces: {{ $cluster_value.namespaces }} + {{- if $cluster_value.clusterResources }} + clusterResources: {{ $cluster_value.clusterResources | quote }} + {{- end }} + {{- end }} + {{- if $cluster_value.project }} + project: {{ $cluster_value.project | quote }} + {{- end }} + config: | + {{- required "A valid .Values.configs.clusterCredentials.CLUSTERNAME.config entry is required!" $cluster_value.config | toRawJson | nindent 4 }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/externalredis-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/externalredis-secret.yaml new file mode 100644 index 0000000..2cfefde --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/externalredis-secret.yaml @@ -0,0 +1,23 @@ +{{- if and (or .Values.externalRedis.username .Values.externalRedis.password) (not .Values.externalRedis.existingSecret) }} +apiVersion: v1 +kind: Secret +metadata: + name: argocd-redis + namespace: {{ include "argo-cd.namespace" . }} + labels: + {{- include "argo-cd.labels" (dict "context" $) | nindent 4 }} + {{- with .Values.externalRedis.secretAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +type: Opaque +data: + {{- with .Values.externalRedis.username }} + redis-username: {{ . | b64enc }} + {{- end }} + {{- with .Values.externalRedis.password }} + redis-password: {{ . | b64enc }} + {{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-credentials-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-credentials-secret.yaml new file mode 100644 index 0000000..e4d23f9 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-credentials-secret.yaml @@ -0,0 +1,21 @@ +{{- range $repo_cred_key, $repo_cred_value := .Values.configs.credentialTemplates }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: argocd-repo-creds-{{ $repo_cred_key }} + namespace: {{ include "argo-cd.namespace" $ | quote }} + labels: + argocd.argoproj.io/secret-type: repo-creds + {{- include "argo-cd.labels" (dict "context" $) | nindent 4 }} + {{- with $.Values.configs.credentialTemplatesAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +data: + {{- range $key, $value := $repo_cred_value }} + {{ $key }}: {{ $value | toString | b64enc }} + {{- end }} +{{- end }} diff --git a/astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-secret.yaml b/astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-secret.yaml new file mode 100644 index 0000000..4a77cf1 --- /dev/null +++ b/astroshop-platform/argocd-helmchart/templates/argocd-configs/repository-secret.yaml @@ -0,0 +1,21 @@ +{{- range $repo_key, $repo_value := .Values.configs.repositories }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: argocd-repo-{{ $repo_key }} + namespace: {{ include "argo-cd.namespace" $ | quote }} + labels: + argocd.argoproj.io/secret-type: repository + {{- include "argo-cd.labels" (dict "context" $) | nindent 4 }} + {{- with $.Values.configs.repositoriesAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +data: + {{- range $key, $value := $repo_value }} + {{ $key }}: {{ $value | b64enc }} + {{- end }} +{{- end }} -- cgit v1.2.3