Skip to content

Commit dab9434

Browse files
authored
Ability to recongnize Embedded Clusters in kurl proxy (#4931)
1 parent 89d1b61 commit dab9434

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

kurl_proxy/cmd/main.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,10 @@ func getHttpServer(fingerprint string, acceptAnonymousUploads bool, assetsDir st
275275
}
276276
appIcon := template.URL(app.Spec.Icon)
277277
c.HTML(http.StatusOK, "insecure.html", gin.H{
278-
"fingerprintSHA1": fingerprint,
279-
"AppIcon": appIcon,
280-
"AppTitle": app.Spec.Title,
278+
"fingerprintSHA1": fingerprint,
279+
"AppIcon": appIcon,
280+
"AppTitle": app.Spec.Title,
281+
"IsEmbeddedCluster": isEmbeddedCluster(),
281282
})
282283
})
283284
r.NoRoute(func(c *gin.Context) {
@@ -677,3 +678,7 @@ func generateCertHostnames(namespace string) (string, []string) {
677678

678679
return DEFAULT_KOTSADM_CERT_CN, altNames
679680
}
681+
682+
func isEmbeddedCluster() bool {
683+
return os.Getenv("EMBEDDED_CLUSTER_ID") != ""
684+
}

0 commit comments

Comments
 (0)