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

Commit 2e4db1e

Browse files
author
Patrick Baxter
committed
remove apiserver port staggering in checkpointer code
This is no longer necessary since the self-hosted apiserver will keep trying to rebind to the insecure port.
1 parent 42bb616 commit 2e4db1e

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

cmd/checkpoint/main.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -163,22 +163,6 @@ func cleanVolumes(p *v1.Pod) {
163163
}
164164
}
165165

166-
// We need to ensure that the temp apiserver is not binding
167-
// on the same insecure port as our self-hosted apiserver, otherwise
168-
// it will exit immediately instead of waiting to bind.
169-
func modifyInsecurePort(p *v1.Pod) {
170-
for i := range p.Spec.Containers {
171-
c := &p.Spec.Containers[i]
172-
cmds := c.Command
173-
for i, cmd := range cmds {
174-
if strings.Contains(cmd, "insecure-port") {
175-
cmds[i] = strings.Replace(cmd, "8080", "8081", 1)
176-
break
177-
}
178-
}
179-
}
180-
}
181-
182166
// writeManifest will write the manifest to the ignore path.
183167
// It first writes the file to a temp file, and then atomically moves it into
184168
// the actual ignore path and correct file name.
@@ -199,7 +183,6 @@ func parseAPIPodSpec(podList v1.PodList) v1.PodSpec {
199183
}
200184
}
201185
cleanVolumes(&apiPod)
202-
modifyInsecurePort(&apiPod)
203186
return apiPod.Spec
204187
}
205188

0 commit comments

Comments
 (0)