mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-07 09:26:24 -03:00
fix and test clusterCertificate
This commit is contained in:
@@ -148,7 +148,7 @@ tests:
|
||||
- some-other-test-host
|
||||
secretName: test-release-name-common-test-scale-tls-1
|
||||
|
||||
- it: should pass with ingress created with tls with certificateIssuer
|
||||
- it: should pass with ingress created with clusterCertificate
|
||||
set:
|
||||
operator: *operator
|
||||
service: *service
|
||||
@@ -167,10 +167,10 @@ tests:
|
||||
- hosts:
|
||||
- test-host
|
||||
- other-test-host
|
||||
certificateIssuer: some-issuer
|
||||
clusterCertificate: some-cert
|
||||
- hosts:
|
||||
- some-other-test-host
|
||||
certificateIssuer: some-other-issuer
|
||||
clusterCertificate: some-other-cert
|
||||
integrations: &integrations
|
||||
traefik:
|
||||
enabled: false
|
||||
@@ -189,7 +189,53 @@ tests:
|
||||
- hosts:
|
||||
- test-host
|
||||
- other-test-host
|
||||
secretName: test-release-name-common-test-tls-0
|
||||
secretName: certificate-issuer-some-cert
|
||||
- hosts:
|
||||
- some-other-test-host
|
||||
secretName: test-release-name-common-test-tls-1
|
||||
secretName: certificate-issuer-some-other-cert
|
||||
|
||||
# - it: should pass with ingress created with tls with certificateIssuer
|
||||
# set:
|
||||
# operator: *operator
|
||||
# service: *service
|
||||
# ingress:
|
||||
# my-ingress:
|
||||
# enabled: true
|
||||
# primary: true
|
||||
# hosts:
|
||||
# - host: test-host
|
||||
# paths:
|
||||
# - path: /test-path
|
||||
# - host: other-test-host
|
||||
# paths:
|
||||
# - path: /other-test-path
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - test-host
|
||||
# - other-test-host
|
||||
# certificateIssuer: some-issuer
|
||||
# - hosts:
|
||||
# - some-other-test-host
|
||||
# certificateIssuer: some-other-issuer
|
||||
# integrations: &integrations
|
||||
# traefik:
|
||||
# enabled: false
|
||||
# asserts:
|
||||
# - documentIndex: &ingressDoc 1
|
||||
# isKind:
|
||||
# of: Ingress
|
||||
# - documentIndex: *ingressDoc
|
||||
# equal:
|
||||
# path: metadata.name
|
||||
# value: test-release-name-common-test
|
||||
# - documentIndex: *ingressDoc
|
||||
# equal:
|
||||
# path: spec.tls
|
||||
# value:
|
||||
# - hosts:
|
||||
# - test-host
|
||||
# - other-test-host
|
||||
# secretName: test-release-name-common-test-tls-0
|
||||
# - hosts:
|
||||
# - some-other-test-host
|
||||
# secretName: test-release-name-common-test-tls-1
|
||||
|
||||
@@ -78,10 +78,10 @@ spec:
|
||||
{{- $secretName = tpl $t.secretName $rootCtx -}}
|
||||
{{- else if $t.scaleCert -}}
|
||||
{{- $secretName = printf "%s-scale-tls-%d" $objectData.name ($idx | int) -}}
|
||||
{{- else if $t.certificateIssuer -}}
|
||||
{{- else if $t.certificateIssuer -}} {{/* TODO: UT */}}
|
||||
{{- $secretName = printf "%s-tls-%d" $objectData.name ($idx | int) -}}
|
||||
{{- else if $t.clusterCertificate -}}
|
||||
{{/* TODO: Needs the refactor of Certificate object */}}
|
||||
{{- $secretName = printf "certificate-issuer-%s" (tpl $t.clusterCertificate $rootCtx) -}}
|
||||
{{- end }}
|
||||
- secretName: {{ $secretName }}
|
||||
hosts:
|
||||
|
||||
Reference in New Issue
Block a user