From c3958eaff31328240491502e834505fd5f712618 Mon Sep 17 00:00:00 2001 From: Ravind Kumar Date: Tue, 31 Jan 2023 14:57:23 -0500 Subject: [PATCH] Bugfix: Broken search logic for Kubernetes Upstream (#716) I think this will fix the incorrect URL logic for the searchbar, and also fixes it for the newly added docs platforms. --- source/_static/js/instantSearch.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/_static/js/instantSearch.js b/source/_static/js/instantSearch.js index 7b0ef8cc..7b2a357e 100644 --- a/source/_static/js/instantSearch.js +++ b/source/_static/js/instantSearch.js @@ -373,10 +373,16 @@ window.addEventListener("DOMContentLoaded", () => { var platform = ""; var environment = location.hostname === "localhost" || location.hostname === "127.0.0.1" ? "dev" : "prod"; - if (activePlatform === "kubernetes") { + if (activePlatform === "k8s") { platform = "kubernetes/upstream"; } else if (activePlatform === "openshift") { platform = "kubernetes/openshift"; + } else if (activePlatform === "eks") { + platform = "kubernetes/eks"; + } else if (activePlatform === "gks") { + platform = "kubernetes/gks"; + } else if (activePlatform === "aks") { + platform = "kubernetes/aks"; } else { platform = activePlatform; }