mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 05:26:21 -03:00
Merge branch 'update-middlewares' into fixup-chartcontext
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user