Skip to content

Commit f97efaf

Browse files
committed
Enable Istio sidecar injection
For testing with the Sail Operator and upstream Istio, the operand namespace needs to be labeled, and the control-plane needs to be configured, to enable sidecar injection in order to enable automated deployment. * pkg/manifests/assets/router/namespace.yaml (metadata): Add label. * pkg/operator/controller/gatewayclass/istio.go (desiredIstio): Enable sidecar injection.
1 parent 3d05fd6 commit f97efaf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/manifests/assets/router/namespace.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ metadata:
66
openshift.io/node-selector: ""
77
workload.openshift.io/allowed: "management"
88
labels:
9+
# The upstream Istio version that Sail Operator uses requires sidecar
10+
# injection to be enabled on the namespace in order to enable automated
11+
# deployment.
12+
istio-injection: enabled
913
# allow openshift-monitoring to look for ServiceMonitor objects in this namespace
1014
openshift.io/cluster-monitoring: "true"
1115
name: openshift-ingress

pkg/operator/controller/gatewayclass/istio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func desiredIstio(name types.NamespacedName, ownerRef metav1.OwnerReference) (*s
9595
ExtraContainerArgs: []string{},
9696
},
9797
SidecarInjectorWebhook: &sailv1.SidecarInjectorConfig{
98-
EnableNamespacesByDefault: ptr.To(false),
98+
EnableNamespacesByDefault: ptr.To(true),
9999
},
100100
MeshConfig: &sailv1.MeshConfig{
101101
AccessLogFile: ptr.To("/dev/stdout"),

0 commit comments

Comments
 (0)