Skip to content

Commit a2e5aa9

Browse files
Disable istio sidecar injection (#496)
1 parent cff2ed2 commit a2e5aa9

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

.github/workflows/operator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
jobs:
1919
test:
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 30
2122
strategy:
2223
fail-fast: false
2324
matrix:
@@ -33,4 +34,5 @@ jobs:
3334
- name: Run tests
3435
env:
3536
KUBECONFIG: .pytest-kind/pytest-kind/kubeconfig
37+
TEST_ISTIO: "true"
3638
run: pytest dask_kubernetes/common/tests dask_kubernetes/operator/tests dask_kubernetes/experimental/tests

ci/install-deps.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
curl -L https://istio.io/downloadIstio | sh -
4+
mv istio-*/bin/istioctl /usr/local/bin/istioctl
5+
36
pip install -e .
47
pip install -r requirements-test.txt
58
pip install git+https://github.com/dask/distributed@main

dask_kubernetes/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ def k8s_cluster(kind_cluster, docker_image):
3636
del os.environ["KUBECONFIG"]
3737

3838

39+
@pytest.fixture(scope="session", autouse=True)
40+
def install_istio(k8s_cluster):
41+
if bool(os.environ.get("TEST_ISTIO", False)):
42+
check_dependency("istioctl")
43+
subprocess.check_output(["istioctl", "install", "--set", "profile=demo", "-y"])
44+
k8s_cluster.kubectl(
45+
"label", "namespace", "default", "istio-injection=enabled", "--overwrite"
46+
)
47+
48+
3949
@pytest.fixture(scope="session")
4050
def ns(k8s_cluster):
4151
return "default"

dask_kubernetes/operator/operator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def build_scheduler_pod_spec(name, spec):
2222
"labels": {
2323
"dask.org/cluster-name": name,
2424
"dask.org/component": "scheduler",
25+
"sidecar.istio.io/inject": "false",
2526
},
2627
},
2728
"spec": spec,
@@ -53,6 +54,7 @@ def build_worker_pod_spec(name, cluster_name, n, spec):
5354
"dask.org/cluster-name": cluster_name,
5455
"dask.org/workergroup-name": name,
5556
"dask.org/component": "worker",
57+
"sidecar.istio.io/inject": "false",
5658
},
5759
},
5860
"spec": spec,

0 commit comments

Comments
 (0)