fix(deployment): mount secret with environment variables
Some checks failed
Generate README / generate-parameters (push) Failing after 10s
Helm / helm-lint (push) Has been cancelled
Helm / helm-unittest (push) Has been cancelled

This commit is contained in:
2025-10-12 18:48:18 +02:00
parent d1e5accccb
commit f63450aec4
6 changed files with 82 additions and 1 deletions

View 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