mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release 3.2.0 (#318)
Signed-off-by: Gavin Mogan <git@gavinmogan.com> Co-authored-by: Gavin Mogan <git@gavinmogan.com> Co-authored-by: repo-duster[bot] <87358111+repo-duster[bot]@users.noreply.github.com>
This commit is contained in:
parent
6cbaa61a4f
commit
4a5f448abd
29 changed files with 248 additions and 53 deletions
|
@ -16,6 +16,10 @@ tests:
|
|||
test_default_enabled:
|
||||
data:
|
||||
test: value 1
|
||||
test_not_in_checksum:
|
||||
includeInChecksum: false
|
||||
data:
|
||||
test: value 1
|
||||
test_disabled:
|
||||
enabled: false
|
||||
data:
|
||||
|
|
|
@ -82,3 +82,34 @@ tests:
|
|||
global_label: test
|
||||
helm.sh/chart: common-test-1.0.0
|
||||
test_label: test
|
||||
|
||||
|
||||
- it: custom metadata with templates should pass
|
||||
set:
|
||||
ingress.main:
|
||||
annotations:
|
||||
template_annotation1: "{{ .Release.Name | lower }}"
|
||||
template_annotation2: "{{ .Chart.Name | lower }}"
|
||||
labels:
|
||||
template_label1: "{{ .Release.Name | lower }}"
|
||||
template_label2: "{{ .Chart.Name | lower }}"
|
||||
asserts:
|
||||
- documentIndex: &IngressDocument 1
|
||||
isKind:
|
||||
of: Ingress
|
||||
- documentIndex: *IngressDocument
|
||||
equal:
|
||||
path: metadata.annotations["template_annotation1"]
|
||||
value: release-name
|
||||
- documentIndex: *IngressDocument
|
||||
equal:
|
||||
path: metadata.annotations["template_annotation2"]
|
||||
value: common-test
|
||||
- documentIndex: *IngressDocument
|
||||
equal:
|
||||
path: metadata.labels["template_label1"]
|
||||
value: release-name
|
||||
- documentIndex: *IngressDocument
|
||||
equal:
|
||||
path: metadata.labels["template_label2"]
|
||||
value: common-test
|
||||
|
|
|
@ -44,3 +44,42 @@ tests:
|
|||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-block-ingress
|
||||
|
||||
- it: multiple networkpolicies can be enabled
|
||||
set:
|
||||
networkpolicies:
|
||||
primary:
|
||||
controller: main
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
rules: {}
|
||||
secondary:
|
||||
controller: main
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
rules: {}
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: &firstNetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *firstNetworkPolicyDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-primary
|
||||
- documentIndex: 2
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: &secondNetworkPolicyDocument 2
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *secondNetworkPolicyDocument
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-secondary
|
||||
|
|
|
@ -16,6 +16,10 @@ tests:
|
|||
stringData:
|
||||
test_1: value 1
|
||||
test_2: value 2
|
||||
test_not_in_checksum:
|
||||
includeInChecksum: false
|
||||
stringData:
|
||||
test: value 1
|
||||
test_disabled:
|
||||
enabled: false
|
||||
stringData:
|
||||
|
|
|
@ -153,7 +153,7 @@ tests:
|
|||
main:
|
||||
selector:
|
||||
matchExpressions:
|
||||
test: "true"
|
||||
- {key: k8s-app, operator: Exists}
|
||||
endpoints:
|
||||
- port: http
|
||||
scheme: http
|
||||
|
@ -175,7 +175,8 @@ tests:
|
|||
path: spec.selector
|
||||
value:
|
||||
matchExpressions:
|
||||
test: "true"
|
||||
- key: k8s-app
|
||||
operator: Exists
|
||||
|
||||
- it: a serviceMonitor is created with targetLabels
|
||||
set:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue