Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 0 additions & 120 deletions charts/library/common-test/tests/container/envList_test.yaml

This file was deleted.

122 changes: 8 additions & 114 deletions charts/library/common-test/tests/container/env_dupe_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,12 @@ release:
namespace: test-release-namespace
tests:
# Failures
- it: should fail with dupe env in env and envList
- it: should fail with dupe env in env and envFrom configmap
set:
image: &image
repository: nginx
tag: 1.19.0
pullPolicy: IfNotPresent
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec:
containers:
container-name1:
enabled: true
primary: true
imageSelector: image
probes: &probes
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
env:
VAR1: some_value
envList:
- name: VAR1
value: 123
asserts:
- failedTemplate:
errorMessage: Container - Environment Variable [VAR1] in [containers.container-name1.envList] tried to override the Environment Variable that is already defined in [containers.container-name1.env]

- it: should fail with dupe env in env and envFrom configmap
set:
image: *image
configmap:
configmap-name:
enabled: true
Expand All @@ -58,7 +28,13 @@ tests:
enabled: true
primary: true
imageSelector: image
probes: *probes
probes: &probes
readiness:
enabled: false
liveness:
enabled: false
startup:
enabled: false
env:
VAR1: some_value
envFrom:
Expand Down Expand Up @@ -97,66 +73,6 @@ tests:
- failedTemplate:
errorMessage: Container - Environment Variable [VAR1] in [containers.container-name1.env] tried to override the Environment Variable that is already defined in [Secret - secret-name]

- it: should fail with dupe env in envList and envFrom secret
set:
image: *image
secret:
secret-name:
enabled: true
data:
VAR1: value
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec:
containers:
container-name1:
enabled: true
primary: true
imageSelector: image
probes: *probes
envList:
- name: VAR1
value: some_value
envFrom:
- secretRef:
name: secret-name
asserts:
- failedTemplate:
errorMessage: Container - Environment Variable [VAR1] in [containers.container-name1.envList] tried to override the Environment Variable that is already defined in [Secret - secret-name]

- it: should fail with dupe env in envList and envFrom configmap
set:
image: *image
configmap:
configmap-name:
enabled: true
data:
VAR1: value
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec:
containers:
container-name1:
enabled: true
primary: true
imageSelector: image
probes: *probes
envList:
- name: VAR1
value: some_value
envFrom:
- configMapRef:
name: configmap-name
asserts:
- failedTemplate:
errorMessage: Container - Environment Variable [VAR1] in [containers.container-name1.envList] tried to override the Environment Variable that is already defined in [ConfigMap - configmap-name]

- it: should fail with dupe env in fixedEnv and env
set:
image: *image
Expand All @@ -178,28 +94,6 @@ tests:
- failedTemplate:
errorMessage: Container - Environment Variable [TZ] in [containers.container-name1.env] tried to override the Environment Variable that is already defined in [containers.container-name1.fixedEnv]

- it: should fail with dupe env in fixedEnv and envList
set:
image: *image
workload:
workload-name:
enabled: true
primary: true
type: Deployment
podSpec:
containers:
container-name1:
enabled: true
primary: true
imageSelector: image
probes: *probes
envList:
- name: TZ
value: some_value
asserts:
- failedTemplate:
errorMessage: Container - Environment Variable [TZ] in [containers.container-name1.envList] tried to override the Environment Variable that is already defined in [containers.container-name1.fixedEnv]

- it: should fail with dupe env in fixedEnv and envFrom configmap
set:
image: *image
Expand Down
3 changes: 1 addition & 2 deletions charts/library/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ sources:
- https://github.com/trueforge-org/truecharts/tree/master/charts/library/common
- https://hub.docker.com/_/
type: library
version: 28.29.46

version: 29.0.0
33 changes: 15 additions & 18 deletions charts/library/common/docs/cnpg/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Additional labels for CNPG cluster
| ---------- | --------------------------- |
| Key | `cnpg.$name.cluster.labels` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ✅ (On value only) |
| Required | ❌ |
| Helm `tpl` | ✅ (On value only) |
| Default | `{}` |

Example
Expand All @@ -56,8 +56,8 @@ Additional annotations for CNPG cluster
| ---------- | -------------------------------- |
| Key | `cnpg.$name.cluster.annotations` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ✅ (On value only) |
| Required | ❌ |
| Helm `tpl` | ✅ (On value only) |
| Default | `{}` |

Example
Expand Down Expand Up @@ -86,8 +86,8 @@ See container env options in the [container env](/truecharts-common/container/en
| ---------- | ------------------------ |
| Key | `cnpg.$name.cluster.env` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `{}` |

Example
Expand All @@ -113,11 +113,11 @@ See container envFrom options in the [container envFrom](/truecharts-common/cont
:::

| | |
| ---------- | ------------------------ |
| ---------- | ---------------------------- |
| Key | `cnpg.$name.cluster.envFrom` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `[]` |

Example
Expand Down Expand Up @@ -145,8 +145,8 @@ Number of instances
| ---------- | ------------------------------ |
| Key | `cnpg.$name.cluster.instances` |
| Type | `int` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `2` |

Example
Expand Down Expand Up @@ -178,8 +178,8 @@ chart on a single-node cluster.
| ---------- | ------------------------------- |
| Key | `cnpg.$name.cluster.singleNode` |
| Type | `bool` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `false` |

Example
Expand Down Expand Up @@ -215,8 +215,8 @@ issues with CNPG.
| ---------- | ----------------------------- |
| Key | `cnpg.$name.cluster.logLevel` |
| Type | `enum` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `info` |

Example
Expand Down Expand Up @@ -274,9 +274,6 @@ cnpg:
annotation2: annotation2
env:
key: value
envList:
- name: key
value: value
envFrom:
- secretRef:
name: my-secret
Expand Down
Loading