Skip to content

Commit 65dc2ca

Browse files
fix: Use kube-system ns for kubernetes dashboard
Signed-off-by: Homayoon (Hue) Alimohammadi <[email protected]>
1 parent da7c2db commit 65dc2ca

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/validators.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ def validate_dns_dashboard():
2323
Validate the dashboard addon by trying to access the kubernetes dashboard.
2424
The dashboard will return an HTML indicating that it is up and running.
2525
"""
26-
service = "kubernetes-dashboard:"
27-
ns = "kube-system"
28-
app_names = ["k8s-app=kubernetes-dashboard", "k8s-app=dashboard-metrics-scraper"]
29-
3026
output = kubectl("get ns")
3127
if "kubernetes-dashboard" in output:
3228
# we are running a newer version of the dashboard introduced in 1.33
29+
# NOTE(Hue): For backwards compatibility after switching back to kube-system namespace in 1.35
3330
service = "kubernetes-dashboard-kong-proxy:443"
3431
ns = "kubernetes-dashboard"
3532
components = ["api", "auth", "metrics-scraper", "web"]
3633
app_names = [f"app.kubernetes.io/name=kubernetes-dashboard-{app}" for app in components]
3734
app_names.append("app.kubernetes.io/name=kong")
35+
else:
36+
# NOTE(Hue): Switched back to kube-system namespace since Microk8s 1.35
37+
service = "kubernetes-dashboard-kong-proxy:443"
38+
ns = "kube-system"
39+
components = ["api", "auth", "metrics-scraper", "web"]
40+
app_names = [f"app.kubernetes.io/name=kubernetes-dashboard-{app}" for app in components]
3841

3942
for app_name in app_names:
4043
wait_for_pod_state("", ns, "running", label=f"{app_name}")

0 commit comments

Comments
 (0)