From c75e0ae85f9b950d660ea9bc85ecdd37fb15be01 Mon Sep 17 00:00:00 2001 From: Liviu Costea Date: Thu, 24 Jan 2019 21:40:20 +0200 Subject: [PATCH] Configure git repositories, helm chart museums and dex connectors This way argo-cd could be configured to update itself via helm --- .gitignore | 1 + charts/argo-cd/templates/argocd-cm.yaml | 25 ++++++++++++++++ charts/argo-cd/values.yaml | 39 +++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100755 charts/argo-cd/templates/argocd-cm.yaml diff --git a/.gitignore b/.gitignore index 9385855f..468b8f5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ output .vscode +.DS_Store \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-cm.yaml b/charts/argo-cd/templates/argocd-cm.yaml new file mode 100755 index 00000000..0a44c53d --- /dev/null +++ b/charts/argo-cd/templates/argocd-cm.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "argo-cd.fullname" . }}-cm + labels: + app: {{ include "argo-cd.name" . }}-server + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-server + helm.sh/chart: {{ include "argo-cd.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/part-of: {{ include "argo-cd.name" . }} + app.kubernetes.io/component: server +data: +{{- if .Values.config.helmRepositories }} + helm.repositories: | +{{ toYaml .Values.config.helmRepositories | indent 4 }} +{{- end }} +{{- if .Values.config.repositories }} + repositories: | +{{ toYaml .Values.config.repositories | indent 4 }} +{{- end }} +{{- if .Values.config.dexConfig }} + dex.config: | +{{ toYaml .Values.config.dexConfig | indent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 3ef4c658..8caf7d7b 100644 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -28,6 +28,45 @@ repoServer: tag: v0.11.0 pullPolicy: Always +config: + helmRepositories: + - name: privateRepo + url: http://chartmuseum.privatecloud.com + usernameSecret: + name: private-chartmuseum + key: username + passwordSecret: + name: private-chartmuseum + key: password + - name: incubator + url: https://kubernetes-charts-incubator.storage.googleapis.com/ + repositories: + - url: git@gitlab.com:usersprivategroup/users-gitops-config.git + sshPrivateKeySecret: + key: privateKey + name: argocd-dev-key + - url: git@gitlab.com:accountingprivategroup/accounting-gitops-config.git + sshPrivateKeySecret: + key: privateKey + name: argocd-dev-key + dexConfig: + # # Argo CD's externally facing base URL. Required for configuring SSO + # # url: https://argo-cd-demo.argoproj.io + # + # # A dex connector configuration. See documentation on how to configure SSO: + # # https://github.com/argoproj/argo-cd/blob/master/docs/sso.md#2-configure-argocd-for-sso + connectors: + # GitHub example + - type: github + id: github + name: GitHub + config: + clientID: aabbccddeeff00112233 + clientSecret: $dex.github.clientSecret + orgs: + - name: your-github-org + teams: + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little