Skip to content

Commit

Permalink
Bump initContainer timeout and squash both wait-for-port loops into one
Browse files Browse the repository at this point in the history
  • Loading branch information
soltysh committed Apr 15, 2020
1 parent f8eb209 commit d412fb6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 32 deletions.
20 changes: 4 additions & 16 deletions bindata/v4.1.0/kube-controller-manager/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,15 @@ metadata:
revision: "REVISION"
spec:
initContainers:
- name: wait-for-host-port
- name: wait-for-host-ports
terminationMessagePolicy: FallbackToLogsOnError
image: ${IMAGE}
imagePullPolicy: IfNotPresent
command: ['/usr/bin/timeout', '30', "/bin/bash", "-c"]
command: ['/usr/bin/timeout', '105', '/bin/bash', '-ec'] # a bit more than 60s for graceful termination + 35s for minimum-termination-duration, 5s extra cri-o's graceful termination period
args:
- |
echo -n "Waiting for port :10257 to be released."
while [ -n "$(lsof -ni :10257)" ]; do
echo -n "."
sleep 1
done
- name: wait-for-cpc-host-port
terminationMessagePolicy: FallbackToLogsOnError
image: ${IMAGE}
imagePullPolicy: IfNotPresent
command: ['/usr/bin/timeout', '30', "/bin/bash", "-c"]
args:
- |
echo -n "Waiting for port :10357 to be released."
while [ -n "$(lsof -ni :10357)" ]; do
echo -n "Waiting for port :10257 and :10357 to be released."
while [ -n "$(lsof -ni :10257)$(lsof -ni :10357)" ]; do
echo -n "."
sleep 1
done
Expand Down
20 changes: 4 additions & 16 deletions pkg/operator/v411_00_assets/bindata.go

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

0 comments on commit d412fb6

Please sign in to comment.