mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 14:59:50 +08:00
* fix
* fix
* some more
* somefixs
* whops
* initial structure
* finish up configmap
* secret class
* runtest secret
* move files arround
* ignore
* make clear on call template that need root context
* imagePullSecret (minus targetSelector)
* move out of the way
* clean up comment
* deployment basic spec
* daemonset basic spec
* statefulset spec
* split file
* docs
* update values
* job spec
* job docs
* cronJob basic spec
* job in cron test
* add common version
* podsepc
* whoopsis
* selectorlabels and pod metadata
* job and cron pod metadata
* update docs
* consistent order
* get ready for pod
* first targetSelector
* remove todo
* update docs
* add hostnet and enableservicelinks
* update selector logic
* update docs
* add tests for restartpolicy
* schedulerName
* priorityclassname
* hostname
* termperiodsec
* nodeselector
* add fail case
* host aliases
* dns policy
* dns config
* tolerations
* serviceaccoutn class, spawner, saname selector
* add pod todo
* update some tests
* add runtimeclassname
* controllers -> workload and plurar to singular
* require at least 1 primary on enabled SAs
* fix script
* remove wrong comment
* update naming scheme
* update rbac values ref
* rbac docs
* rbac's
* append short name, for future use
* update comments
* initial service wireframe
* shorten line
* simplify labels and update tests
* service selectors
* simplify error messages
* finish clusterIP type
* loadbalancer
* noedport
* externalname
* external ip
* update service
* fix highlighting
* session affinity
* add comment
* update comments
* service ports
* fix indentation
* externalname can have no ports
* fixup externalIP
* add pvc class and spawner and tests
* add nfs and emptyDir vols
* example
* extend docs a bit
* not create pvc if existing claim is set
* helm... you are dumb really. how this fixes an unrelated test
* add configmap
* add secret vol
* add pvc vol
* add hostpath
* finish volumes
* initial podsec
* podsec context with some todo's to check
* automatic sysctls
* remove todo
* update doc struct
* split docs
* split service docs
* initial container plumbing
* fix tests
* fix test
* rename to class
* command and args
* termination
* add lifecycle
* int value from tpl
* another case
* fix service protocol tpl
* update readme
* ports
* update todo
* cleanup values a bit
* only add sysctl when port is bellow 1024
* whops, thats a different range
* update avlue
* move some old docs to the "to be deleted" dir
* externalinteface validation
* update an error message and apply externalinterface annotations to workloads
* external interfaces
* TZ - TIMEZONE
* update rdoc
* reduce code duple
* device vol type
* initial certificate plumbing
* update comments
* finish secret creation of certificate
* cert dosc
* volumeMounts
* scale certs
* doc
* add tests for volMounts
* values updates
* update todo
* add test case
* remove some todo
* update todos
* vct
* remove tdoo
* restore default
* rename function
* make selectorlabels a bit better
* trim
* some cleanup
* update some ci values
* update ci
* rollingup defaults
* rename dir
* fix nil pointers
* check the same strategy var
* whops
* fix tests
* typo
* not a good day for copy paste
* move check
* move another check
* fix some tests for upcoming probes
* one mroe
* split docs
* add default probes for `main` and docs
* add probes and some ci testruns
* whops
* fix an edge case
* add an error for edge case
* runtests
* runtest updaets
* update
* check if podvalues exist first
* force types
* force only one of the 2
* quote labels and annotaions values
* job/cron have auto gen selectors
* remove false test
* fix maxsureg
* fix end
* different fix
* fix some tests
* fix rollUp
* try to fix 3.9.4 helm
* move file to helpers
* use capital types in probes and lifecycle
* Revert "use capital types in probes and lifecycle"
This reverts commit 380ebd5f1f.
* typo
* use lowercase for protocol everywhere
* rbac runtest
* prune old
* add resources
* add resources
* fix rbc
* fix sa naming in pod
* fix test
* 44 suppl group on gpu
* remove todo
* extract function in another file
* whops
* add securityContext implementation
* add fail cases
* add rest of the tests
* remove todo
* envFrom
* minify
* env list
* add env
* add envdupe check tests
* add fixed envs
* replace containers with callers
* add callers
* add initContainer
* add init run test
* reset default test val
* add name tests
* add some more tests
* rename
* validate workload type only if enabled
* lint fix for 3.9.4
* add tpl on init enabled
* whops
* fix init
* echo
* echo
* args...
* list
* comment out disabled persistences
* fix some typos and improve resources `requests` requirement
* improve docs a bit
* require name,description,version,type
* add some wording regarding what Helm Template column means
* add title as requirement
* remove scheduler
* remove priority class name
* remove nfs + externalIP
* remove LB
* remove STS & VCT
* fix a test
* remove nodeselector
* remove DS
* remove pvc
* remove todo
* conditionally print the type, as we might want to use the template to select all objects inthe chart
* add some docs
* docs for notes
* add `tls.` in the certificate secret, according to k8s docs
* add some basic docs around the rest of the options
* clean values.yaml
* catch an edge case
* remove externalName
* set autmountSA on SA to false
* add note about the automountSA
674 lines
19 KiB
YAML
674 lines
19 KiB
YAML
suite: container probe test
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: should create the probes correctly
|
|
set:
|
|
some_port: 80
|
|
some_path: /healthz
|
|
some_command: echo
|
|
probe_type: exec
|
|
image: &image
|
|
repository: nginx
|
|
tag: 1.19.0
|
|
pullPolicy: IfNotPresent
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes: &probes
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: "{{ .Values.some_port }}"
|
|
path: "{{ .Values.some_path }}"
|
|
readiness:
|
|
enabled: true
|
|
type: tcp
|
|
port: 123
|
|
startup:
|
|
enabled: true
|
|
type: "{{ .Values.probe_type }}"
|
|
command:
|
|
- "{{ .Values.some_command }}"
|
|
- hello
|
|
asserts:
|
|
- documentIndex: &deploymentDoc 0
|
|
isKind:
|
|
of: Deployment
|
|
- documentIndex: *deploymentDoc
|
|
isAPIVersion:
|
|
of: apps/v1
|
|
- documentIndex: *deploymentDoc
|
|
isSubset:
|
|
path: spec.template.spec.containers[0]
|
|
content:
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 80
|
|
scheme: HTTP
|
|
failureThreshold: 5
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 5
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 123
|
|
failureThreshold: 5
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
successThreshold: 2
|
|
timeoutSeconds: 5
|
|
startupProbe:
|
|
exec:
|
|
command:
|
|
- echo
|
|
- hello
|
|
failureThreshold: 60
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
timeoutSeconds: 2
|
|
|
|
- it: should create https probe
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes: &probes
|
|
liveness:
|
|
enabled: true
|
|
type: https
|
|
port: 443
|
|
spec:
|
|
initialDelaySeconds: 120
|
|
timeoutSeconds: 10
|
|
periodSeconds: 15
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
readiness:
|
|
enabled: true
|
|
type: tcp
|
|
port: 443
|
|
spec:
|
|
initialDelaySeconds: 50
|
|
timeoutSeconds: 30
|
|
periodSeconds: 8
|
|
successThreshold: 5
|
|
failureThreshold: 9
|
|
startup:
|
|
enabled: true
|
|
type: tcp
|
|
port: 443
|
|
spec:
|
|
initialDelaySeconds: 25
|
|
timeoutSeconds: 40
|
|
periodSeconds: 7
|
|
successThreshold: 1
|
|
failureThreshold: 12
|
|
asserts:
|
|
- documentIndex: &deploymentDoc 0
|
|
isKind:
|
|
of: Deployment
|
|
- documentIndex: *deploymentDoc
|
|
isAPIVersion:
|
|
of: apps/v1
|
|
- documentIndex: *deploymentDoc
|
|
isSubset:
|
|
path: spec.template.spec.containers[0]
|
|
content:
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 443
|
|
scheme: HTTPS
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 15
|
|
successThreshold: 1
|
|
timeoutSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 443
|
|
failureThreshold: 9
|
|
initialDelaySeconds: 50
|
|
periodSeconds: 8
|
|
successThreshold: 5
|
|
timeoutSeconds: 30
|
|
startupProbe:
|
|
tcpSocket:
|
|
port: 443
|
|
failureThreshold: 12
|
|
initialDelaySeconds: 25
|
|
periodSeconds: 7
|
|
successThreshold: 1
|
|
timeoutSeconds: 40
|
|
|
|
# Failures
|
|
- it: should fail with invalid probe
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: false
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
invalid:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected probe to be one of [liveness, readiness, startup], but got [invalid]
|
|
|
|
- it: should fail without probes defined
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes: {}
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected non-empty <probes>
|
|
|
|
- it: should fail without liveness defined
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes.liveness> to be defined
|
|
|
|
- it: should fail without readiness defined
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes.readiness> to be defined
|
|
|
|
- it: should fail without startup defined
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: false
|
|
readiness:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes.startup> to be defined
|
|
|
|
- it: should fail with invalid type
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: invalid
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected probe type to be one of [http, https, tcp, grpc, exec], but got [invalid]
|
|
|
|
- it: should fail with successThreshold more than 1 on liveness
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
successThreshold: 2
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <successThreshold> to be 1 on [liveness] probe
|
|
|
|
- it: should fail with successThreshold more than 1 on startup
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
startup:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
successThreshold: 2
|
|
readiness:
|
|
enabled: false
|
|
liveness:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <successThreshold> to be 1 on [startup] probe
|
|
|
|
- it: should fail with initialDelaySeconds not a number
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
initialDelaySeconds: invalid
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <initialDelaySeconds> to be a number, but got [invalid]
|
|
|
|
- it: should fail with failureThreshold not a number
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
failureThreshold: invalid
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <failureThreshold> to be a number, but got [invalid]
|
|
|
|
- it: should fail with successThreshold not a number
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
successThreshold: invalid
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <successThreshold> to be a number, but got [invalid]
|
|
|
|
- it: should fail with timeoutSeconds not a number
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
timeoutSeconds: invalid
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <timeoutSeconds> to be a number, but got [invalid]
|
|
|
|
- it: should fail with periodSeconds not a number
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
spec:
|
|
periodSeconds: invalid
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <periodSeconds> to be a number, but got [invalid]
|
|
|
|
- it: should fail with empty command on exec type
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: exec
|
|
command: []
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected non-empty <probes> <command> on [exec] type
|
|
|
|
- it: should fail with empty port on grpc type
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: grpc
|
|
port: ""
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected non-empty <probes> <port> on [grpc] type
|
|
|
|
- it: should fail with empty port on tcp type
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: tcp
|
|
port: ""
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected non-empty <probes> <port> on [tcp] type
|
|
|
|
- it: should fail with empty port on http type
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: ""
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected non-empty <probes> <port> on [http] type
|
|
|
|
- it: should fail with invalid path on http type
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: 8080
|
|
path: not-starting-with-slash
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected <probes> <path> to start with a forward slash [/] on <http> type
|
|
|
|
- it: should fail with empty value in http headers
|
|
set:
|
|
image: *image
|
|
workload:
|
|
workload-name1:
|
|
enabled: true
|
|
primary: true
|
|
type: Deployment
|
|
podSpec:
|
|
containers:
|
|
container-name1:
|
|
enabled: true
|
|
primary: true
|
|
imageSelector: image
|
|
probes:
|
|
liveness:
|
|
enabled: true
|
|
type: http
|
|
port: not-starting-with-slash
|
|
httpHeaders:
|
|
key:
|
|
readiness:
|
|
enabled: false
|
|
startup:
|
|
enabled: false
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: Container - Expected non-empty <value> on <httpHeaders>
|