Skip to content

Commit

Permalink
Merge openebs#459
Browse files Browse the repository at this point in the history
459: CAS-481: wait for message bus r=tiagolobocastro a=tiagolobocastro

On k8s, even before even attempting to start mayastor we should make
sure that the nats service is ready.

Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Oct 7, 2020
2 parents fb10129 + 76bbdae commit bdd5243
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion deploy/mayastor-daemonset-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ spec:
# belong to Guaranteed QoS class, hence can never get evicted in case of
# pressure unless they exceed those limits. limits and requests must be
# the same.
initContainers:
- name: message-bus-probe
image: busybox:latest
command: ['sh', '-c', 'until nc -vz nats 4222; do echo "Waiting for message bus..."; sleep 1; done;']
containers:
- name: mayastor
image: 192.168.1.119:5000/mayastor:dev
image: mayadata/mayastor:latest
imagePullPolicy: Always
env:
- name: MY_NODE_NAME
Expand Down
6 changes: 4 additions & 2 deletions deploy/mayastor-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
# belong to Guaranteed QoS class, hence can never get evicted in case of
# pressure unless they exceed those limits. limits and requests must be
# the same.
initContainers:
- name: message-bus-probe
image: busybox:latest
command: ['sh', '-c', 'until nc -vz nats 4222; do echo "Waiting for message bus..."; sleep 1; done;']
containers:
- name: mayastor
image: mayadata/mayastor:latest
Expand All @@ -42,8 +46,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: IMPORT_NEXUSES
value: "false"
args:
- "-N$(MY_NODE_NAME)"
- "-g$(MY_POD_IP)"
Expand Down

0 comments on commit bdd5243

Please sign in to comment.