From c2d9c8125863a5290d1715e14c2fbff7fd3886d2 Mon Sep 17 00:00:00 2001 From: Takeshi Nakata Date: Mon, 27 Apr 2020 09:14:23 +0900 Subject: [PATCH] feat: add BackendConfig configuration for GKE (#314) * add BackendConfig configuration * update chart version * modify sample secretName --- charts/argo-cd/Chart.yaml | 2 +- charts/argo-cd/README.md | 2 ++ .../templates/argocd-server/backendconfig.yaml | 15 +++++++++++++++ charts/argo-cd/values.yaml | 10 ++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 charts/argo-cd/templates/argocd-server/backendconfig.yaml diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index b671caf3..e7863f8f 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.5.2" description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 2.2.8 +version: 2.2.9 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index adfe7004..ab6bc3b7 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -183,6 +183,8 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | server.autoscaling.maxReplicas | Maximum number of replicas for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `5` | | server.autoscaling.targetCPUUtilizationPercentage | Average CPU utilization percentage for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `50` | | server.autoscaling.targetMemoryUtilizationPercentage | Average memory utilization percentage for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `50` | +| server.GKEbackendConfig.enabled | Enable BackendConfig custom resource for Google Kubernetes Engine. | `false` | +| server.GKEbackendConfig.spec | [BackendConfigSpec](https://cloud.google.com/kubernetes-engine/docs/concepts/backendconfig#backendconfigspec_v1beta1_cloudgooglecom) | `{}` | | server.certificate.additionalHosts | Certificate manager additional hosts | `[]` | | server.certificate.domain | Certificate manager domain | `"argocd.example.com"` | | server.certificate.enabled | Enables a certificate manager certificate. | `false` | diff --git a/charts/argo-cd/templates/argocd-server/backendconfig.yaml b/charts/argo-cd/templates/argocd-server/backendconfig.yaml new file mode 100644 index 00000000..279b3487 --- /dev/null +++ b/charts/argo-cd/templates/argocd-server/backendconfig.yaml @@ -0,0 +1,15 @@ +{{- if .Values.server.GKEbackendConfig.enabled }} +apiVersion: cloud.google.com/v1beta1 +kind: BackendConfig +metadata: + name: {{ template "argo-cd.server.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.server.name }} + 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: argocd + app.kubernetes.io/component: {{ .Values.server.name }} +spec: + {{- toYaml .Values.server.GKEbackendConfig.spec | nindent 2 }} +{{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index c666453b..682a96f7 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -561,6 +561,16 @@ server: clusterAdminAccess: enabled: true + ## Enable BackendConfig custom resource for Google Kubernetes Engine + GKEbackendConfig: + enabled: false + spec: {} + # spec: + # iap: + # enabled: true + # oauthclientCredentials: + # secretName: argocd-secret + ## Repo Server repoServer: name: repo-server