mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
39
charts/library/common-test/tests/pod/hostIPC_test.yaml
Normal file
39
charts/library/common-test/tests/pod/hostIPC_test.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
suite: pod security
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostIPC
|
||||
value: false
|
||||
|
||||
- it: hostIPC disabled should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
hostIPC: false
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostIPC
|
||||
value: false
|
||||
|
||||
- it: hostIPC enabled should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
hostIPC: true
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostIPC
|
||||
value: true
|
39
charts/library/common-test/tests/pod/hostPID_test.yaml
Normal file
39
charts/library/common-test/tests/pod/hostPID_test.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
suite: pod security
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostPID
|
||||
value: false
|
||||
|
||||
- it: hostPID disabled should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
hostPID: false
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostPID
|
||||
value: false
|
||||
|
||||
- it: hostPID enabled should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
hostPID: true
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostPID
|
||||
value: true
|
|
@ -0,0 +1,43 @@
|
|||
suite: pod initContainers
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: with custom env vars dict should pass
|
||||
set:
|
||||
controllers.main.initContainers:
|
||||
init1:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
env:
|
||||
int: 1
|
||||
float: 1.5
|
||||
string: value_of_env
|
||||
template: "{{ .Release.Name }}-admin"
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.initContainers[0].env[0]
|
||||
value:
|
||||
name: float
|
||||
value: "1.5"
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.initContainers[0].env[1]
|
||||
value:
|
||||
name: int
|
||||
value: "1"
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.initContainers[0].env[2]
|
||||
value:
|
||||
name: string
|
||||
value: value_of_env
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.initContainers[0].env[3]
|
||||
value:
|
||||
name: template
|
||||
value: RELEASE-NAME-admin
|
64
charts/library/common-test/tests/pod/network_test.yaml
Normal file
64
charts/library/common-test/tests/pod/network_test.yaml
Normal file
|
@ -0,0 +1,64 @@
|
|||
suite: pod network
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostNetwork
|
||||
value: false
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.dnsPolicy
|
||||
value: ClusterFirst
|
||||
|
||||
- it: hostNetwork disabled should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
hostNetwork: false
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostNetwork
|
||||
value: false
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.dnsPolicy
|
||||
value: ClusterFirst
|
||||
|
||||
- it: hostNetwork enabled should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
hostNetwork: true
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.hostNetwork
|
||||
value: true
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.dnsPolicy
|
||||
value: ClusterFirstWithHostNet
|
||||
|
||||
- it: custom dnsPolicy should pass
|
||||
set:
|
||||
defaultPodOptions:
|
||||
dnsPolicy: None
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.dnsPolicy
|
||||
value: None
|
25
charts/library/common-test/tests/pod/replicas_test.yaml
Normal file
25
charts/library/common-test/tests/pod/replicas_test.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
suite: pod replicas
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.replicas
|
||||
value: 1
|
||||
|
||||
- it: custom replicas should pass
|
||||
set:
|
||||
controllers.main.replicas: 3
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.replicas
|
||||
value: 3
|
103
charts/library/common-test/tests/pod/sidecars_test.yaml
Normal file
103
charts/library/common-test/tests/pod/sidecars_test.yaml
Normal file
|
@ -0,0 +1,103 @@
|
|||
suite: pod sidecar containers
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: with explicit name should pass
|
||||
set:
|
||||
controllers.main.containers:
|
||||
additional1:
|
||||
nameOverride: template-test
|
||||
image:
|
||||
repository: test
|
||||
tag: test
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].name
|
||||
value: template-test
|
||||
|
||||
- it: with implicit name should pass
|
||||
set:
|
||||
controllers.main.containers:
|
||||
additional1:
|
||||
image:
|
||||
repository: test
|
||||
tag: test
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].name
|
||||
value: additional1
|
||||
|
||||
- it: with templated name should pass
|
||||
set:
|
||||
controllers.main.containers:
|
||||
additional1:
|
||||
nameOverride: "{{ .Release.Name }}-container"
|
||||
image:
|
||||
repository: test
|
||||
tag: test
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].name
|
||||
value: RELEASE-NAME-container
|
||||
|
||||
- it: with custom env vars dict should pass
|
||||
set:
|
||||
controllers.main.containers:
|
||||
main:
|
||||
env:
|
||||
main_env: value
|
||||
additional1:
|
||||
image:
|
||||
repository: test
|
||||
tag: test
|
||||
env:
|
||||
int: 1
|
||||
float: 1.5
|
||||
string: value_of_env
|
||||
template: "{{ .Release.Name }}-admin"
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.containers[1].env[0]
|
||||
value:
|
||||
name: main_env
|
||||
value: "value"
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: float
|
||||
value: "1.5"
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[1]
|
||||
value:
|
||||
name: int
|
||||
value: "1"
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[2]
|
||||
value:
|
||||
name: string
|
||||
value: value_of_env
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[3]
|
||||
value:
|
||||
name: template
|
||||
value: RELEASE-NAME-admin
|
Loading…
Add table
Add a link
Reference in a new issue