Files
cozystack/packages/system/cozystack-api/tests/apiservice_test.yaml
T
Timofei Larkin 12260c43b0 feat(cozystack-api): gate the sdn APIService
cozyplane serves sdn.cozystack.io through its own aggregated
apiserver; a second APIService for the group from cozystack-api would
hijack it and 404 every kind but SecurityGroup. cozystackAPI.serveSDN
(default true, so nothing changes off the cozyplane variant) lets the
platform turn exactly that APIService off; the suite pins that the
toggle removes it and nothing else.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-11-19 12:04:16 +01:00

43 lines
1.2 KiB
YAML

suite: sdn APIService gate
templates:
- templates/apiservice.yaml
release:
name: cozystack-api
namespace: cozy-system
tests:
- it: serves apps, core and sdn by default
asserts:
- hasDocuments:
count: 3
- containsDocument:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
name: v1alpha1.apps.cozystack.io
any: true
- containsDocument:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
name: v1alpha1.sdn.cozystack.io
any: true
# The cozyplane networking variant owns sdn.cozystack.io; the toggle must
# remove that APIService and nothing else.
- it: serveSDN off removes only the sdn APIService
set:
cozystackAPI:
serveSDN: false
asserts:
- hasDocuments:
count: 2
- containsDocument:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
name: v1alpha1.apps.cozystack.io
any: true
- containsDocument:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
name: v1alpha1.sdn.cozystack.io
any: true
not: true