feat(common): Release v2.1.0 (#221)

Co-authored-by: Christopher Larivière <lariviere.c@gmail.com>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-11-10 15:46:55 +01:00 committed by GitHub
parent 272dbef383
commit b360c9885a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 288 additions and 44 deletions

View file

@ -1,6 +1,8 @@
controllers:
main:
type: cronjob
cronjob:
timeZone: UTC
containers:
main:
image:

View file

@ -154,3 +154,51 @@ tests:
value:
name: STATIC_ENV
value: static
- it: Env vars with dependsOn should pass
set:
controllers.main.containers.main.env:
STATIC_ENV: 1
DYNAMIC_ENV:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
dependsOn: STATIC_ENV
ORDERED_ENV:
value: true
dependsOn: STATIC_ENV
DEPENDENT_ENV:
value: moo_two
dependsOn:
- DYNAMIC_ENV
- ORDERED_ENV
asserts:
- documentIndex: &DeploymentDoc 0
isKind:
of: Deployment
- documentIndex: *DeploymentDoc
equal:
path: spec.template.spec.containers[0].env[0]
value:
name: STATIC_ENV
value: "1"
- documentIndex: *DeploymentDoc
equal:
path: spec.template.spec.containers[0].env[1]
value:
name: DYNAMIC_ENV
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- documentIndex: *DeploymentDoc
equal:
path: spec.template.spec.containers[0].env[2]
value:
name: ORDERED_ENV
value: "true"
- documentIndex: *DeploymentDoc
equal:
path: spec.template.spec.containers[0].env[3]
value:
name: DEPENDENT_ENV
value: moo_two

View file

@ -71,3 +71,34 @@ tests:
- documentIndex: 3
isKind:
of: Ingress
- it: multiple with default enabled should pass
set:
ingress.main.enabled: true
ingress.test: {}
asserts:
- hasDocuments:
count: 4
- documentIndex: 0
not: true
isKind:
of: Ingress
- documentIndex: 1
not: true
isKind:
of: Ingress
- documentIndex: &FirstIngressDocument 2
isKind:
of: Ingress
- documentIndex: *FirstIngressDocument
equal:
path: metadata.name
value: RELEASE-NAME
- documentIndex: &SecondIngressDocument 3
isKind:
of: Ingress
- documentIndex: *SecondIngressDocument
equal:
path: metadata.name
value: RELEASE-NAME-test

View file

@ -77,3 +77,20 @@ tests:
equal:
path: spec.rules[0].http.paths[0].path
value: "/RELEASE-NAME.path"
- it: with defaultBackend should pass
set:
ingress.main:
enabled: true
defaultBackend: test
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: spec.defaultBackend
value: test
- documentIndex: *IngressDocument
notExists:
path: spec.rules

View file

@ -42,6 +42,24 @@ tests:
path: spec.hostnames[0]
value: chart-test.local
- it: custom host with template
set:
route.main:
enabled: true
parentRefs:
- name: parentName
namespace: parentNamespace
hostnames:
- "{{ .Release.Name }}.local"
asserts:
- documentIndex: &HTTPRouteDocument 2
isKind:
of: HTTPRoute
- documentIndex: *HTTPRouteDocument
equal:
path: spec.hostnames[0]
value: RELEASE-NAME.local
- it: path matches should only be used for HTTPRoutes
set:
route: