charts/teleport-cluster-15.3.7/tests/proxy_pdb_test.yaml
2024-07-15 06:22:50 +08:00

44 lines
986 B
YAML

suite: Proxy PodDisruptionBudget
templates:
- proxy/pdb.yaml
tests:
- it: not should create a PDB when disabled in values
set:
highAvailability:
podDisruptionBudget:
enabled: false
asserts:
- hasDocuments:
count: 0
- it: should create a PDB when enabled in values (pdb.yaml)
values:
- ../.lint/pdb.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: PodDisruptionBudget
- equal:
path: spec.minAvailable
value: 2
- it: sets extraLabels on PodDisruptionBudget
values:
- ../.lint/pdb.yaml
set:
extraLabels:
podDisruptionBudget:
foo: bar
baz: override-me
proxy:
extraLabels:
podDisruptionBudget:
baz: overridden
asserts:
- equal:
path: metadata.labels.foo
value: bar
- equal:
path: metadata.labels.baz
value: overridden