Skip to content

Commit

Permalink
Ability to recongnize Embedded Clusters in kurl proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Sep 30, 2024
1 parent ff0adfa commit 093ff41
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions kurl_proxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ func getHttpServer(fingerprint string, acceptAnonymousUploads bool, assetsDir st
}
appIcon := template.URL(app.Spec.Icon)
c.HTML(http.StatusOK, "insecure.html", gin.H{
"fingerprintSHA1": fingerprint,
"AppIcon": appIcon,
"AppTitle": app.Spec.Title,
"fingerprintSHA1": fingerprint,
"AppIcon": appIcon,
"AppTitle": app.Spec.Title,
"IsEmbeddedCluster": isEmbeddedCluster(),
})
})
r.NoRoute(func(c *gin.Context) {
Expand Down Expand Up @@ -677,3 +678,7 @@ func generateCertHostnames(namespace string) (string, []string) {

return DEFAULT_KOTSADM_CERT_CN, altNames
}

func isEmbeddedCluster() bool {
return os.Getenv("EMBEDDED_CLUSTER_ID") != ""
}

0 comments on commit 093ff41

Please sign in to comment.