Skip to content

Commit e76ab75

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 4e54863 commit e76ab75

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
@@ -5,6 +5,10 @@ metadata:
55
annotations:
66
openshift.io/node-selector: ""
77
workload.openshift.io/allowed: "management"
8+
# The upstream Istio version that Sail Operator uses requires sidecar
9+
# injection to be enabled on the namespace in order to enable automated
10+
# deployment.
11+
istio-injection: enabled
812
labels:
913
# allow openshift-monitoring to look for ServiceMonitor objects in this namespace
1014
openshift.io/cluster-monitoring: "true"

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)