Skip to content

Commit 1acac73

Browse files
committed
feat: add Istio Ambient Mode with PSS baseline requirement
Signed-off-by: madmecodes <[email protected]>
1 parent 7785348 commit 1acac73

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.github/workflows/istio_ambient_test.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,22 @@ jobs:
119119
kubectl logs -n istio-system daemonset/ztunnel --tail=50 | grep -i "connection\|proxy" || echo "ztunnel logs (last 50 lines):"
120120
kubectl logs -n istio-system daemonset/ztunnel --tail=50
121121
122-
- name: Apply Pod Security Standards Restricted levels
123-
run: ./tests/PSS_enable.sh
122+
- name: Verify PSS Baseline for istio-system
123+
run: |
124+
# Ambient mode requires PSS baseline (not restricted) for istio-system
125+
PSS_LEVEL=$(kubectl get namespace istio-system -o jsonpath='{.metadata.labels.pod-security\.kubernetes\.io/enforce}')
126+
if [ "$PSS_LEVEL" != "baseline" ]; then
127+
echo "ERROR: istio-system should have PSS baseline, got: $PSS_LEVEL"
128+
exit 1
129+
fi
130+
echo "istio-system correctly configured with PSS baseline"
131+
132+
- name: Apply Pod Security Standards Restricted levels to user namespaces
133+
run: |
134+
# Apply PSS restricted to kubeflow namespace (ztunnel runs in istio-system, not user namespaces)
135+
kubectl label namespace $KF_PROFILE pod-security.kubernetes.io/enforce=restricted --overwrite
136+
kubectl label namespace $KF_PROFILE pod-security.kubernetes.io/enforce-version=latest --overwrite
137+
echo "Applied PSS restricted to user namespace: $KF_PROFILE"
124138
125139
- name: Collect debug information on failure
126140
if: failure()

common/istio/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ kubectl apply -k istio-install/overlays/ambient-gke
3333
kubectl apply -k istio-install/overlays/ambient-oauth2-proxy
3434
```
3535

36-
**Note:** Ambient mode uses Kustomize components (`components/ambient-mode/`, `components/gke-ambient/`) for composable configuration without duplication.
36+
**Important:** Ambient mode requires PSS Baseline (not Restricted) for the `istio-system` namespace. The ztunnel component needs `CAP_SYS_ADMIN`, `CAP_NET_ADMIN`, and `CAP_NET_RAW` capabilities for transparent proxying and network namespace operations. The `istio-system` namespace is automatically configured with PSS baseline labels when using ambient mode components.
37+
38+
**Note:** Ambient mode uses Kustomize components (`components/ambient-mode/`) for composable configuration without duplication.
3739

3840
### Insecure Istio (CNI-disabled)
3941
For environments that don't support CNI:
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: istio-system
5+
labels:
6+
pod-security.kubernetes.io/enforce: baseline
7+
pod-security.kubernetes.io/enforce-version: latest
8+
pod-security.kubernetes.io/audit: baseline
9+
pod-security.kubernetes.io/audit-version: latest
10+
pod-security.kubernetes.io/warn: baseline
11+
pod-security.kubernetes.io/warn-version: latest

common/istio/istio-install/components/ambient-mode/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: Component
33

44
resources:
55
- ztunnel.yaml
6+
- istio-namespace-pss-baseline.yaml
67

78
patches:
89
- path: istiod-ambient-patch.yaml

0 commit comments

Comments
 (0)