|
| 1 | +suite: tenant Cilium policies follow the platform variant's CNI |
| 2 | +templates: |
| 3 | + - templates/networkpolicy.yaml |
| 4 | + - templates/networkpolicy-traces-central.yaml |
| 5 | + - templates/networkpolicy-traces-central-read.yaml |
| 6 | +release: |
| 7 | + name: tenant-ktj |
| 8 | + namespace: tenant-root |
| 9 | +tests: |
| 10 | + - it: renders no Cilium objects on isp-hosted without the cilium.io API |
| 11 | + set: |
| 12 | + _cluster: |
| 13 | + bundle-name: isp-hosted |
| 14 | + asserts: |
| 15 | + - hasDocuments: |
| 16 | + count: 0 |
| 17 | + |
| 18 | + - it: renders no Cilium objects on isp-hosted-slim without the cilium.io API |
| 19 | + set: |
| 20 | + _cluster: |
| 21 | + bundle-name: isp-hosted-slim |
| 22 | + asserts: |
| 23 | + - hasDocuments: |
| 24 | + count: 0 |
| 25 | + |
| 26 | + - it: renders no Cilium objects on isp-hosted when only one Cilium kind is served |
| 27 | + set: |
| 28 | + _cluster: |
| 29 | + bundle-name: isp-hosted |
| 30 | + capabilities: |
| 31 | + apiVersions: |
| 32 | + - cilium.io/v2/CiliumNetworkPolicy |
| 33 | + asserts: |
| 34 | + - hasDocuments: |
| 35 | + count: 0 |
| 36 | + |
| 37 | + - it: renders the Cilium policies on isp-hosted when the host runs Cilium |
| 38 | + set: |
| 39 | + _cluster: |
| 40 | + bundle-name: isp-hosted |
| 41 | + capabilities: |
| 42 | + apiVersions: |
| 43 | + - cilium.io/v2/CiliumNetworkPolicy |
| 44 | + - cilium.io/v2/CiliumClusterwideNetworkPolicy |
| 45 | + asserts: &policiesRendered |
| 46 | + - template: templates/networkpolicy.yaml |
| 47 | + documentSelector: |
| 48 | + path: metadata.name |
| 49 | + value: allow-internal-communication |
| 50 | + isKind: |
| 51 | + of: CiliumNetworkPolicy |
| 52 | + - template: templates/networkpolicy.yaml |
| 53 | + documentSelector: |
| 54 | + path: metadata.name |
| 55 | + value: tenant-ktj-ingress |
| 56 | + isKind: |
| 57 | + of: CiliumClusterwideNetworkPolicy |
| 58 | + |
| 59 | + - it: renders the Cilium policies on a Cilium variant even when the API is not discoverable |
| 60 | + set: |
| 61 | + _cluster: |
| 62 | + bundle-name: isp-full |
| 63 | + asserts: *policiesRendered |
| 64 | + |
| 65 | + - it: renders the Cilium policies when the platform injected no _cluster |
| 66 | + asserts: *policiesRendered |
| 67 | + |
| 68 | + - it: renders no shared-central tracing egress on isp-hosted without the cilium.io API |
| 69 | + set: |
| 70 | + _cluster: |
| 71 | + bundle-name: isp-hosted |
| 72 | + tracingCentral: true |
| 73 | + monitoring: true |
| 74 | + asserts: |
| 75 | + - hasDocuments: |
| 76 | + count: 0 |
| 77 | + |
| 78 | + - it: renders the shared-central tracing egress on isp-hosted when the host runs Cilium |
| 79 | + set: |
| 80 | + _cluster: |
| 81 | + bundle-name: isp-hosted |
| 82 | + tracingCentral: true |
| 83 | + monitoring: true |
| 84 | + capabilities: |
| 85 | + apiVersions: |
| 86 | + - cilium.io/v2/CiliumNetworkPolicy |
| 87 | + - cilium.io/v2/CiliumClusterwideNetworkPolicy |
| 88 | + asserts: &tracingRendered |
| 89 | + - template: templates/networkpolicy-traces-central.yaml |
| 90 | + isKind: |
| 91 | + of: CiliumClusterwideNetworkPolicy |
| 92 | + - template: templates/networkpolicy-traces-central-read.yaml |
| 93 | + isKind: |
| 94 | + of: CiliumClusterwideNetworkPolicy |
| 95 | + |
| 96 | + - it: renders the shared-central tracing egress on a Cilium variant |
| 97 | + set: |
| 98 | + _cluster: |
| 99 | + bundle-name: isp-full |
| 100 | + tracingCentral: true |
| 101 | + monitoring: true |
| 102 | + asserts: *tracingRendered |
0 commit comments