Skip to content

Commit

Permalink
Merge pull request #1195 from rhamilto/bz1676786
Browse files Browse the repository at this point in the history
Fix bug where cluster name is incorrect in kubeconfig created from se…
  • Loading branch information
openshift-merge-robot authored Feb 28, 2019
2 parents 01a9460 + 2e79e8d commit 032dca8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions cmd/bridge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ func main() {
// See https://github.com/openshift/service-serving-cert-signer
fServiceCAFile := fs.String("service-ca-file", "", "CA bundle for OpenShift services signed with the service signing certificates.")

fTectonicClusterName := fs.String("tectonic-cluster-name", "tectonic", "The Tectonic cluster name.")

fUserAuth := fs.String("user-auth", "disabled", "disabled | oidc | openshift")
fUserAuthOIDCIssuerURL := fs.String("user-auth-oidc-issuer-url", "", "The OIDC/OAuth2 issuer URL.")
fUserAuthOIDCCAFile := fs.String("user-auth-oidc-ca-file", "", "PEM file for the OIDC/OAuth2 issuer.")
Expand Down Expand Up @@ -159,7 +157,6 @@ func main() {
BaseURL: baseURL,
LogoutRedirect: logoutRedirect,
TectonicCACertFile: caCertFilePath,
ClusterName: *fTectonicClusterName,
Branding: branding,
DocumentationBaseURL: documentationBaseURL,
GoogleTagManagerID: *fGoogleTagManagerID,
Expand Down
1 change: 0 additions & 1 deletion frontend/public/components/about-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class AboutModal_ extends React.Component {
super(props);
this.state = {
kubernetesVersion: null,
clusterName: null,
};
}

Expand Down
3 changes: 2 additions & 1 deletion frontend/public/components/service-account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const KubeConfigify = (kind, sa) => ({

k8sGet(SecretModel, name, namespace).then(({data}) => {
const server = window.SERVER_FLAGS.kubeAPIServerURL;
const clusterName = window.SERVER_FLAGS.clusterName;
const url = new URL(server);
const clusterName = url.host;

const token = atob(data.token);
const cert = data['ca.crt'];
Expand Down
3 changes: 0 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ type jsGlobals struct {
AlertManagerBaseURL string `json:"alertManagerBaseURL"`
Branding string `json:"branding"`
DocumentationBaseURL string `json:"documentationBaseURL"`
ClusterName string `json:"clusterName"`
GoogleTagManagerID string `json:"googleTagManagerID"`
LoadTestFactor int `json:"loadTestFactor"`
}
Expand All @@ -70,7 +69,6 @@ type Server struct {
Auther *auth.Authenticator
StaticUser *auth.User
KubectlClientID string
ClusterName string
KubeAPIServerURL string
DocumentationBaseURL *url.URL
Branding string
Expand Down Expand Up @@ -254,7 +252,6 @@ func (s *Server) indexHandler(w http.ResponseWriter, r *http.Request) {
LoginErrorURL: proxy.SingleJoiningSlash(s.BaseURL.String(), AuthLoginErrorEndpoint),
LogoutURL: proxy.SingleJoiningSlash(s.BaseURL.String(), authLogoutEndpoint),
LogoutRedirect: s.LogoutRedirect.String(),
ClusterName: s.ClusterName,
KubeAPIServerURL: s.KubeAPIServerURL,
Branding: s.Branding,
DocumentationBaseURL: s.DocumentationBaseURL.String(),
Expand Down

0 comments on commit 032dca8

Please sign in to comment.