From 3a8f1e56d2113964e6d4b576a2174469f3d94a16 Mon Sep 17 00:00:00 2001 From: Petr Drastil Date: Sun, 7 Jan 2024 14:43:00 +0100 Subject: [PATCH] Remove unnecessary ingress variables Signed-off-by: Petr Drastil --- .../argocd-applicationset/webhook-ingress.yaml | 11 ++++------- .../templates/argocd-server/ingress-grpc.yaml | 11 ++++------- charts/argo-cd/templates/argocd-server/ingress.yaml | 13 +++++-------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml b/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml index 0905f427..57503cac 100644 --- a/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml +++ b/charts/argo-cd/templates/argocd-applicationset/webhook-ingress.yaml @@ -1,8 +1,5 @@ {{- if and .Values.applicationSet.enabled (and .Values.applicationSet.webhook.ingress.enabled .Values.applicationSet.webhook.ingress.hosts) -}} {{- $servicePort := .Values.applicationSet.service.portName -}} -{{- $paths := .Values.applicationSet.webhook.ingress.paths -}} -{{- $extraPaths := .Values.applicationSet.webhook.ingress.extraPaths -}} -{{- $pathType := .Values.applicationSet.webhook.ingress.pathType -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -28,12 +25,12 @@ spec: - host: {{ . }} http: paths: - {{- with $extraPaths }} + {{- with $.Values.applicationSet.webhook.ingress.extraPaths }} {{- toYaml . | nindent 10 }} {{- end }} - {{- range $p := $paths }} - - path: {{ $p }} - pathType: {{ $pathType }} + {{- range $.Values.applicationSet.webhook.ingress.paths }} + - path: {{ . }} + pathType: {{ $.Values.applicationSet.webhook.ingress.pathType }} backend: service: name: {{ include "argo-cd.applicationSet.fullname" $ }} diff --git a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml index cb426009..20c2f51f 100644 --- a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml @@ -1,8 +1,5 @@ {{- if and (and .Values.server.ingressGrpc.enabled .Values.server.ingressGrpc.hosts) (not .Values.server.ingressGrpc.isAWSALB) -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}} -{{- $paths := .Values.server.ingressGrpc.paths -}} -{{- $extraPaths := .Values.server.ingressGrpc.extraPaths -}} -{{- $pathType := .Values.server.ingressGrpc.pathType -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -28,12 +25,12 @@ spec: - host: {{ . }} http: paths: - {{- with $extraPaths }} + {{- with $.Values.server.ingressGrpc.extraPaths }} {{- toYaml . | nindent 10 }} {{- end }} - {{- range $p := $paths }} - - path: {{ $p }} - pathType: {{ $pathType }} + {{- range $.Values.server.ingressGrpc.paths }} + - path: {{ . }} + pathType: {{ $.Values.server.ingressGrpc.pathType }} backend: service: name: {{ include "argo-cd.server.fullname" $ }} diff --git a/charts/argo-cd/templates/argocd-server/ingress.yaml b/charts/argo-cd/templates/argocd-server/ingress.yaml index d20f7bf2..498ef200 100644 --- a/charts/argo-cd/templates/argocd-server/ingress.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress.yaml @@ -1,8 +1,5 @@ {{- if and .Values.server.ingress.enabled .Values.server.ingress.hosts -}} {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}} -{{- $paths := .Values.server.ingress.paths -}} -{{- $extraPaths := .Values.server.ingress.extraPaths -}} -{{- $pathType := .Values.server.ingress.pathType -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -32,12 +29,12 @@ spec: - host: {{ . }} http: paths: - {{- with $extraPaths }} + {{- with $.Values.server.ingress.extraPaths }} {{- toYaml . | nindent 10 }} {{- end }} - {{- range $p := $paths }} + {{- range $.Values.server.ingress.paths }} {{- if and $.Values.server.ingressGrpc.isAWSALB $.Values.server.ingressGrpc.enabled }} - - path: {{ $p }} + - path: {{ . }} pathType: {{ $.Values.server.ingressGrpc.pathType }} backend: service: @@ -49,8 +46,8 @@ spec: name: {{ $servicePort }} {{- end }} {{- end }} - - path: {{ $p }} - pathType: {{ $pathType }} + - path: {{ . }} + pathType: {{ $.Values.server.ingress.pathType }} backend: service: name: {{ include "argo-cd.server.fullname" $ }}