feat(common): Release common-3.0.2

This commit is contained in:
Bernd Schorgers 2024-03-11 21:33:52 +01:00
parent 1e00c7f252
commit e20623adf9
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
16 changed files with 127 additions and 22 deletions

View file

@ -87,3 +87,21 @@ tests:
equal:
path: metadata.name
value: RELEASE-NAME-http
- it: with templated nameOverride should pass
set:
configMaps:
config:
data:
test: test
nameOverride: "{{ .Release.Name }}"
asserts:
- hasDocuments:
count: 2
- documentIndex: &ConfigmapDocument 1
isKind:
of: ConfigMap
- documentIndex: *ConfigmapDocument
equal:
path: metadata.name
value: RELEASE-NAME

View file

@ -56,6 +56,8 @@ tests:
- it: additional controllers with nameOverride should pass
set:
controllers:
main:
nameOverride: "{{ .Release.Name }}"
second:
nameOverride: testOverride
containers:
@ -72,7 +74,7 @@ tests:
- documentIndex: *firstDeploymentDoc
equal:
path: metadata.name
value: RELEASE-NAME-main
value: RELEASE-NAME
- documentIndex: *firstDeploymentDoc
equal:
path: metadata.labels['app.kubernetes.io/component']

View file

@ -23,6 +23,32 @@ tests:
path: spec.rules[0].http.paths[0].path
value: "/"
- it: nameOverride should pass
set:
ingress.main:
nameOverride: test
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: metadata.name
value: RELEASE-NAME-test
- it: nameOverride with template should pass
set:
ingress.main:
nameOverride: "{{ .Release.Name }}"
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: metadata.name
value: RELEASE-NAME
- it: custom host and path should pass
set:
ingress.main:

View file

@ -32,6 +32,20 @@ tests:
path: metadata.name
value: RELEASE-NAME-http
- it: custom name suffix with template should pass
values:
- ../_values/service_main_default.yaml
set:
service.main.nameOverride: "{{ .Release.Name }}"
asserts:
- documentIndex: &ServiceDocument 1
isKind:
of: Service
- documentIndex: *ServiceDocument
equal:
path: metadata.name
value: RELEASE-NAME
- it: multiple should pass
values:
- ../_values/service_main_default.yaml