mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 12:16:03 +09:00
test(cozyplane): pin the args the platform's networking facts reach
The platform threads podCIDR, serviceCIDR and clusterDNS into the cozyplane chart, and they carry the masquerade and the VPCs' internal denies. A template that dropped one still rendered and every suite stayed green. The suite now asserts the agent's --cluster-cidr, --masquerade, --internal-cidrs and --mtu and the controller's --internal-cidrs and --cluster-dns, using non-default values so a chart default cannot stand in for a lost one. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
1 parent
57bb0d703f
commit
2e701173c8
1 file changed
+52
@@ -0,0 +1,52 @@
|
||||
suite: the platform's networking facts reach the agent and the controller
|
||||
# The platform threads networking.podCIDR, serviceCIDR and clusterDNS into
|
||||
# cozyplane.egress. These args carry the masquerade and the VPCs' internal
|
||||
# denies; a template that drops one still renders, with the wrong egress.
|
||||
# Non-default values, so a chart default cannot stand in for a lost one.
|
||||
templates:
|
||||
- charts/cozyplane/templates/agent.yaml
|
||||
- charts/cozyplane/templates/controller.yaml
|
||||
release:
|
||||
name: cozyplane
|
||||
namespace: cozy-cozyplane
|
||||
set:
|
||||
cozyplane:
|
||||
mtu: 1400
|
||||
egress:
|
||||
clusterCIDR: 192.168.0.0/17
|
||||
serviceCIDR: 172.20.0.0/16
|
||||
clusterDNS: 172.20.0.10
|
||||
internalCIDRs:
|
||||
- 10.8.0.0/24
|
||||
tests:
|
||||
- it: gives the agent the pod supernet, the masquerade and every internal range
|
||||
template: charts/cozyplane/templates/agent.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: DaemonSet
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--cluster-cidr=192.168.0.0/17"
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--masquerade=bpf"
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--internal-cidrs=192.168.0.0/17,172.20.0.0/16,10.8.0.0/24"
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--mtu=1400"
|
||||
|
||||
- it: gives the controller the internal ranges and the cluster DNS
|
||||
template: charts/cozyplane/templates/controller.yaml
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: Deployment
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--internal-cidrs=192.168.0.0/17,172.20.0.0/16,10.8.0.0/24"
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: "--cluster-dns=172.20.0.10"
|
||||
Reference in new issue
Block a user