Merge branch 'update-middlewares' into fixup-chartcontext

This commit is contained in:
Stavros Kois
2023-12-08 13:55:29 +02:00
committed by GitHub
2 changed files with 0 additions and 77 deletions

View File

@@ -265,71 +265,6 @@ tests:
value:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
- it: should set correct namespace when ingressClassName is defined
set:
service: *service
operator: *operator
global: *global
ingress:
my-ingress:
enabled: true
primary: true
integrations:
traefik:
enabled: true
ingressClassName: some-class
hosts: *hosts
asserts:
- documentIndex: *ingressDoc
isKind:
of: Ingress
- documentIndex: *ingressDoc
equal:
path: metadata.name
value: test-release-name-common-test
- documentIndex: *ingressDoc
equal:
path: metadata.annotations
value:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.middlewares: chain-basic-some-class@kubernetescrd
- it: should set correct namespace when ingressClassName is defined in SCALE
set:
service: *service
operator: *operator
global:
ixChartContext:
imNotEmpty: true
traefik:
fixedMiddlewares:
- name: chain-basic
namespace: some-namespace
namespace: ix-namespace
ingress:
my-ingress:
enabled: true
primary: true
integrations:
traefik:
enabled: true
ingressClassName: some-class
hosts: *hosts
asserts:
- documentIndex: *ingressDoc
isKind:
of: Ingress
- documentIndex: *ingressDoc
equal:
path: metadata.name
value: test-release-name-common-test
- documentIndex: *ingressDoc
equal:
path: metadata.annotations
value:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.middlewares: chain-basic-ix-some-class@kubernetescrd
- it: should add the defined middlewares to the ingress
set:
operator: *operator

View File

@@ -122,18 +122,6 @@
{{- fail (printf "Ingress - Could not determine namespace for middleware [%s]. Make sure middleware is created or explicitly specify [namespace]" $mid.name) -}}
{{- end -}}
{{/* TODO: FIXME: Fix this hack
If ingressClassName is set, use that as namespace
*/}}
{{- if $traefik.ingressClassName -}}
{{- $midNamespace = tpl $traefik.ingressClassName $rootCtx -}}
{{/* On SCALE prepend with ix- */}}
{{- if $rootCtx.Values.global.ixChartContext -}}
{{- $midNamespace = (printf "ix-%s" $midNamespace) -}}
{{- end -}}
{{- end -}}
{{/* Format middleware */}}
{{- $formattedMiddlewares = mustAppend $formattedMiddlewares (printf "%s-%s@kubernetescrd" $mid.name $midNamespace) -}}
{{- end -}}