feat(common): Release common library 3.7.1 (#383)

Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
Bernd Schorgers 2025-02-11 13:23:27 +01:00 committed by GitHub
parent c94a28baa3
commit 433f6d132b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
146 changed files with 232 additions and 222 deletions

View file

@ -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:
- {}