mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release common library 3.7.1 (#383)
Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
parent
c94a28baa3
commit
433f6d132b
146 changed files with 232 additions and 222 deletions
|
@ -0,0 +1,103 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: NetworkPolicy values
|
||||
templates:
|
||||
- common.yaml
|
||||
values:
|
||||
- ../_values/controllers_main_default_container.yaml
|
||||
tests:
|
||||
- it: main networkpolicy is disabled by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- documentIndex: 0
|
||||
not: true
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
|
||||
- it: main networkpolicy can be enabled
|
||||
set:
|
||||
networkpolicies.main:
|
||||
controller: main
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
rules: {}
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
|
||||
- it: networkpolicy targets the correct controller
|
||||
set:
|
||||
networkpolicies:
|
||||
main:
|
||||
controller: main
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
rules: {}
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
equal:
|
||||
path: spec.podSelector
|
||||
value:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: main
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/name: RELEASE-NAME
|
||||
|
||||
- it: networkpolicy targets supports custom podSelector
|
||||
set:
|
||||
networkpolicies:
|
||||
main:
|
||||
controller: main
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
podSelector: {}
|
||||
rules: {}
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
equal:
|
||||
path: spec.podSelector
|
||||
value: {}
|
||||
|
||||
- it: networkpolicy rules are passed through
|
||||
set:
|
||||
networkpolicies:
|
||||
main:
|
||||
controller: main
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
rules:
|
||||
ingress:
|
||||
- {}
|
||||
egress:
|
||||
- {}
|
||||
asserts:
|
||||
- documentIndex: &NetworkPolicyDocument 1
|
||||
isKind:
|
||||
of: NetworkPolicy
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
equal:
|
||||
path: spec.ingress
|
||||
value:
|
||||
- {}
|
||||
- documentIndex: *NetworkPolicyDocument
|
||||
equal:
|
||||
path: spec.egress
|
||||
value:
|
||||
- {}
|
Loading…
Add table
Add a link
Reference in a new issue