You've already forked athens-proxy-charts
fix(deployment): mount secret with environment variables
This commit is contained in:
51
unittests/deployment/env.yaml
Normal file
51
unittests/deployment/env.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
chart:
|
||||
appVersion: 0.1.0
|
||||
version: 0.1.0
|
||||
suite: Deployment template
|
||||
release:
|
||||
name: athens-proxy-unittest
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/deployment.yaml
|
||||
- templates/secretEnv.yaml
|
||||
tests:
|
||||
- it: Rendering default without mounted env secret
|
||||
asserts:
|
||||
- notExists:
|
||||
path: spec.template.metadata.annotations.checksum/secret-athens-proxy-unittest-env
|
||||
template: templates/deployment.yaml
|
||||
- notContains:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
content:
|
||||
secretRef:
|
||||
name: athens-proxy-unittest-env
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Rendering default with mounted env secret
|
||||
set:
|
||||
config.env.enabled: true
|
||||
asserts:
|
||||
- exists:
|
||||
path: spec.template.metadata.annotations.checksum/secret-athens-proxy-unittest-env
|
||||
template: templates/deployment.yaml
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
content:
|
||||
secretRef:
|
||||
name: athens-proxy-unittest-env
|
||||
template: templates/deployment.yaml
|
||||
|
||||
- it: Rendering default with mounted env secret
|
||||
set:
|
||||
config.env.enabled: true
|
||||
config.env.existingSecret.enabled: true
|
||||
asserts:
|
||||
- notExists:
|
||||
path: spec.template.metadata.annotations.checksum/secret-athens-proxy-unittest-env
|
||||
template: templates/deployment.yaml
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
content:
|
||||
secretRef:
|
||||
name: athens-proxy-unittest-env
|
||||
template: templates/deployment.yaml
|
Reference in New Issue
Block a user