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-beta2 (#280)
This commit is contained in:
parent
23ae8131da
commit
21e751bc16
51 changed files with 419 additions and 368 deletions
|
@ -48,6 +48,13 @@ controllers:
|
|||
HTTP_PORT: 8889
|
||||
HTTPS_PORT: 9999
|
||||
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 8081
|
||||
|
||||
ingress:
|
||||
main:
|
||||
hosts:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 8081
|
|
@ -12,8 +12,8 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ConfigmapDocument 1
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
@ -40,8 +40,8 @@ tests:
|
|||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ConfigmapDocument 1
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
@ -76,8 +76,8 @@ tests:
|
|||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ConfigmapDocument 1
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
|
|
@ -7,15 +7,11 @@ tests:
|
|||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
|
||||
- it: with disabled configMap should pass
|
||||
set:
|
||||
|
@ -26,15 +22,11 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
|
||||
- it: with multiple configMap should pass
|
||||
set:
|
||||
|
@ -47,14 +39,14 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &FirstConfigmapDocument 2
|
||||
count: 3
|
||||
- documentIndex: &FirstConfigmapDocument 1
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *FirstConfigmapDocument
|
||||
isNotNullOrEmpty:
|
||||
path: metadata.name
|
||||
- documentIndex: &SecondConfigmapDocument 3
|
||||
- documentIndex: &SecondConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *SecondConfigmapDocument
|
||||
|
@ -69,8 +61,8 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ConfigmapDocument 1
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
@ -87,8 +79,8 @@ tests:
|
|||
nameOverride: http
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ConfigmapDocument 1
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
|
|
@ -14,6 +14,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
|
@ -57,6 +58,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
|
@ -104,6 +106,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
|
@ -148,6 +151,7 @@ tests:
|
|||
service:
|
||||
main:
|
||||
enabled: false
|
||||
controller: main
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
|
@ -166,6 +170,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
protocol: HTTP
|
||||
|
@ -198,6 +203,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -229,6 +235,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -260,6 +267,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -296,6 +304,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -332,6 +341,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -368,6 +378,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -396,6 +407,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -424,6 +436,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
@ -452,6 +465,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
|
|
@ -29,14 +29,14 @@ tests:
|
|||
tag: 31
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: &firstDeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *firstDeploymentDoc
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
value: RELEASE-NAME-main
|
||||
- documentIndex: *firstDeploymentDoc
|
||||
equal:
|
||||
path: metadata.labels['app.kubernetes.io/component']
|
||||
|
@ -65,14 +65,14 @@ tests:
|
|||
tag: 31
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: &firstDeploymentDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *firstDeploymentDoc
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
value: RELEASE-NAME-main
|
||||
- documentIndex: *firstDeploymentDoc
|
||||
equal:
|
||||
path: metadata.labels['app.kubernetes.io/component']
|
||||
|
@ -131,16 +131,4 @@ tests:
|
|||
controllers.main.enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- documentIndex: &ControllerDoc 0
|
||||
not: true
|
||||
isKind:
|
||||
of: StatefulSet
|
||||
- documentIndex: *ControllerDoc
|
||||
not: true
|
||||
isKind:
|
||||
of: DaemonSet
|
||||
- documentIndex: *ControllerDoc
|
||||
not: true
|
||||
isKind:
|
||||
of: Controller
|
||||
count: 0
|
||||
|
|
|
@ -10,7 +10,7 @@ values:
|
|||
tests:
|
||||
- it: default metadata should pass
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -33,7 +33,7 @@ tests:
|
|||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -64,7 +64,7 @@ tests:
|
|||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
|
|
@ -7,15 +7,11 @@ tests:
|
|||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
|
||||
- it: explicitly disabled should pass
|
||||
values:
|
||||
|
@ -24,15 +20,11 @@ tests:
|
|||
ingress.main.enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
|
||||
- it: explicitly enabled should pass
|
||||
values:
|
||||
|
@ -41,16 +33,12 @@ tests:
|
|||
ingress.main.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: Ingress
|
||||
|
||||
|
@ -68,23 +56,19 @@ tests:
|
|||
port: http
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: &FirstIngressDocument 2
|
||||
- documentIndex: &FirstIngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *FirstIngressDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
- documentIndex: &SecondIngressDocument 3
|
||||
value: RELEASE-NAME-main
|
||||
- documentIndex: &SecondIngressDocument 2
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *SecondIngressDocument
|
||||
|
@ -107,16 +91,12 @@ tests:
|
|||
port: http
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: &FirstIngressDocument 2
|
||||
- documentIndex: &FirstIngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *FirstIngressDocument
|
||||
|
|
|
@ -9,6 +9,13 @@ values:
|
|||
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &httpPort 8081
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
isKind:
|
||||
|
@ -20,7 +27,7 @@ tests:
|
|||
service:
|
||||
name: RELEASE-NAME
|
||||
port:
|
||||
number: 8080
|
||||
number: *httpPort
|
||||
|
||||
- it: custom service reference should pass
|
||||
set:
|
||||
|
@ -33,7 +40,7 @@ tests:
|
|||
name: pathService
|
||||
port: 1234
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -49,6 +56,7 @@ tests:
|
|||
set:
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: &httpPort 8081
|
||||
|
|
|
@ -10,7 +10,7 @@ values:
|
|||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -25,7 +25,7 @@ tests:
|
|||
hosts:
|
||||
- hostname
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -43,7 +43,7 @@ tests:
|
|||
- hosts:
|
||||
- hostname
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -61,7 +61,7 @@ tests:
|
|||
hosts:
|
||||
- hostname
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -80,7 +80,7 @@ tests:
|
|||
hosts:
|
||||
- hostname
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
|
|
@ -10,7 +10,7 @@ values:
|
|||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -32,7 +32,7 @@ tests:
|
|||
service:
|
||||
name: main
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -55,7 +55,7 @@ tests:
|
|||
name: main
|
||||
port: http
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -73,7 +73,7 @@ tests:
|
|||
service:
|
||||
name: main
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
@ -86,7 +86,7 @@ tests:
|
|||
ingress.main:
|
||||
defaultBackend: test
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 2
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
|
|
|
@ -15,7 +15,7 @@ templates:
|
|||
tests:
|
||||
- it: default metadata should pass
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
@ -39,7 +39,7 @@ tests:
|
|||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
@ -71,7 +71,7 @@ tests:
|
|||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
|
|
@ -15,8 +15,8 @@ tests:
|
|||
rules: {}
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
count: 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
@ -35,7 +35,7 @@ tests:
|
|||
rules: {}
|
||||
nameOverride: block-ingress
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
|
|
@ -8,13 +8,11 @@ tests:
|
|||
- it: main networkpolicy is disabled by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 1
|
||||
isKind:
|
||||
of: Service
|
||||
of: NetworkPolicy
|
||||
|
||||
- it: main networkpolicy can be enabled
|
||||
set:
|
||||
|
@ -26,14 +24,11 @@ tests:
|
|||
rules: {}
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
|
||||
|
@ -47,7 +42,7 @@ tests:
|
|||
- Egress
|
||||
rules: {}
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
@ -70,7 +65,7 @@ tests:
|
|||
podSelector: {}
|
||||
rules: {}
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
@ -92,7 +87,7 @@ tests:
|
|||
egress:
|
||||
- {}
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 2
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
|
|
|
@ -7,7 +7,7 @@ tests:
|
|||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: &deploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
|
@ -22,7 +22,7 @@ tests:
|
|||
create: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
count: 3
|
||||
- documentIndex: &serviceAccountDocument 0
|
||||
isKind:
|
||||
of: ServiceAccount
|
||||
|
@ -41,7 +41,7 @@ tests:
|
|||
name: mySA
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
count: 3
|
||||
- documentIndex: &serviceAccountDocument 0
|
||||
isKind:
|
||||
of: ServiceAccount
|
||||
|
@ -60,7 +60,7 @@ tests:
|
|||
name: mySA
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: &deploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
|
|
|
@ -15,22 +15,18 @@ tests:
|
|||
persistence.config.enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
|
||||
- it: enabled should pass
|
||||
set:
|
||||
persistence.config.enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
|
@ -38,10 +34,6 @@ tests:
|
|||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: 2
|
||||
not: true
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
- documentIndex: *PersistentVolumeClaimDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
|
|
|
@ -12,7 +12,7 @@ tests:
|
|||
size: 1Gi
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
|
@ -30,7 +30,7 @@ tests:
|
|||
size: 1Gi
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: PersistentVolumeClaim
|
||||
|
@ -48,7 +48,7 @@ tests:
|
|||
size: 1Gi
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: &PersistentVolumeClaimDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
|
|
|
@ -7,12 +7,11 @@ tests:
|
|||
- it: default metadata should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- documentIndex: &routeDocument 2
|
||||
- documentIndex: &routeDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *routeDocument
|
||||
|
@ -30,7 +29,6 @@ tests:
|
|||
- it: custom metadata should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
|
@ -39,7 +37,7 @@ tests:
|
|||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- documentIndex: &routeDocument 2
|
||||
- documentIndex: &routeDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *routeDocument
|
||||
|
@ -65,7 +63,6 @@ tests:
|
|||
annotations:
|
||||
global_annotation: test
|
||||
route.main:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
|
@ -74,7 +71,7 @@ tests:
|
|||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- documentIndex: &routeDocument 2
|
||||
- documentIndex: &routeDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *routeDocument
|
||||
|
|
|
@ -7,30 +7,22 @@ tests:
|
|||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
|
||||
- it: explicitly disabled should pass
|
||||
set:
|
||||
route.main.enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
|
||||
- it: explicitly enabled should pass
|
||||
set:
|
||||
|
@ -41,16 +33,12 @@ tests:
|
|||
namespace: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
|
||||
|
@ -58,29 +46,23 @@ tests:
|
|||
set:
|
||||
route:
|
||||
main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: main
|
||||
namespace: main
|
||||
test:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 3
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
|
|
|
@ -7,7 +7,6 @@ tests:
|
|||
- it: default should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
|
@ -20,7 +19,7 @@ tests:
|
|||
port: 8080
|
||||
weight: 1
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
|
@ -37,7 +36,6 @@ tests:
|
|||
- it: custom service reference should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
|
@ -49,7 +47,7 @@ tests:
|
|||
namespace: serviceNamespace
|
||||
weight: 123
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
|
@ -66,7 +64,6 @@ tests:
|
|||
- it: custom service reference with filter should fail
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
|
@ -89,7 +86,6 @@ tests:
|
|||
- it: custom service with filter should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
|
@ -100,7 +96,7 @@ tests:
|
|||
scheme: https
|
||||
statusCode: 301
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
|
|
|
@ -7,12 +7,11 @@ tests:
|
|||
- it: setting gateway should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
|
@ -27,14 +26,13 @@ tests:
|
|||
- it: custom host and path should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
hostnames:
|
||||
- chart-test.local
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
|
@ -45,14 +43,13 @@ tests:
|
|||
- it: custom host with template
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
hostnames:
|
||||
- "{{ .Release.Name }}.local"
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocument 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
|
@ -64,7 +61,6 @@ tests:
|
|||
set:
|
||||
route:
|
||||
main:
|
||||
enabled: true
|
||||
kind: HTTPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
|
@ -88,7 +84,6 @@ tests:
|
|||
timeouts:
|
||||
backendRequest: 30s
|
||||
grpc:
|
||||
enabled: true
|
||||
kind: GRPCRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
|
@ -110,7 +105,6 @@ tests:
|
|||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
tcp:
|
||||
enabled: true
|
||||
kind: TCPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
|
@ -132,7 +126,6 @@ tests:
|
|||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
tls:
|
||||
enabled: true
|
||||
kind: TLSRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
|
@ -154,7 +147,6 @@ tests:
|
|||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
udp:
|
||||
enabled: true
|
||||
kind: UDPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
|
@ -176,17 +168,17 @@ tests:
|
|||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &GRPCRouteDocument 1
|
||||
isKind:
|
||||
of: GRPCRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: *GRPCRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].matches
|
||||
value:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: *GRPCRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].filters
|
||||
value:
|
||||
|
@ -195,17 +187,17 @@ tests:
|
|||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].matches
|
||||
value:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].filters
|
||||
value:
|
||||
|
@ -214,34 +206,34 @@ tests:
|
|||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
- documentIndex: &HTTPRouteDocument 4
|
||||
- documentIndex: &TCPRouteDocument 3
|
||||
isKind:
|
||||
of: TCPRoute
|
||||
- documentIndex: &HTTPRouteDocument 4
|
||||
- documentIndex: *TCPRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].matches
|
||||
- documentIndex: &HTTPRouteDocument 4
|
||||
- documentIndex: *TCPRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].filters
|
||||
- documentIndex: &HTTPRouteDocument 5
|
||||
- documentIndex: &TLSRouteDocument 4
|
||||
isKind:
|
||||
of: TLSRoute
|
||||
- documentIndex: &HTTPRouteDocument 5
|
||||
- documentIndex: *TLSRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].matches
|
||||
- documentIndex: &HTTPRouteDocument 5
|
||||
- documentIndex: *TLSRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].filters
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
- documentIndex: &UDPRouteDocument 5
|
||||
isKind:
|
||||
of: UDPRoute
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
- documentIndex: *UDPRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].matches
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
- documentIndex: *UDPRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].filters
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
- documentIndex: *UDPRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].timeouts
|
||||
|
||||
|
@ -265,16 +257,16 @@ tests:
|
|||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &TCPRouteDocument 1
|
||||
isKind:
|
||||
of: TCPRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: *TCPRouteDocument
|
||||
notExists:
|
||||
path: spec.hostnames
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: &UDPRouteDocument 2
|
||||
isKind:
|
||||
of: UDPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: *UDPRouteDocument
|
||||
notExists:
|
||||
path: spec.hostnames
|
||||
|
||||
|
@ -293,16 +285,16 @@ tests:
|
|||
namespace: parentNamespace
|
||||
sectionName: parentSection
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &HTTPRouteDocumentFirst 1
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: *HTTPRouteDocumentFirst
|
||||
notExists:
|
||||
path: spec.parentRefs[0].sectionName
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: &HTTPRouteDocumentSecond 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: *HTTPRouteDocumentSecond
|
||||
equal:
|
||||
path: spec.parentRefs[0].sectionName
|
||||
value: parentSection
|
||||
|
@ -339,16 +331,16 @@ tests:
|
|||
timeouts:
|
||||
backendRequest: 10s
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: &GRPCRouteDocument 1
|
||||
isKind:
|
||||
of: GRPCRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
- documentIndex: *GRPCRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].timeouts.backendRequest
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].timeouts.backendRequest
|
||||
value: 30s
|
||||
|
|
|
@ -12,8 +12,8 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
count: 2
|
||||
- documentIndex: &SecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
|
@ -40,8 +40,8 @@ tests:
|
|||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
count: 2
|
||||
- documentIndex: &SecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
|
@ -76,8 +76,8 @@ tests:
|
|||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
count: 2
|
||||
- documentIndex: &SecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
|
@ -106,8 +106,8 @@ tests:
|
|||
type: &type kubernetes.io/service-account-token
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
count: 2
|
||||
- documentIndex: &SecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
|
|
|
@ -7,15 +7,11 @@ tests:
|
|||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
|
||||
- it: with disabled secret should pass
|
||||
set:
|
||||
|
@ -26,15 +22,11 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
|
||||
- it: with multiple secrets should pass
|
||||
set:
|
||||
|
@ -49,14 +41,14 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &FirstSecretDocument 2
|
||||
count: 3
|
||||
- documentIndex: &FirstSecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *FirstSecretDocument
|
||||
isNotNullOrEmpty:
|
||||
path: metadata.name
|
||||
- documentIndex: &SecondSecretDocument 3
|
||||
- documentIndex: &SecondSecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecondSecretDocument
|
||||
|
@ -71,8 +63,8 @@ tests:
|
|||
test: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
count: 2
|
||||
- documentIndex: &SecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
|
@ -89,8 +81,8 @@ tests:
|
|||
nameOverride: http
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
count: 2
|
||||
- documentIndex: &SecretDocument 1
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
|
|
|
@ -5,6 +5,8 @@ templates:
|
|||
- common.yaml
|
||||
tests:
|
||||
- it: default metadata should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
asserts:
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
|
@ -23,6 +25,8 @@ tests:
|
|||
helm.sh/chart: common-test-1.0.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -51,6 +55,8 @@ tests:
|
|||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
global:
|
||||
labels:
|
||||
|
|
|
@ -5,6 +5,8 @@ templates:
|
|||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
|
@ -17,10 +19,10 @@ tests:
|
|||
value: RELEASE-NAME
|
||||
|
||||
- it: custom name suffix should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
nameOverride: http
|
||||
service.main.nameOverride: http
|
||||
asserts:
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
|
@ -29,3 +31,31 @@ tests:
|
|||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-http
|
||||
|
||||
- it: multiple should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
second:
|
||||
controller: main
|
||||
ports:
|
||||
ui:
|
||||
port: 8082
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceDocumentFirst 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *ServiceDocumentFirst
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-main
|
||||
- documentIndex: &ServiceDocumentSecond 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *ServiceDocumentSecond
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-second
|
||||
|
|
|
@ -5,6 +5,8 @@ templates:
|
|||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
|
@ -17,6 +19,8 @@ tests:
|
|||
value: TCP
|
||||
|
||||
- it: explicit TCP should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service.main.ports.http.protocol: TCP
|
||||
asserts:
|
||||
|
@ -29,6 +33,8 @@ tests:
|
|||
value: TCP
|
||||
|
||||
- it: explicit UDP should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service.main.ports.http.protocol: UDP
|
||||
asserts:
|
||||
|
@ -41,6 +47,8 @@ tests:
|
|||
value: UDP
|
||||
|
||||
- it: explicit HTTP should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service.main.ports.http.protocol: HTTP
|
||||
asserts:
|
||||
|
@ -56,6 +64,8 @@ tests:
|
|||
path: metadata.annotations
|
||||
|
||||
- it: explicit HTTPS should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service.main.ports.http.protocol: HTTPS
|
||||
asserts:
|
||||
|
@ -68,6 +78,8 @@ tests:
|
|||
value: TCP
|
||||
|
||||
- it: explicit appProtocol should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service.main.ports.http.appProtocol: kubernetes.io/h2c
|
||||
asserts:
|
||||
|
|
|
@ -5,6 +5,8 @@ templates:
|
|||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
|
@ -16,11 +18,13 @@ tests:
|
|||
path: spec.ports[0]
|
||||
value:
|
||||
name: http
|
||||
port: 8080
|
||||
port: 8081
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
targetPort: 8081
|
||||
|
||||
- it: custom name should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -44,6 +48,8 @@ tests:
|
|||
targetPort: 8080
|
||||
|
||||
- it: custom target port should pass
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -60,6 +66,6 @@ tests:
|
|||
path: spec.ports[0]
|
||||
value:
|
||||
name: http
|
||||
port: 8080
|
||||
port: 8081
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
|
|
|
@ -15,18 +15,17 @@ tests:
|
|||
port: 80
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
count: 2
|
||||
- documentIndex: &FirstServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecondServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *FirstServiceDocument
|
||||
notExists:
|
||||
path: spec.allocateLoadBalancerNodePorts
|
||||
|
||||
- it: services can be disabled
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -39,6 +38,8 @@ tests:
|
|||
of: Deployment
|
||||
|
||||
- it: externalTrafficPolicy should pass for NodePort service
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -54,6 +55,8 @@ tests:
|
|||
value: Local
|
||||
|
||||
- it: externalTrafficPolicy should pass for LoadBalancer service
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -69,6 +72,8 @@ tests:
|
|||
value: Local
|
||||
|
||||
- it: allocateLoadBalancerNodePorts can be set to true
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
@ -84,6 +89,8 @@ tests:
|
|||
value: true
|
||||
|
||||
- it: allocateLoadBalancerNodePorts can be set to false
|
||||
values:
|
||||
- ../_values/service_main_default.yaml
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
|
|
|
@ -7,13 +7,11 @@ tests:
|
|||
- it: a serviceAccount is not created by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
of: ServiceAccount
|
||||
|
||||
- it: a serviceAccount is not created when disabled
|
||||
set:
|
||||
|
@ -21,13 +19,11 @@ tests:
|
|||
create: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
of: ServiceAccount
|
||||
|
||||
- it: a serviceAccount and Secret are created when enabled
|
||||
set:
|
||||
|
@ -35,17 +31,14 @@ tests:
|
|||
create: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
count: 3
|
||||
- documentIndex: &ServiceAccountDocument 0
|
||||
isKind:
|
||||
of: ServiceAccount
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecretDocument 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *ServiceAccountDocument
|
||||
|
@ -74,17 +67,14 @@ tests:
|
|||
name: &ServiceAccountName myAccount
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
count: 3
|
||||
- documentIndex: &ServiceAccountDocument 0
|
||||
isKind:
|
||||
of: ServiceAccount
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecretDocument 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *ServiceAccountDocument
|
||||
|
|
|
@ -8,13 +8,11 @@ tests:
|
|||
- it: a serviceMonitor is not created by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &ServiceDocument 0
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
of: ServiceMonitor
|
||||
|
||||
- it: a serviceMonitor is not created when disabled
|
||||
set:
|
||||
|
@ -24,13 +22,11 @@ tests:
|
|||
serviceName: "{{ .Release.Name }}"
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &ServiceDocument 0
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
of: ServiceMonitor
|
||||
|
||||
- it: a serviceMonitor is created
|
||||
set:
|
||||
|
@ -47,8 +43,8 @@ tests:
|
|||
scrapeTimeout: 10s
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ServiceMonitorDocument 1
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
|
@ -95,8 +91,8 @@ tests:
|
|||
scrapeTimeout: 10s
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ServiceMonitorDocument 1
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
|
@ -124,8 +120,8 @@ tests:
|
|||
scrapeTimeout: 10s
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ServiceMonitorDocument 1
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
|
@ -155,8 +151,8 @@ tests:
|
|||
scrapeTimeout: 10s
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ServiceMonitorDocument 1
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
|
@ -187,8 +183,8 @@ tests:
|
|||
- testlabel2
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ServiceMonitorDocument 2
|
||||
count: 2
|
||||
- documentIndex: &ServiceMonitorDocument 1
|
||||
isKind:
|
||||
of: ServiceMonitor
|
||||
- documentIndex: *ServiceMonitorDocument
|
||||
|
|
|
@ -7,10 +7,3 @@ controllers:
|
|||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 31
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
service:
|
||||
main:
|
||||
controller: main
|
||||
ports:
|
||||
http:
|
||||
port: 8080
|
||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v2
|
|||
name: common
|
||||
description: Function library for Helm charts
|
||||
type: library
|
||||
version: 3.0.0-beta1
|
||||
version: 3.0.0-beta2
|
||||
kubeVersion: ">=1.22.0-0"
|
||||
keywords:
|
||||
- common
|
||||
|
|
|
@ -353,40 +353,7 @@
|
|||
"type": ["number", "string"]
|
||||
},
|
||||
"spec": {
|
||||
"allOf": [
|
||||
{
|
||||
"if": {},
|
||||
"then": {"$ref": "k8s-api.json#/core.v1.Probe"},
|
||||
"else": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"failureThreshold": {
|
||||
"type": "integer",
|
||||
"default": 3
|
||||
},
|
||||
"initialDelaySeconds": {
|
||||
"type": "integer",
|
||||
"default": 0
|
||||
},
|
||||
"periodSeconds": {
|
||||
"type": "integer",
|
||||
"default": 10
|
||||
},
|
||||
"timeoutSeconds": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"initialDelaySeconds",
|
||||
"periodSeconds",
|
||||
"timeoutSeconds",
|
||||
"failureThreshold"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
"$ref": "k8s-api.json#/core.v1.Probe"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
|
|
|
@ -12,9 +12,7 @@ Convert configMap values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $objectValues "name" $objectName -}}
|
||||
{{- $_ := set $objectValues "identifier" $identifier -}}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Return the enabled controllers.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.controller.enabledControllers" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $enabledControllers := dict -}}
|
||||
|
||||
{{- range $name, $controller := $rootContext.Values.controllers -}}
|
||||
{{- if kindIs "map" $controller -}}
|
||||
{{- /* Enable by default, but allow override */ -}}
|
||||
{{- $controllerEnabled := true -}}
|
||||
{{- if hasKey $controller "enabled" -}}
|
||||
{{- $controllerEnabled = $controller.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $controllerEnabled -}}
|
||||
{{- $_ := set $enabledControllers $name . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledControllers | toYaml -}}
|
||||
{{- end -}}
|
|
@ -17,7 +17,8 @@ Convert controller values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $enabledControllers := (include "bjw-s.common.lib.controller.enabledControllers" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- if gt (len $enabledControllers) 1 -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Return the enabled Ingresses.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.ingress.enabledIngresses" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $enabledIngress := dict -}}
|
||||
|
||||
{{- range $name, $ingress := $rootContext.Values.ingress -}}
|
||||
{{- if kindIs "map" $ingress -}}
|
||||
{{- /* Enable by default, but allow override */ -}}
|
||||
{{- $ingressEnabled := true -}}
|
||||
{{- if hasKey $ingress "enabled" -}}
|
||||
{{- $ingressEnabled = $ingress.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $ingressEnabled -}}
|
||||
{{- $_ := set $enabledIngress $name . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledIngress | toYaml -}}
|
||||
{{- end -}}
|
|
@ -12,7 +12,8 @@ Convert ingress values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $enabledIngresses := (include "bjw-s.common.lib.ingress.enabledIngresses" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- if gt (len $enabledIngresses) 1 -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Return the enabled NetworkPolicies.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.networkPolicy.enabledNetworkPolicies" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $enabledNetworkPolicies := dict -}}
|
||||
|
||||
{{- range $name, $networkPolicy := $rootContext.Values.networkPolicy -}}
|
||||
{{- if kindIs "map" $networkPolicy -}}
|
||||
{{- /* Enable by default, but allow override */ -}}
|
||||
{{- $networkPolicyEnabled := true -}}
|
||||
{{- if hasKey $networkPolicy "enabled" -}}
|
||||
{{- $networkPolicyEnabled = $networkPolicy.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $networkPolicyEnabled -}}
|
||||
{{- $_ := set $enabledNetworkPolicies $name . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledNetworkPolicies | toYaml -}}
|
||||
{{- end -}}
|
|
@ -12,7 +12,8 @@ Convert networkPolicy values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $enabledNetworkPolicies := (include "bjw-s.common.lib.networkPolicy.enabledNetworkPolicies" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- if gt (len $enabledNetworkPolicies) 1 -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -12,9 +12,7 @@ Convert Secret values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $objectValues "name" $objectName -}}
|
||||
{{- $_ := set $objectValues "identifier" $identifier -}}
|
||||
|
|
|
@ -13,7 +13,7 @@ Convert Service values to an object
|
|||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- $enabledServices := (include "bjw-s.common.lib.service.enabledServices" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- if and (not $objectValues.primary) (gt 1 (len $enabledServices)) -}}
|
||||
{{- if and (not $objectValues.primary) (gt (len $enabledServices) 1) -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{{/*
|
||||
Return the enabled ServiceMonitors.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.serviceMonitor.enabledServiceMonitors" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $enabledServiceMonitors := dict -}}
|
||||
|
||||
{{- range $name, $serviceMonitor := $rootContext.Values.serviceMonitor -}}
|
||||
{{- if kindIs "map" $serviceMonitor -}}
|
||||
{{- /* Enable by default, but allow override */ -}}
|
||||
{{- $serviceMonitorEnabled := true -}}
|
||||
{{- if hasKey $serviceMonitor "enabled" -}}
|
||||
{{- $serviceMonitorEnabled = $serviceMonitor.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $serviceMonitorEnabled -}}
|
||||
{{- $_ := set $enabledServiceMonitors $name . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $enabledServiceMonitors | toYaml -}}
|
||||
{{- end -}}
|
|
@ -12,7 +12,8 @@ Convert ServiceMonitor values to an object
|
|||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $enabledServiceMonitors := (include "bjw-s.common.lib.serviceMonitor.enabledServiceMonitors" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- if gt (len $enabledServiceMonitors) 1 -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.0.0-beta1/charts/library/common/values.schema.json",
|
||||
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.0.0-beta2/charts/library/common/values.schema.json",
|
||||
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue