Skip to content

Commit

Permalink
Merge pull request #10260 from johngmyers/automated-cherry-pick-of-#1…
Browse files Browse the repository at this point in the history
…0239-upstream-release-1.19

Automated cherry pick of #10239: Use separate domain for kops-controller bootstrap
  • Loading branch information
k8s-ci-robot authored Nov 18, 2020
2 parents ba30e31 + 4999f7c commit 92102b0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nodeup/pkg/model/kops_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (b *KopsControllerBuilder) Build(c *fi.ModelBuilderContext) error {
Signer: fi.CertificateIDCA,
Type: "server",
Subject: nodetasks.PKIXName{CommonName: "kops-controller"},
AlternateNames: []string{b.Cluster.Spec.MasterInternalName},
AlternateNames: []string{"kops-controller.internal." + b.Cluster.ObjectMeta.Name},
}
c.AddTask(issueCert)

Expand Down
4 changes: 4 additions & 0 deletions upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ spec:
k8s-addon: kops-controller.addons.k8s.io
k8s-app: kops-controller
version: v1.19.0-beta.1
{{ if UseKopsControllerForNodeBootstrap }}
annotations:
dns.alpha.kubernetes.io/internal: kops-controller.internal.{{ ClusterName }}
{{ end }}
spec:
priorityClassName: system-node-critical
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: a7d47f4a668812e334b505231855a82cef2f670c
manifestHash: 5a0a74b65c83649d0a494311a55e7c39a98475a6
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ spec:
k8s-app: kops-controller
template:
metadata:
annotations:
dns.alpha.kubernetes.io/internal: kops-controller.internal.minimal.example.com
labels:
k8s-addon: kops-controller.addons.k8s.io
k8s-app: kops-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: a7d47f4a668812e334b505231855a82cef2f670c
manifestHash: 5a0a74b65c83649d0a494311a55e7c39a98475a6
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
2 changes: 1 addition & 1 deletion upup/pkg/fi/nodeup/nodetasks/bootstrap_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (b *BootstrapClient) queryBootstrap(c *fi.Context, req *nodeup.BootstrapReq

bootstrapUrl := url.URL{
Scheme: "https",
Host: net.JoinHostPort(c.Cluster.Spec.MasterInternalName, strconv.Itoa(wellknownports.KopsControllerPort)),
Host: net.JoinHostPort("kops-controller.internal."+c.Cluster.ObjectMeta.Name, strconv.Itoa(wellknownports.KopsControllerPort)),
Path: "/bootstrap",
}
httpReq, err := http.NewRequest("POST", bootstrapUrl.String(), bytes.NewReader(reqBytes))
Expand Down

0 comments on commit 92102b0

Please sign in to comment.