mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release common library 3.7.1 (#383)
Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
parent
c94a28baa3
commit
433f6d132b
146 changed files with 232 additions and 222 deletions
|
@ -0,0 +1,195 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: container envFrom values
|
||||
templates:
|
||||
- common.yaml
|
||||
values:
|
||||
- ../_values/controllers_main_default_container.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
notExists:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
|
||||
- it: explicit envFrom should pass
|
||||
set:
|
||||
controllers.main.containers.main.envFrom:
|
||||
- secretRef:
|
||||
name: myCustomSecret
|
||||
prefix: test
|
||||
- configMapRef:
|
||||
name: myCustomConfig
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[0]
|
||||
value:
|
||||
secretRef:
|
||||
name: myCustomSecret
|
||||
prefix: test
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[1]
|
||||
value:
|
||||
configMapRef:
|
||||
name: myCustomConfig
|
||||
|
||||
- it: envFrom from defaultContainerOptions should pass
|
||||
set:
|
||||
controllers.main.defaultContainerOptions:
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: myCustomSecret
|
||||
prefix: test
|
||||
- configMapRef:
|
||||
name: myCustomConfig
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[0]
|
||||
value:
|
||||
secretRef:
|
||||
name: myCustomSecret
|
||||
prefix: test
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[1]
|
||||
value:
|
||||
configMapRef:
|
||||
name: myCustomConfig
|
||||
|
||||
- it: envFrom from defaultContainerOptions with container override should pass
|
||||
set:
|
||||
controllers.main.defaultContainerOptions:
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: myCustomSecret
|
||||
prefix: test
|
||||
- configMapRef:
|
||||
name: myCustomConfig
|
||||
controllers.main.containers.main.envFrom:
|
||||
- secretRef:
|
||||
name: myCustomSecretOverride
|
||||
prefix: test
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[0]
|
||||
value:
|
||||
secretRef:
|
||||
name: myCustomSecretOverride
|
||||
prefix: test
|
||||
- documentIndex: *DeploymentDoc
|
||||
notExists:
|
||||
path: spec.template.spec.containers[0].envFrom[1]
|
||||
|
||||
- it: envFrom configmap identifier reference should pass
|
||||
set:
|
||||
controllers.main.containers.main.envFrom:
|
||||
- configMap: config
|
||||
prefix: test
|
||||
- configMapRef:
|
||||
identifier: config
|
||||
configMaps:
|
||||
config:
|
||||
data:
|
||||
test: test
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[0]
|
||||
value:
|
||||
configMapRef:
|
||||
name: RELEASE-NAME-config
|
||||
prefix: test
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[1]
|
||||
value:
|
||||
configMapRef:
|
||||
name: RELEASE-NAME-config
|
||||
|
||||
- it: envFrom Secret identifier reference should pass
|
||||
set:
|
||||
controllers.main.containers.main.envFrom:
|
||||
- secret: secret
|
||||
prefix: test
|
||||
- secretRef:
|
||||
identifier: secret
|
||||
prefix: test
|
||||
secrets:
|
||||
secret:
|
||||
stringData:
|
||||
test: test
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[0]
|
||||
value:
|
||||
secretRef:
|
||||
name: RELEASE-NAME-secret
|
||||
prefix: test
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[1]
|
||||
value:
|
||||
secretRef:
|
||||
name: RELEASE-NAME-secret
|
||||
prefix: test
|
||||
|
||||
- it: envFrom with templated name reference should pass
|
||||
set:
|
||||
controllers.main.containers.main.envFrom:
|
||||
- configMap: "{{ .Release.Name }}-config"
|
||||
- configMapRef:
|
||||
name: "{{ .Release.Name }}-config2"
|
||||
- secret: "{{ .Release.Name }}-secret"
|
||||
- secretRef:
|
||||
name: "{{ .Release.Name }}-secret2"
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[0]
|
||||
value:
|
||||
configMapRef:
|
||||
name: RELEASE-NAME-config
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[1]
|
||||
value:
|
||||
configMapRef:
|
||||
name: RELEASE-NAME-config2
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[2]
|
||||
value:
|
||||
secretRef:
|
||||
name: RELEASE-NAME-secret
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].envFrom[3]
|
||||
value:
|
||||
secretRef:
|
||||
name: RELEASE-NAME-secret2
|
Loading…
Add table
Add a link
Reference in a new issue