Skip to content

Commit

Permalink
Wait for port to be available
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisantoshgudimetla committed Apr 15, 2019
1 parent 8fb6d93 commit 2a5caa9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
29 changes: 29 additions & 0 deletions bindata/v3.11.0/kube-scheduler/pod.yaml
Expand Up @@ -8,6 +8,19 @@ metadata:
scheduler: "true"
revision: "REVISION"
spec:
initContainers:
- name: wait-for-host-port
image: ${IMAGE}
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command: ['/usr/bin/timeout', '30', '/bin/bash', '-c']
args:
- |
echo -n "Waiting for port :10251 to be released."
while [ -n "$(lsof -ni :10251)" ]; do
echo -n "."
sleep 1
done
containers:
- name: scheduler
image: ${IMAGE}
Expand All @@ -23,9 +36,25 @@ spec:
resources:
requests:
memory: 50Mi
ports:
- containerPort: 10259
volumeMounts:
- mountPath: /etc/kubernetes/static-pod-resources
name: resource-dir
livenessProbe:
httpGet:
scheme: HTTP
port: 10251
path: healthz
initialDelaySeconds: 45
timeOutSeconds: 10
readinessProbe:
httpGet:
scheme: HTTP
port: 10251
path: healthz
initialDelaySeconds: 45
timeOutSeconds: 10
hostNetwork: true
priorityClassName: system-node-critical
tolerations:
Expand Down
Expand Up @@ -15,8 +15,7 @@ spec:
port: https
scheme: https
tlsConfig:
# TODO where do you mount the service-ca.crt?
insecureSkipVerify: true
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
serverName: metrics.openshift-kube-scheduler-operator.svc
jobLabel: component
namespaceSelector:
Expand Down
29 changes: 29 additions & 0 deletions pkg/operator/v311_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 2a5caa9

Please sign in to comment.