Skip to content

cluster up: use routing suffix for router certificate hostnames #13647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions pkg/bootstrap/docker/openshift/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ func (h *Helper) InstallRouter(kubeClient kclientset.Interface, f *clientcmd.Fac
return errors.NewError("cannot update privileged SCC").WithCause(err).WithDetails(h.OriginLog())
}

routingSuffix := h.routingSuffix
if len(routingSuffix) == 0 {
routingSuffix = fmt.Sprintf("%s.nip.io", hostIP)
}

// Create router cert
cmdOutput := &bytes.Buffer{}
createCertOptions := &admin.CreateServerCertOptions{
Expand All @@ -120,10 +125,10 @@ func (h *Helper) InstallRouter(kubeClient kclientset.Interface, f *clientcmd.Fac
},
Overwrite: true,
Hostnames: []string{
fmt.Sprintf("%s.nip.io", hostIP),
routingSuffix,
// This will ensure that routes using edge termination and the default
// certs will use certs valid for their arbitrary subdomain names.
fmt.Sprintf("*.%s.nip.io", hostIP),
fmt.Sprintf("*.%s", routingSuffix),
},
CertFile: filepath.Join(masterDir, "router.crt"),
KeyFile: filepath.Join(masterDir, "router.key"),
Expand Down