From e1e2dd963171a022802a7f336bf1491e24d21822 Mon Sep 17 00:00:00 2001 From: Michael Barrientos Date: Sat, 29 Aug 2020 14:19:51 -0700 Subject: [PATCH] feat: Argo CD allow custom paths for ingress (#424) Similar to #317, this allows us to add extra paths to Argo CD. This adds compatibility with the ALB Ingress Controller when using EKS to be able to add the additional listener rule to perform a HTTP->HTTPS redirect on port 80. --- charts/argo-cd/Chart.yaml | 2 +- .../templates/argocd-server/ingress-grpc.yaml | 2 ++ charts/argo-cd/templates/argocd-server/ingress.yaml | 3 +++ charts/argo-cd/values.yaml | 12 ++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 836988ca..36849a20 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.6.2" description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 2.6.1 +version: 2.6.2 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/templates/argocd-server/ingress-grpc.yaml b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml index 42538d61..8ce8b8fc 100644 --- a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml @@ -33,6 +33,7 @@ spec: - host: {{ $host }} http: paths: + {{- toYaml .Values.server.ingressGrpc.extraPaths | nindent 10 }} {{- range $p := $paths }} - path: {{ $p }} backend: @@ -43,6 +44,7 @@ spec: {{- else }} - http: paths: + {{- toYaml .Values.server.ingressGrpc.extraPaths | nindent 10 }} {{- range $p := $paths }} - path: {{ $p }} backend: diff --git a/charts/argo-cd/templates/argocd-server/ingress.yaml b/charts/argo-cd/templates/argocd-server/ingress.yaml index 056776a4..468de536 100644 --- a/charts/argo-cd/templates/argocd-server/ingress.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress.yaml @@ -2,6 +2,7 @@ {{- $serviceName := include "argo-cd.server.fullname" . -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}} {{- $paths := .Values.server.ingress.paths -}} +{{- $extraPaths := .Values.server.ingress.extraPaths -}} {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} apiVersion: networking.k8s.io/v1beta1 {{ else }} @@ -33,6 +34,7 @@ spec: - host: {{ $host }} http: paths: + {{- toYaml $extraPaths | nindent 10 }} {{- range $p := $paths }} - path: {{ $p }} backend: @@ -43,6 +45,7 @@ spec: {{- else }} - http: paths: + {{- toYaml $extraPaths | nindent 10 }} {{- range $p := $paths }} - path: {{ $p }} backend: diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 83741e83..5a8abb51 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -454,6 +454,12 @@ server: # - argocd.example.com paths: - / + extraPaths: + [] + # - path: /* + # backend: + # serviceName: ssl-redirect + # servicePort: use-annotation tls: [] # - secretName: argocd-example-tls @@ -476,6 +482,12 @@ server: # - argocd.example.com paths: - / + extraPaths: + [] + # - path: /* + # backend: + # serviceName: ssl-redirect + # servicePort: use-annotation tls: [] # - secretName: argocd-example-tls