mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release version 1.1.0 (#81)
# Removed - Promtail add-on has been removed # Fixed - Fixed httpGet probe whitespace rendering (#76) - Fixed Secret management for ServiceAccounts (fixes #78) - Fixed code-server add-on Service rendering # Added - Added support for Gateway API Routes (#59) # Changed - Services and their ports are now assumed enabled by default - Updated `code-server` image to v4.8.3 - Updated `netshoot` image to v0.8 Signed-off-by: András Maróy <andras@maroy.hu> Signed-off-by: András Maróy <andras@maroy.hu> Co-authored-by: András Maróy <andras@maroy.hu> Co-authored-by: pando85 <pando855@gmail.com>
This commit is contained in:
parent
841d562827
commit
a2a0b8ea2b
46 changed files with 1393 additions and 320 deletions
|
@ -2,7 +2,7 @@
|
|||
apiVersion: v2
|
||||
description: A common powered chart template. This can be useful for small projects that don't have their own chart.
|
||||
name: app-template
|
||||
version: 1.0.1
|
||||
version: 1.1.0
|
||||
kubeVersion: ">=1.22.0-0"
|
||||
maintainers:
|
||||
- name: bjw-s
|
||||
|
@ -10,12 +10,12 @@ maintainers:
|
|||
dependencies:
|
||||
- name: common
|
||||
repository: https://bjw-s.github.io/helm-charts
|
||||
version: 1.0.1
|
||||
version: 1.1.0
|
||||
annotations:
|
||||
artifacthub.io/changes: |-
|
||||
- kind: changed
|
||||
description: |
|
||||
**BREAKING**: Updated library version to 1.0.1.
|
||||
Updated library version to 1.1.0.
|
||||
links:
|
||||
- name: Common library chart definition
|
||||
url: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/Chart.yaml
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
image:
|
||||
repository: ghcr.io/k8s-at-home/qbittorrent
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: 8080
|
||||
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
emptyDir:
|
||||
enabled: true
|
||||
mountPath: /config
|
||||
|
||||
addons:
|
||||
promtail:
|
||||
enabled: true
|
||||
loki: http://loki.monitoring.svc.cluster.local:3100/loki/api/v1/push
|
||||
logs:
|
||||
- name: qbittorrent
|
||||
path: /config/data/qBittorrent/logs/*.log
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
readOnly: true
|
|
@ -29,13 +29,13 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &AddonServiceDocument 2
|
||||
- documentIndex: &AddonServiceDocument 0
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: 1
|
||||
- documentIndex: &ApplicationServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: *DeploymentDocument
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
- documentIndex: *AddonServiceDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME
|
||||
value: RELEASE-NAME-addon-codeserver
|
||||
|
||||
- it: addon enabled with deployKey should pass
|
||||
set:
|
||||
|
@ -60,7 +60,7 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &AddonDeployKeySecretDocument 0
|
||||
- documentIndex: &AddonDeployKeySecretDocument 3
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
|
@ -102,7 +102,7 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &AddonDeployKeySecretDocument 0
|
||||
- documentIndex: &AddonDeployKeySecretDocument 3
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
|
@ -144,7 +144,7 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
|
|
|
@ -46,10 +46,10 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &AddonVPNConfigSecretDocument 0
|
||||
- documentIndex: &AddonVPNConfigSecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
|
@ -87,10 +87,10 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &AddonVPNConfigConfigMapDocument 0
|
||||
- documentIndex: &AddonVPNConfigConfigMapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *DeploymentDocument
|
||||
|
|
|
@ -8,7 +8,9 @@ tests:
|
|||
config:
|
||||
enabled: true
|
||||
asserts:
|
||||
- documentIndex: &ConfigmapDocument 0
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
@ -21,7 +23,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -33,7 +35,9 @@ tests:
|
|||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- documentIndex: &ConfigmapDocument 0
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
@ -48,7 +52,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -66,7 +70,9 @@ tests:
|
|||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- documentIndex: &ConfigmapDocument 0
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: *ConfigmapDocument
|
||||
|
@ -83,5 +89,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
|
@ -44,16 +44,16 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: 0
|
||||
- documentIndex: &FirstConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 0
|
||||
- documentIndex: *FirstConfigmapDocument
|
||||
isNotNull:
|
||||
path: metadata.name
|
||||
- documentIndex: 1
|
||||
- documentIndex: &SecondConfigmapDocument 3
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 1
|
||||
- documentIndex: *SecondConfigmapDocument
|
||||
isNotNull:
|
||||
path: metadata.name
|
||||
|
||||
|
@ -65,10 +65,10 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 0
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-config
|
||||
|
@ -82,10 +82,10 @@ tests:
|
|||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
- documentIndex: &ConfigmapDocument 2
|
||||
isKind:
|
||||
of: ConfigMap
|
||||
- documentIndex: 0
|
||||
- documentIndex: *ConfigmapDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-http
|
||||
|
|
|
@ -10,7 +10,7 @@ tests:
|
|||
data:
|
||||
test: value 1
|
||||
asserts:
|
||||
- documentIndex: &ControllerDoc 1
|
||||
- documentIndex: &ControllerDoc 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: *ControllerDoc
|
||||
|
|
313
charts/other/app-template/tests/container/probes_test.yaml
Normal file
313
charts/other/app-template/tests/container/probes_test.yaml
Normal file
|
@ -0,0 +1,313 @@
|
|||
suite: container probes
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
port: &port 80
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
value:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
failureThreshold: 30
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
|
||||
- it: custom primary port should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
enabled: true
|
||||
port: 80
|
||||
test:
|
||||
enabled: true
|
||||
primary: true
|
||||
port: &port 8080
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
value:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
failureThreshold: 30
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: *port
|
||||
timeoutSeconds: 1
|
||||
|
||||
- it: disabled service should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
enabled: false
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
isNull:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
- documentIndex: 0
|
||||
isNull:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
- documentIndex: 0
|
||||
isNull:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
|
||||
- it: AUTO type probe should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: AUTO
|
||||
path: /api/version
|
||||
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
|
||||
- it: HTTP type probe should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: HTTP
|
||||
path: /api/version
|
||||
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
|
||||
- it: HTTPS type probe should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
type: HTTPS
|
||||
path: /api/version
|
||||
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
|
||||
- it: custom liveness probe should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
|
||||
- it: custom readiness probe should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
||||
probes:
|
||||
readiness:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
|
||||
- it: custom startup probe should pass
|
||||
set:
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: &port 80
|
||||
|
||||
probes:
|
||||
startup:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].startupProbe
|
||||
value:
|
||||
httpGet:
|
||||
path: /api/version
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -79,5 +79,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: retain enabled should pass
|
||||
set:
|
||||
|
@ -42,7 +42,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -68,7 +68,7 @@ tests:
|
|||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -102,5 +102,5 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
93
charts/other/app-template/tests/route/metadata_test.yaml
Normal file
93
charts/other/app-template/tests/route/metadata_test.yaml
Normal file
|
@ -0,0 +1,93 @@
|
|||
suite: route metadata
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default metadata should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- documentIndex: &routeDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *routeDocument
|
||||
isNull:
|
||||
path: metadata.annotations
|
||||
- documentIndex: *routeDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- documentIndex: &routeDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *routeDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
test_annotation: test
|
||||
- documentIndex: *routeDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
set:
|
||||
global:
|
||||
labels:
|
||||
global_label: test
|
||||
annotations:
|
||||
global_annotation: test
|
||||
route.main:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- documentIndex: &routeDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *routeDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
global_annotation: test
|
||||
test_annotation: test
|
||||
- documentIndex: *routeDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
84
charts/other/app-template/tests/route/presence_test.yaml
Normal file
84
charts/other/app-template/tests/route/presence_test.yaml
Normal file
|
@ -0,0 +1,84 @@
|
|||
suite: route presence
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- 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
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
|
||||
- it: explicitly enabled should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
|
||||
- it: multiple enabled should pass
|
||||
set:
|
||||
route:
|
||||
main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: main
|
||||
namespace: main
|
||||
test:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: 3
|
||||
isKind:
|
||||
of: HTTPRoute
|
|
@ -0,0 +1,54 @@
|
|||
suite: ingress service reference
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].backendRefs[0]
|
||||
value:
|
||||
group: ""
|
||||
kind: Service
|
||||
name: RELEASE-NAME-main
|
||||
namespace: NAMESPACE
|
||||
port: null
|
||||
weight: 1
|
||||
|
||||
- it: custom service reference should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- group: test
|
||||
name: pathService
|
||||
port: 1234
|
||||
namespace: serviceNamespace
|
||||
weight: 123
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].backendRefs[0]
|
||||
value:
|
||||
group: test
|
||||
kind: Service
|
||||
name: pathService
|
||||
namespace: serviceNamespace
|
||||
port: 1234
|
||||
weight: 123
|
183
charts/other/app-template/tests/route/values_test.yaml
Normal file
183
charts/other/app-template/tests/route/values_test.yaml
Normal file
|
@ -0,0 +1,183 @@
|
|||
suite: route values
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: setting gateway should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.parentRefs[0].name
|
||||
value: parentName
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.parentRefs[0].namespace
|
||||
value: parentNamespace
|
||||
|
||||
- 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
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.hostnames[0]
|
||||
value: chart-test.local
|
||||
|
||||
- it: path matches should only be used for HTTPRoutes
|
||||
set:
|
||||
route:
|
||||
main:
|
||||
enabled: true
|
||||
kind: HTTPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
grpc:
|
||||
enabled: true
|
||||
kind: GRPCRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
tcp:
|
||||
enabled: true
|
||||
kind: TCPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
tls:
|
||||
enabled: true
|
||||
kind: TLSRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
udp:
|
||||
enabled: true
|
||||
kind: UDPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: GRPCRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isNull:
|
||||
path: spec.rules[0].matches
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
equal:
|
||||
path: spec.rules[0].matches
|
||||
value:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
- documentIndex: &HTTPRouteDocument 4
|
||||
isKind:
|
||||
of: TCPRoute
|
||||
- documentIndex: &HTTPRouteDocument 4
|
||||
isNull:
|
||||
path: spec.rules[0].matches
|
||||
- documentIndex: &HTTPRouteDocument 5
|
||||
isKind:
|
||||
of: TLSRoute
|
||||
- documentIndex: &HTTPRouteDocument 5
|
||||
isNull:
|
||||
path: spec.rules[0].matches
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
isKind:
|
||||
of: UDPRoute
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
isNull:
|
||||
path: spec.rules[0].matches
|
||||
|
||||
- it: hostnames shouldn't be used for TCPRoutes and UDPRoutes
|
||||
set:
|
||||
route:
|
||||
main:
|
||||
enabled: true
|
||||
kind: TCPRoute
|
||||
hostnames:
|
||||
- chart-test.local
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
udp:
|
||||
enabled: true
|
||||
kind: UDPRoute
|
||||
hostnames:
|
||||
- chart-test.local
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: TCPRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isNull:
|
||||
path: spec.hostnames
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
isKind:
|
||||
of: UDPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
isNull:
|
||||
path: spec.hostnames
|
110
charts/other/app-template/tests/secret/metadata_test.yaml
Normal file
110
charts/other/app-template/tests/secret/metadata_test.yaml
Normal file
|
@ -0,0 +1,110 @@
|
|||
suite: secret metadata
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default metadata should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
isNull:
|
||||
path: metadata.annotations
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
test_annotation: test
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
set:
|
||||
global:
|
||||
labels:
|
||||
global_label: test
|
||||
annotations:
|
||||
global_annotation: test
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
annotations:
|
||||
test_annotation: test
|
||||
labels:
|
||||
test_label: test
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
global_annotation: test
|
||||
test_annotation: test
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.labels
|
||||
value:
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom secret type should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
type: &type kubernetes.io/service-account-token
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: type
|
||||
value: *type
|
91
charts/other/app-template/tests/secret/names_test.yaml
Normal file
91
charts/other/app-template/tests/secret/names_test.yaml
Normal file
|
@ -0,0 +1,91 @@
|
|||
suite: secret names
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
|
||||
- it: with disabled secret should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: 1
|
||||
not: true
|
||||
isKind:
|
||||
of: Secret
|
||||
|
||||
- it: with multiple secrets should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
data:
|
||||
foo: bar
|
||||
secondary:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &FirstSecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *FirstSecretDocument
|
||||
isNotNull:
|
||||
path: metadata.name
|
||||
- documentIndex: &SecondSecretDocument 3
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecondSecretDocument
|
||||
isNotNull:
|
||||
path: metadata.name
|
||||
|
||||
- it: default name should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-secret
|
||||
|
||||
- it: with nameOverride should pass
|
||||
set:
|
||||
secrets:
|
||||
secret:
|
||||
enabled: true
|
||||
nameOverride: http
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &SecretDocument 2
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *SecretDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-http
|
|
@ -18,7 +18,7 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
|
||||
- it: custom metadata should pass
|
||||
set:
|
||||
|
@ -45,7 +45,7 @@ tests:
|
|||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
||||
- it: custom metadata with global metadata should pass
|
||||
|
@ -80,5 +80,5 @@ tests:
|
|||
app.kubernetes.io/name: RELEASE-NAME
|
||||
app.kubernetes.io/service: RELEASE-NAME
|
||||
global_label: test
|
||||
helm.sh/chart: app-template-1.0.1
|
||||
helm.sh/chart: app-template-1.1.0
|
||||
test_label: test
|
||||
|
|
|
@ -2,6 +2,24 @@ suite: service values
|
|||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: ports and services are enabled by default
|
||||
set:
|
||||
service:
|
||||
second:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
first:
|
||||
port: 80
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: &FirstServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecondServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
|
||||
- it: externalTrafficPolicy should pass for NodePort service
|
||||
set:
|
||||
service:
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
suite: serviceAccount values
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: a serviceAccount is not created by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
|
||||
- it: a serviceAccount is not created when disabled
|
||||
set:
|
||||
serviceAccount:
|
||||
create: false
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: &DeploymentDocument 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 1
|
||||
isKind:
|
||||
of: Service
|
||||
|
||||
- it: a serviceAccount and Secret are created when enabled
|
||||
set:
|
||||
serviceAccount:
|
||||
create: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &ServiceAccountDocument 0
|
||||
isKind:
|
||||
of: ServiceAccount
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecretDocument 3
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *ServiceAccountDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: &ServiceAccountName RELEASE-NAME
|
||||
- documentIndex: *ServiceAccountDocument
|
||||
equal:
|
||||
path: secrets
|
||||
value:
|
||||
- name: RELEASE-NAME-sa-token
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.serviceAccountName
|
||||
value: *ServiceAccountName
|
||||
|
||||
- it: a serviceAccount and Secret are created with custom name
|
||||
set:
|
||||
serviceAccount:
|
||||
create: true
|
||||
name: &ServiceAccountName myAccount
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 4
|
||||
- documentIndex: &ServiceAccountDocument 0
|
||||
isKind:
|
||||
of: ServiceAccount
|
||||
- documentIndex: &DeploymentDocument 1
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &ServiceDocument 2
|
||||
isKind:
|
||||
of: Service
|
||||
- documentIndex: &SecretDocument 3
|
||||
isKind:
|
||||
of: Secret
|
||||
- documentIndex: *ServiceAccountDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: *ServiceAccountName
|
||||
- documentIndex: *ServiceAccountDocument
|
||||
equal:
|
||||
path: secrets
|
||||
value:
|
||||
- name: RELEASE-NAME-sa-token
|
||||
- documentIndex: *DeploymentDocument
|
||||
equal:
|
||||
path: spec.template.spec.serviceAccountName
|
||||
value: *ServiceAccountName
|
Loading…
Add table
Add a link
Reference in a new issue