mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common)!: Release v3.0.0-beta4 (#282)
This commit is contained in:
parent
ea9484a7fd
commit
a27c4f6124
16 changed files with 283 additions and 157 deletions
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
# yaml-language-server: $schema=../../common/values.schema.json
|
||||
controllers:
|
||||
main:
|
||||
containers:
|
||||
|
@ -53,7 +55,7 @@ service:
|
|||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 8081
|
||||
port: 8887
|
||||
|
||||
ingress:
|
||||
main:
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
# yaml-language-server: $schema=../../common/values.schema.json
|
||||
controllers:
|
||||
main:
|
||||
containers:
|
||||
|
@ -28,6 +30,13 @@ ingress:
|
|||
- hosts:
|
||||
- "test.local"
|
||||
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 8080
|
||||
|
||||
persistence:
|
||||
media:
|
||||
type: persistentVolumeClaim
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
# yaml-language-server: $schema=../../common/values.schema.json
|
||||
controllers:
|
||||
main:
|
||||
type: cronjob
|
||||
|
@ -11,10 +13,6 @@ controllers:
|
|||
tag: 31
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
service:
|
||||
main:
|
||||
enabled: false
|
||||
|
||||
configMaps:
|
||||
config:
|
||||
enabled: true
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
# yaml-language-server: $schema=../../common/values.schema.json
|
||||
controllers:
|
||||
main:
|
||||
containers:
|
||||
|
@ -6,15 +8,3 @@ controllers:
|
|||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 31
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
service:
|
||||
main:
|
||||
enabled: false
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
enabled: false
|
||||
readiness:
|
||||
enabled: false
|
||||
startup:
|
||||
enabled: false
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
# yaml-language-server: $schema=../../common/values.schema.json
|
||||
controllers:
|
||||
main:
|
||||
strategy: Recreate
|
||||
|
@ -22,6 +24,7 @@ controllers:
|
|||
# -- Configures service settings for the chart.
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 80
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: persistence configmap
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: configmap persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
configmap:
|
||||
type: configMap
|
||||
name: mySettings
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: configmap
|
||||
configMap:
|
||||
name: mySettings
|
||||
|
||||
- it: configmap persistence type with name template should pass
|
||||
set:
|
||||
persistence:
|
||||
configmap:
|
||||
type: configMap
|
||||
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-config'
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: configmap
|
||||
configMap:
|
||||
name: RELEASE-NAME-config
|
||||
|
||||
- it: configmap persistence type with identifier reference should pass
|
||||
set:
|
||||
configMaps:
|
||||
mySettings:
|
||||
data:
|
||||
test: testvalue
|
||||
persistence:
|
||||
configmap:
|
||||
type: configMap
|
||||
identifier: mySettings
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: configmap
|
||||
configMap:
|
||||
name: RELEASE-NAME-mySettings
|
||||
|
||||
- it: configmap persistence type with invalid identifier reference should fail
|
||||
set:
|
||||
persistence:
|
||||
configmap:
|
||||
type: configMap
|
||||
identifier: doesNotExist
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "No configmap found with this identifier. (persistence item 'configmap', identifier 'doesNotExist')"
|
32
charts/library/common-test/tests/persistence/custom.yaml
Normal file
32
charts/library/common-test/tests/persistence/custom.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: persistence custom
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: custom persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
custom-mount:
|
||||
enabled: true
|
||||
type: custom
|
||||
volumeSpec:
|
||||
downwardAPI:
|
||||
items:
|
||||
- path: "labels"
|
||||
fieldRef:
|
||||
fieldPath: metadata.labels
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: custom-mount
|
||||
downwardAPI:
|
||||
items:
|
||||
- fieldRef:
|
||||
fieldPath: metadata.labels
|
||||
path: labels
|
26
charts/library/common-test/tests/persistence/nfs_test.yaml
Normal file
26
charts/library/common-test/tests/persistence/nfs_test.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: persistence nfs
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: nfs persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
nfs:
|
||||
enabled: true
|
||||
type: nfs
|
||||
server: 10.10.0.8
|
||||
path: /tank/nas/library
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: nfs
|
||||
nfs:
|
||||
path: /tank/nas/library
|
||||
server: 10.10.0.8
|
|
@ -0,0 +1,75 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: persistence secret
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: secret persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
secret:
|
||||
enabled: true
|
||||
type: secret
|
||||
name: mySettings
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: secret
|
||||
secret:
|
||||
secretName: mySettings
|
||||
|
||||
- it: secret persistence type with name template should pass
|
||||
set:
|
||||
persistence:
|
||||
secret:
|
||||
enabled: true
|
||||
type: secret
|
||||
name: "{{ .Release.Name }}-config"
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: secret
|
||||
secret:
|
||||
secretName: RELEASE-NAME-config
|
||||
|
||||
- it: secret persistence type with identifier reference should pass
|
||||
set:
|
||||
secrets:
|
||||
mySettings:
|
||||
stringData:
|
||||
test: testvalue
|
||||
persistence:
|
||||
secret:
|
||||
type: secret
|
||||
identifier: mySettings
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: secret
|
||||
secret:
|
||||
secretName: RELEASE-NAME-mySettings
|
||||
|
||||
- it: secret persistence type with invalid identifier reference should fail
|
||||
set:
|
||||
persistence:
|
||||
secret:
|
||||
type: secret
|
||||
identifier: doesNotExist
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "No secret found with this identifier. (persistence item 'secret', identifier 'doesNotExist')"
|
|
@ -1,129 +0,0 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: persistence types
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: custom persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
custom-mount:
|
||||
enabled: true
|
||||
type: custom
|
||||
volumeSpec:
|
||||
downwardAPI:
|
||||
items:
|
||||
- path: "labels"
|
||||
fieldRef:
|
||||
fieldPath: metadata.labels
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: custom-mount
|
||||
downwardAPI:
|
||||
items:
|
||||
- fieldRef:
|
||||
fieldPath: metadata.labels
|
||||
path: labels
|
||||
|
||||
- it: configmap persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
configmap:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: mySettings
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: configmap
|
||||
configMap:
|
||||
name: mySettings
|
||||
|
||||
- it: configmap persistence type with name template should pass
|
||||
set:
|
||||
persistence:
|
||||
configmap:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}-config'
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: configmap
|
||||
configMap:
|
||||
name: RELEASE-NAME-config
|
||||
|
||||
- it: secret persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
secret:
|
||||
enabled: true
|
||||
type: secret
|
||||
name: mySettings
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: secret
|
||||
secret:
|
||||
secretName: mySettings
|
||||
|
||||
- it: secret persistence type with name template should pass
|
||||
set:
|
||||
persistence:
|
||||
secret:
|
||||
enabled: true
|
||||
type: secret
|
||||
name: "{{ .Release.Name }}-config"
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: secret
|
||||
secret:
|
||||
secretName: RELEASE-NAME-config
|
||||
|
||||
- it: nfs persistence type should pass
|
||||
set:
|
||||
persistence:
|
||||
nfs:
|
||||
enabled: true
|
||||
type: nfs
|
||||
server: 10.10.0.8
|
||||
path: /tank/nas/library
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.volumes[0]
|
||||
value:
|
||||
name: nfs
|
||||
nfs:
|
||||
path: /tank/nas/library
|
||||
server: 10.10.0.8
|
Loading…
Add table
Add a link
Reference in a new issue