Skip to content

Commit

Permalink
rename container: wait-for-bootstrap -> wait-for-dns
Browse files Browse the repository at this point in the history
  • Loading branch information
elric1 committed Sep 30, 2021
1 parent 2aeb6ac commit 667a197
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions charts/tezos/templates/_containers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
name: var-volume
{{- end }}

{{- define "tezos.init_container.wait_for_bootstrap" }}
{{- if include "tezos.shouldWaitForBootstrapNode" . }}
{{- define "tezos.init_container.wait_for_dns" }}
{{- if include "tezos.shouldWaitForDNSNode" . }}
- image: {{ .Values.tezos_k8s_images.utils }}
args:
- wait-for-bootstrap
- wait-for-dns
imagePullPolicy: IfNotPresent
name: wait-for-bootstrap
name: wait-for-dns
envFrom:
- configMapRef:
name: tezos-config
Expand Down
4 changes: 2 additions & 2 deletions charts/tezos/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
{{- end }}

{{/*
Should nodes wait for a bootstrap node to be ready.
Should nodes wait for DNS to be ready for peers
Yes if these conditions are met:
- Node is not an invitee to a private chain
- There are chain genesis parameters specified, i.e. this is not a public chain
Returns a string "true" or empty string which is falsey.
*/}}
{{- define "tezos.shouldWaitForBootstrapNode" -}}
{{- define "tezos.shouldWaitForDNSNode" -}}
{{- if and (not .Values.is_invitation) (hasKey .Values.node_config_network "genesis")}}
{{- "true" }}
{{- else }}
Expand Down
2 changes: 1 addition & 1 deletion charts/tezos/templates/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
{{- include "tezos.init_container.config_init" $ | indent 8 }}
{{- include "tezos.init_container.zerotier" $ | indent 8 }}
{{- include "tezos.init_container.config_generator" $ | indent 8 }}
{{- include "tezos.init_container.wait_for_bootstrap" $ | indent 8 }}
{{- include "tezos.init_container.wait_for_dns" $ | indent 8 }}
{{- include "tezos.init_container.snapshot_downloader" $ | indent 8 }}
{{- include "tezos.init_container.snapshot_importer" $ | indent 8 }}
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion utils/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ COPY config-generator.sh /
COPY entrypoint.sh /
COPY logger.sh /
COPY snapshot-downloader.sh /
COPY wait-for-bootstrap.sh /
COPY wait-for-dns.sh /
ENTRYPOINT ["/entrypoint.sh"]
CMD []
4 changes: 2 additions & 2 deletions utils/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ case "$CMD" in
config-generator) exec /config-generator.sh "$@" ;;
logger) exec /logger.sh "$@" ;;
snapshot-downloader) exec /snapshot-downloader.sh "$@" ;;
wait-for-bootstrap) exec /wait-for-bootstrap.sh "$@" ;;
wait-for-dns) exec /wait-for-dns.sh "$@" ;;
faucet-gen) exec /faucet-gen.py "$@" ;;
esac

Expand All @@ -21,7 +21,7 @@ echo "Valid options are:"
echo " config-generator"
echo " logger"
echo " snapshot-downloader"
echo " wait-for-bootstrap"
echo " wait-for-dns"
echo " faucet-gen"

exit 1
File renamed without changes.

0 comments on commit 667a197

Please sign in to comment.