mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common)!: Release v3.0.0-beta1 (#278)
This commit is contained in:
parent
deafcf75a1
commit
b78483b0b8
88 changed files with 3697 additions and 1209 deletions
|
@ -39,7 +39,7 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].args
|
||||
value:
|
||||
- |
|
||||
- |-
|
||||
echo hello
|
||||
echo world
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].command
|
||||
value:
|
||||
- |
|
||||
- |-
|
||||
/bin/sh
|
||||
-c
|
||||
|
||||
|
|
|
@ -94,6 +94,25 @@ tests:
|
|||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
|
||||
- it: Implicit ValueFrom in list should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
- name: DYNAMIC_ENV_FROM_LIST
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDoc
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].env[0]
|
||||
value:
|
||||
name: DYNAMIC_ENV_FROM_LIST
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
|
||||
- it: Implicit ValueFrom should pass
|
||||
set:
|
||||
controllers.main.containers.main.env:
|
||||
|
|
|
@ -46,6 +46,10 @@ tests:
|
|||
prefix: test
|
||||
- configMapRef:
|
||||
identifier: config
|
||||
configMaps:
|
||||
config:
|
||||
data:
|
||||
test: test
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
|
@ -72,6 +76,10 @@ tests:
|
|||
- secretRef:
|
||||
identifier: secret
|
||||
prefix: test
|
||||
secrets:
|
||||
secret:
|
||||
stringData:
|
||||
test: test
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 0
|
||||
isKind:
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: container restartPolicy
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
notExists:
|
||||
path: spec.template.spec.containers[0].restartPolicy
|
||||
|
||||
- it: custom restartPolicy should pass
|
||||
set:
|
||||
controllers.main.containers:
|
||||
main:
|
||||
restartPolicy: Always
|
||||
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].restartPolicy
|
||||
value: Always
|
|
@ -9,7 +9,6 @@ tests:
|
|||
controllers.main.containers:
|
||||
main:
|
||||
nameOverride: template-test
|
||||
controller: main
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
asserts:
|
||||
|
@ -25,7 +24,6 @@ tests:
|
|||
set:
|
||||
controllers.main.containers:
|
||||
main:
|
||||
controller: main
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
asserts:
|
||||
|
@ -42,7 +40,6 @@ tests:
|
|||
controllers.main.containers:
|
||||
main:
|
||||
nameOverride: "{{ .Release.Name }}-container"
|
||||
controller: main
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
asserts:
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
suite: container probes
|
||||
templates:
|
||||
- common.yaml
|
||||
|
||||
set:
|
||||
controllers.main.containers.main.probes.liveness.enabled: true
|
||||
controllers.main.containers.main.probes.readiness.enabled: true
|
||||
controllers.main.containers.main.probes.startup.enabled: true
|
||||
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
|
@ -40,9 +46,9 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
failureThreshold: 30
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
|
@ -87,9 +93,9 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
failureThreshold: 30
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
|
@ -130,9 +136,9 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
failureThreshold: 30
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: 80
|
||||
timeoutSeconds: 1
|
||||
|
@ -162,6 +168,7 @@ tests:
|
|||
main:
|
||||
ports:
|
||||
http:
|
||||
protocol: HTTP
|
||||
port: &port 80
|
||||
|
||||
controllers.main.containers.main.probes:
|
||||
|
@ -462,9 +469,9 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
failureThreshold: 30
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
|
|
|
@ -4,17 +4,6 @@ suite: Container validations
|
|||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: image required to be a dictionary
|
||||
set:
|
||||
controllers:
|
||||
main:
|
||||
containers:
|
||||
test:
|
||||
image: "test:latest"
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "Image required to be a dictionary with repository and tag fields. (controller main, container test)"
|
||||
|
||||
- it: image repository is required
|
||||
set:
|
||||
controllers:
|
||||
|
|
|
@ -17,7 +17,8 @@ tests:
|
|||
set:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
asserts:
|
||||
- documentIndex: &DeploymentDoc 1
|
||||
isKind:
|
||||
|
@ -123,7 +124,6 @@ tests:
|
|||
set:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
accessMode: ReadWriteMany
|
||||
size: 1G
|
||||
globalMounts:
|
||||
|
@ -143,7 +143,6 @@ tests:
|
|||
set:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
existingClaim: myClaim
|
||||
globalMounts:
|
||||
- path: /config
|
||||
|
@ -164,7 +163,6 @@ tests:
|
|||
set:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
type: hostPath
|
||||
hostPath: /tmp
|
||||
globalMounts:
|
||||
|
@ -184,7 +182,6 @@ tests:
|
|||
set:
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
type: hostPath
|
||||
hostPath: /dev
|
||||
globalMounts:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue