From 3e4bcf7dd8b3faf8240d4e3416c1a0e0374a33db Mon Sep 17 00:00:00 2001 From: Michael Fraenkel <929377+fraenkel@users.noreply.github.com> Date: Wed, 11 Dec 2024 07:21:36 -0700 Subject: [PATCH] Disable init container injection for ray When istio is enabled, the kuberay-operator must disable the init container injection. See https://docs.ray.io/en/latest/cluster/kubernetes/k8s-ecosystem/istio.html#step-3-optional-enable-istio-mtls-strict-mode Signed-off-by: Michael Fraenkel <929377+fraenkel@users.noreply.github.com> --- .../overlays/kubeflow/disable-injection.yaml | 13 +++++++++++++ .../overlays/kubeflow/kustomization.yaml | 3 +++ contrib/ray/test.sh | 4 ++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 contrib/ray/kuberay-operator/overlays/kubeflow/disable-injection.yaml diff --git a/contrib/ray/kuberay-operator/overlays/kubeflow/disable-injection.yaml b/contrib/ray/kuberay-operator/overlays/kubeflow/disable-injection.yaml new file mode 100644 index 0000000000..bb757416a1 --- /dev/null +++ b/contrib/ray/kuberay-operator/overlays/kubeflow/disable-injection.yaml @@ -0,0 +1,13 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kuberay-operator + namespace: kubeflow +spec: + template: + spec: + containers: + - name: kuberay-operator + env: + - name: ENABLE_INIT_CONTAINER_INJECTION + value: "false" diff --git a/contrib/ray/kuberay-operator/overlays/kubeflow/kustomization.yaml b/contrib/ray/kuberay-operator/overlays/kubeflow/kustomization.yaml index 5520f1897a..49421b7e53 100644 --- a/contrib/ray/kuberay-operator/overlays/kubeflow/kustomization.yaml +++ b/contrib/ray/kuberay-operator/overlays/kubeflow/kustomization.yaml @@ -1,3 +1,6 @@ namespace: kubeflow resources: - ../../base + +patches: +- path: disable-injection.yaml diff --git a/contrib/ray/test.sh b/contrib/ray/test.sh index 71c8c5eaeb..02c82b4d59 100755 --- a/contrib/ray/test.sh +++ b/contrib/ray/test.sh @@ -33,7 +33,7 @@ kubectl label namespace $NAMESPACE istio-injection=enabled kubectl get namespaces --selector=istio-injection=enabled # Install KubeRay operator -kustomize build kuberay-operator/overlays/standalone | kubectl -n kubeflow apply --server-side -f - +kustomize build kuberay-operator/overlays/kubeflow | kubectl -n kubeflow apply --server-side -f - # Wait for the operator to be ready. kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/kuberay-operator @@ -87,4 +87,4 @@ for ((i=0; i