From 68d0ca3ddb03eed117df32e5f4334ebe16029ea8 Mon Sep 17 00:00:00 2001 From: skiesewetter-intershop <82586807+skiesewetter-intershop@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:00:02 +0100 Subject: [PATCH] fix: fix ingress annotation conflict in icm-web chart (#834) --- charts/icm-web/templates/ingress.yaml | 47 --------------------------- charts/icm-web/values.yaml | 4 --- 2 files changed, 51 deletions(-) diff --git a/charts/icm-web/templates/ingress.yaml b/charts/icm-web/templates/ingress.yaml index 19d51ba3..f82dfb61 100644 --- a/charts/icm-web/templates/ingress.yaml +++ b/charts/icm-web/templates/ingress.yaml @@ -42,51 +42,4 @@ spec: name: http {{- end }} {{- end }} ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ $fullName }}-internal-pages-only - labels: - app.kubernetes.io/name: {{ $fullName }} # Use shared name for the name label of the icm-web ingresses - helm.sh/chart: {{ include "icm-web.chart" . }} - app.kubernetes.io/instance: {{ $fullName }}-internal-pages-only # unique ingress identifier - app.kubernetes.io/managed-by: {{ .Release.Service }} - annotations: - nginx.ingress.kubernetes.io/real-ip-header: "X-Forwarded-For" - # Allow access to internal pages from Intershop network addresses and from loopback addresses of the local host container - # Can be extended by additional IPs - {{- $defaultAllowedIPs := list "127.0.0.0/8,195.110.61.246" }} - {{- $additionalAllowedIPs := compact (.Values.ingress.accessInternalWebAdapterPagesAllowIPs | default (list "")) }} - nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," (concat $defaultAllowedIPs $additionalAllowedIPs) | quote }} -{{- with .Values.ingress.annotations }} -{{ toYaml . | indent 4 }} -{{- end }} -spec: - {{- if .Values.ingress.className }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - - path: /INTERSHOP/wastatistics - pathType: Exact - backend: - service: - name: {{ $fullName }}-wa - port: - name: http - {{- end }} {{- end }} diff --git a/charts/icm-web/values.yaml b/charts/icm-web/values.yaml index 15216a14..8220c4b8 100644 --- a/charts/icm-web/values.yaml +++ b/charts/icm-web/values.yaml @@ -222,10 +222,6 @@ ingress: # - secretName: chart-example-tls # hosts: # - chart-example.local - # define list of IPs which are allowed to access internal pages of the webadapter service (e.g. "wastatistics") - # Intershop network addresses and loopback addresses of the local host container are already permitted by default - # accessInternalWebAdapterPagesAllowIPs: - # - 10.0.0.0/8 nameOverride: "" fullnameOverride: ""