feat(common): Release 2.0.0-beta.2 (#176)

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2023-09-14 15:40:49 +02:00 committed by GitHub
parent ed407c00df
commit 9928235b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
80 changed files with 1306 additions and 161 deletions

View file

@ -0,0 +1,95 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: NetworkPolicy values
templates:
- common.yaml
tests:
- it: main networkpolicy is disabled by default
asserts:
- hasDocuments:
count: 2
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 1
isKind:
of: Service
- it: main networkpolicy can be enabled
set:
networkpolicies:
main:
enabled: true
asserts:
- hasDocuments:
count: 3
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 1
isKind:
of: Service
- documentIndex: 2
isKind:
of: NetworkPolicy
- it: networkpolicy targets the correct controller
set:
networkpolicies:
main:
enabled: true
controller: main
asserts:
- documentIndex: &NetworkPolicyDocument 2
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:
enabled: true
controller: main
podSelector: {}
asserts:
- documentIndex: &NetworkPolicyDocument 2
isKind:
of: NetworkPolicy
- documentIndex: *NetworkPolicyDocument
equal:
path: spec.podSelector
value: {}
- it: networkpolicy rules are passed through
set:
networkpolicies:
main:
enabled: true
controller: main
rules:
ingress:
- {}
egress:
- {}
asserts:
- documentIndex: &NetworkPolicyDocument 2
isKind:
of: NetworkPolicy
- documentIndex: *NetworkPolicyDocument
equal:
path: spec.ingress
value:
- {}
- documentIndex: *NetworkPolicyDocument
equal:
path: spec.egress
value:
- {}