Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit f262ce1

Browse files
authored
Merge pull request #145 from pbx0/portstagger2
pkg/bootkube: remove apiserver port staggering
2 parents 746b23a + b356e67 commit f262ce1

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

pkg/asset/internal/templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ spec:
128128
hostNetwork: true
129129
containers:
130130
- name: checkpoint-installer
131-
image: quay.io/coreos/pod-checkpointer:969e207f005a78d1823e88bb10be34386eea473f
131+
image: quay.io/coreos/pod-checkpointer:746b23aa9adb7ed383170dd03f418a1fa1175181
132132
command:
133133
- /checkpoint-installer.sh
134134
volumeMounts:

pkg/bootkube/bootkube.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,8 @@ import (
1818
)
1919

2020
const (
21-
assetTimeout = 10 * time.Minute
22-
// NOTE: using 8081 as the port is a temporary hack when there is a single api-server.
23-
// The self-hosted apiserver will immediately die if it cannot bind to the insecure interface.
24-
// However, if it can successfully bind to insecure interface, it will continue to retry
25-
// failures on the the secure interface.
26-
// Staggering the insecure port allows us to launch a self-hosted api-server on the same machine
27-
// as the bootkube, and the self-hosted api-server will continually retry binding to secure interface
28-
// and doesn't end up in a race with bootkube for the insecure port. When bootkube dies, the self-hosted
29-
// api-server is using the correct standard ports (443/8080).
30-
insecureAPIAddr = "http://127.0.0.1:8081"
21+
assetTimeout = 10 * time.Minute
22+
insecureAPIAddr = "http://127.0.0.1:8080"
3123
)
3224

3325
var requiredPods = []string{
@@ -57,7 +49,7 @@ func NewBootkube(config Config) (*bootkube, error) {
5749
fs.Parse([]string{
5850
"--bind-address=0.0.0.0",
5951
"--secure-port=443",
60-
"--insecure-port=8081", // NOTE: temp hack for single-apiserver
52+
"--insecure-port=8080",
6153
"--allow-privileged=true",
6254
"--tls-private-key-file=" + filepath.Join(config.AssetDir, asset.AssetPathAPIServerKey),
6355
"--tls-cert-file=" + filepath.Join(config.AssetDir, asset.AssetPathAPIServerCert),

0 commit comments

Comments
 (0)