Skip to content

Commit 56c6835

Browse files
committed
feat: using components approach to enable ambient-mode and gke specific ambient-gke
Signed-off-by: madmecodes <[email protected]>
1 parent 61919bd commit 56c6835

File tree

12 files changed

+62
-46
lines changed

12 files changed

+62
-46
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,5 +746,5 @@ pre-commit run
746746
- **Q:** Why does Kubeflow use Istio CNI instead of standard Istio?
747747
**A:** Istio CNI provides better security by eliminating the need for privileged init containers, making it more compatible with Pod Security Standards (PSS). It also enables native sidecars support introduced in Kubernetes 1.28, which helps address issues with init containers and application lifecycle management.
748748
- **Q:** Why does Istio CNI fail on Google Kubernetes Engine (GKE) with "read-only file system" errors?
749-
**A:** GKE mounts `/opt/cni/bin` as read-only for security reasons, preventing the Istio CNI installer from writing the CNI binary. Use the GKE-specific overlay: `kubectl apply -k common/istio/istio-install/overlays/gke`. This overlay uses GKE's writable CNI directory at `/home/kubernetes/bin`. For more details, see [Istio CNI Prerequisites](https://istio.io/latest/docs/setup/additional-setup/cni/#prerequisites) and [Platform Prerequisites](https://istio.io/latest/docs/ambient/install/platform-prerequisites/).-`
749+
**A:** GKE mounts `/opt/cni/bin` as read-only for security reasons. Use the GKE-specific overlay: `kubectl apply -k common/istio/istio-install/overlays/gke` (or `overlays/ambient-gke` for ambient mode). These overlays use GKE's writable CNI directory at `/home/kubernetes/bin`. For details, see [Istio CNI Prerequisites](https://istio.io/latest/docs/setup/additional-setup/cni/#prerequisites).
750750

common/istio/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ GKE mounts `/opt/cni/bin` as read-only for security reasons, preventing the Isti
1919
kubectl apply -k istio-install/overlays/gke
2020
```
2121

22+
### Ambient Mode (Sidecar-free Service Mesh)
23+
Istio Ambient Mode eliminates sidecars, reducing resource overhead while maintaining full L4/L7 traffic processing capabilities.
24+
25+
```bash
26+
# Standard Kubernetes
27+
kubectl apply -k istio-install/overlays/ambient
28+
29+
# Google Kubernetes Engine (GKE)
30+
kubectl apply -k istio-install/overlays/ambient-gke
31+
32+
# With OAuth2-Proxy
33+
kubectl apply -k istio-install/overlays/ambient-oauth2-proxy
34+
```
35+
36+
**Note:** Ambient mode uses Kustomize components (`components/ambient-mode/`, `components/gke-ambient/`) for composable configuration without duplication.
37+
2238
### Insecure Istio (CNI-disabled)
2339
For environments that don't support CNI:
2440
```bash
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
resources:
5+
- ztunnel.yaml
6+
7+
patches:
8+
- path: istiod-ambient-patch.yaml
9+
target:
10+
kind: Deployment
11+
name: istiod
12+
namespace: istio-system
13+
- target:
14+
kind: Namespace
15+
name: kubeflow
16+
patch: |-
17+
- op: add
18+
path: /metadata/labels/istio.io~1dataplane-mode
19+
value: ambient

common/istio/istio-install/overlays/ambient/ztunnel.yaml renamed to common/istio/istio-install/components/ambient-mode/ztunnel.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ metadata:
1212
app.kubernetes.io/part-of: "istio"
1313
app.kubernetes.io/version: "1.27.1"
1414
helm.sh/chart: ztunnel-1.27.1
15-
1615
annotations:
1716
{}
1817
---
@@ -29,7 +28,6 @@ metadata:
2928
app.kubernetes.io/part-of: "istio"
3029
app.kubernetes.io/version: "1.27.1"
3130
helm.sh/chart: ztunnel-1.27.1
32-
3331
annotations:
3432
{}
3533
spec:
@@ -53,7 +51,6 @@ spec:
5351
app.kubernetes.io/part-of: "istio"
5452
app.kubernetes.io/version: "1.27.1"
5553
helm.sh/chart: ztunnel-1.27.1
56-
5754
annotations:
5855
sidecar.istio.io/inject: "false"
5956
prometheus.io/port: "15020"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
patches:
5+
- path: gke-cni-patch.yaml
6+
target:
7+
kind: DaemonSet
8+
name: istio-cni-node
9+
namespace: kube-system
10+
- path: gke-ztunnel-patch.yaml
11+
target:
12+
kind: DaemonSet
13+
name: ztunnel
14+
namespace: istio-system

common/istio/istio-install/overlays/ambient-gke/kustomization.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

44
resources:
5-
- ../ambient
5+
- ../../base
66

7-
patches:
8-
- path: gke-cni-patch.yaml
9-
target:
10-
kind: DaemonSet
11-
name: istio-cni-node
12-
namespace: kube-system
13-
- path: gke-ztunnel-patch.yaml
14-
target:
15-
kind: DaemonSet
16-
name: ztunnel
17-
namespace: istio-system
7+
components:
8+
- ../../components/ambient-mode
9+
- ../../components/gke-ambient

common/istio/istio-install/overlays/ambient/kubeflow-namespace-ambient.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)