Skip to content

Commit

Permalink
fix: use dns name to reach rest
Browse files Browse the repository at this point in the history
Using the host name creates a race as rest must start ahead.
Instead, simply use the dns name, which will be updated whenever rest is ready.
Resolves: openebs/mayastor#1076
  • Loading branch information
tiagolobocastro committed Feb 1, 2022
1 parent dc8f839 commit 08ece34
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 33 deletions.
2 changes: 1 addition & 1 deletion chart/templates/csi-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
imagePullPolicy: {{ .Values.mayastorCP.pullPolicy }}
args:
- "--csi-socket=/var/lib/csi/sockets/pluginproxy/csi.sock"
- "--rest-endpoint=http://$(REST_SERVICE_HOST):8081"{{ if .Values.base.jaeger.enabled }}
- "--rest-endpoint=http://rest:8081"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ .Values.base.jaeger.agent.name }}:{{ .Values.base.jaeger.agent.port }}"{{ end }}
env:
- name: RUST_LOG
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/msp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
image: {{ .Values.mayastorCP.registry }}mayadata/mcp-msp-operator:{{ .Values.mayastorCP.tag }}
imagePullPolicy: {{ .Values.mayastorCP.pullPolicy }}
args:
- "-e http://$(REST_SERVICE_HOST):8081"
- "-e http://rest:8081"
- "--interval={{ .Values.base.cache_poll_period }}"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ .Values.base.jaeger.agent.name }}:{{ .Values.base.jaeger.agent.port }}"{{ end }}
env:
Expand Down
6 changes: 4 additions & 2 deletions deploy/core-agents-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ spec:
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz nats 4222; do echo "Waiting for nats..."; sleep 1; done;
- trap "exit 1" TERM; until nc -vz nats 4222; do echo "Waiting for nats..."; sleep
1; done;
image: busybox:latest
name: nats-probe
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz mayastor-etcd 2379; do echo "Waiting for etcd..."; sleep 1; done;
- trap "exit 1" TERM; until nc -vz mayastor-etcd 2379; do echo "Waiting for etcd...";
sleep 1; done;
image: busybox:latest
name: etcd-probe
containers:
Expand Down
5 changes: 3 additions & 2 deletions deploy/csi-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ spec:
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz rest 8081; do echo "Waiting for REST API endpoint to become available"; sleep 1; done;
- trap "exit 1" TERM; until nc -vz rest 8081; do echo "Waiting for REST API endpoint
to become available"; sleep 1; done;
image: busybox:latest
name: rest-probe
containers:
Expand Down Expand Up @@ -69,7 +70,7 @@ spec:
imagePullPolicy: IfNotPresent
args:
- "--csi-socket=/var/lib/csi/sockets/pluginproxy/csi.sock"
- "--rest-endpoint=http://$(REST_SERVICE_HOST):8081"
- "--rest-endpoint=http://rest:8081"
env:
- name: RUST_LOG
value: info
Expand Down
11 changes: 0 additions & 11 deletions deploy/jaeger-operator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,3 @@ spec:
value: "mayastor-jaeger-operator"
resources:
{}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
tolerations:
- key: node-role.kubernetes.io/master
11 changes: 0 additions & 11 deletions deploy/jaeger-operator/jaeger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ spec:
strategy: allInOne
ingress:
enabled: false
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
tolerations:
- key: node-role.kubernetes.io/master
query:
serviceType: NodePort
nodePort: 30012
Expand Down
8 changes: 5 additions & 3 deletions deploy/msp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ spec:
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz nats 4222; do echo "Waiting for nats..."; sleep 1; done;
- trap "exit 1" TERM; until nc -vz nats 4222; do echo "Waiting for nats..."; sleep
1; done;
image: busybox:latest
name: nats-probe
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz mayastor-etcd 2379; do echo "Waiting for etcd..."; sleep 1; done;
- trap "exit 1" TERM; until nc -vz mayastor-etcd 2379; do echo "Waiting for etcd...";
sleep 1; done;
image: busybox:latest
name: etcd-probe
containers:
Expand All @@ -45,7 +47,7 @@ spec:
image: mayadata/mcp-msp-operator:v1.0.0
imagePullPolicy: IfNotPresent
args:
- "-e http://$(REST_SERVICE_HOST):8081"
- "-e http://rest:8081"
- "--interval=30s"
env:
- name: RUST_LOG
Expand Down
6 changes: 4 additions & 2 deletions deploy/rest-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ spec:
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz nats 4222; do echo "Waiting for nats..."; sleep 1; done;
- trap "exit 1" TERM; until nc -vz nats 4222; do echo "Waiting for nats..."; sleep
1; done;
image: busybox:latest
name: nats-probe
- command:
- sh
- -c
- trap "exit 1" TERM; until nc -vz mayastor-etcd 2379; do echo "Waiting for etcd..."; sleep 1; done;
- trap "exit 1" TERM; until nc -vz mayastor-etcd 2379; do echo "Waiting for etcd...";
sleep 1; done;
image: busybox:latest
name: etcd-probe
containers:
Expand Down

0 comments on commit 08ece34

Please sign in to comment.