Skip to content

Commit

Permalink
Don't create zerotier volume when not used + update Helm tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harryttd committed Jul 21, 2023
1 parent ee0d2c0 commit b30cd92
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 24 deletions.
2 changes: 2 additions & 0 deletions charts/tezos/templates/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ spec:
fsGroup: 1000
{{- include "tezos.nodeSelectorConfig" $ | indent 6 }}
volumes:
{{- if (include "tezos.doesZerotierConfigExist" $) }}
- hostPath:
path: /dev/net/tun
name: dev-net-tun
{{- end }}
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down
3 changes: 0 additions & 3 deletions test/charts/mainnet.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,6 @@ spec:
securityContext:
fsGroup: 1000
volumes:
- hostPath:
path: /dev/net/tun
name: dev-net-tun
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down
6 changes: 0 additions & 6 deletions test/charts/mainnet2.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,6 @@ spec:
securityContext:
fsGroup: 1000
volumes:
- hostPath:
path: /dev/net/tun
name: dev-net-tun
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down Expand Up @@ -905,9 +902,6 @@ spec:
securityContext:
fsGroup: 1000
volumes:
- hostPath:
path: /dev/net/tun
name: dev-net-tun
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down
51 changes: 36 additions & 15 deletions test/charts/private-chain.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ data:
# Source: tezos-chain/templates/configs.yaml
apiVersion: v1
data:
tacoinfraSigner-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
tezos-baking-node-0-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
a-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
b-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
c-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
d-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
tacoinfraSigner-013-PtJakart-per-block-votes.json: "{\"liquidity_baking_toggle_vote\":\"pass\"}"
kind: ConfigMap
metadata:
name: baker-config
Expand Down Expand Up @@ -682,9 +687,6 @@ spec:
securityContext:
fsGroup: 1000
volumes:
- hostPath:
path: /dev/net/tun
name: dev-net-tun
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down Expand Up @@ -806,7 +808,12 @@ spec:
per_block_vote_file=/etc/tezos/baker-config/${my_baker_account}-${proto_command}-per-block-votes.json
if [ $(cat $per_block_vote_file) == "null" ]; then
if [ ! -f "$per_block_vote_file" ]; then
echo "Error: $per_block_vote_file not found" >&2
exit 1
fi
if [ "$(cat $per_block_vote_file)" == "null" ]; then
cat << EOF
You must pass per-block-votes (such as liquidity_baking_toggle_vote) in values.yaml, for example:
protocols:
Expand Down Expand Up @@ -878,7 +885,12 @@ spec:
per_block_vote_file=/etc/tezos/baker-config/${my_baker_account}-${proto_command}-per-block-votes.json
if [ $(cat $per_block_vote_file) == "null" ]; then
if [ ! -f "$per_block_vote_file" ]; then
echo "Error: $per_block_vote_file not found" >&2
exit 1
fi
if [ "$(cat $per_block_vote_file)" == "null" ]; then
cat << EOF
You must pass per-block-votes (such as liquidity_baking_toggle_vote) in values.yaml, for example:
protocols:
Expand Down Expand Up @@ -950,7 +962,12 @@ spec:
per_block_vote_file=/etc/tezos/baker-config/${my_baker_account}-${proto_command}-per-block-votes.json
if [ $(cat $per_block_vote_file) == "null" ]; then
if [ ! -f "$per_block_vote_file" ]; then
echo "Error: $per_block_vote_file not found" >&2
exit 1
fi
if [ "$(cat $per_block_vote_file)" == "null" ]; then
cat << EOF
You must pass per-block-votes (such as liquidity_baking_toggle_vote) in values.yaml, for example:
protocols:
Expand Down Expand Up @@ -1022,7 +1039,12 @@ spec:
per_block_vote_file=/etc/tezos/baker-config/${my_baker_account}-${proto_command}-per-block-votes.json
if [ $(cat $per_block_vote_file) == "null" ]; then
if [ ! -f "$per_block_vote_file" ]; then
echo "Error: $per_block_vote_file not found" >&2
exit 1
fi
if [ "$(cat $per_block_vote_file)" == "null" ]; then
cat << EOF
You must pass per-block-votes (such as liquidity_baking_toggle_vote) in values.yaml, for example:
protocols:
Expand Down Expand Up @@ -1094,7 +1116,12 @@ spec:
per_block_vote_file=/etc/tezos/baker-config/${my_baker_account}-${proto_command}-per-block-votes.json
if [ $(cat $per_block_vote_file) == "null" ]; then
if [ ! -f "$per_block_vote_file" ]; then
echo "Error: $per_block_vote_file not found" >&2
exit 1
fi
if [ "$(cat $per_block_vote_file)" == "null" ]; then
cat << EOF
You must pass per-block-votes (such as liquidity_baking_toggle_vote) in values.yaml, for example:
protocols:
Expand Down Expand Up @@ -1272,9 +1299,6 @@ spec:
securityContext:
fsGroup: 1000
volumes:
- hostPath:
path: /dev/net/tun
name: dev-net-tun
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down Expand Up @@ -1476,9 +1500,6 @@ spec:
securityContext:
fsGroup: 1000
volumes:
- hostPath:
path: /dev/net/tun
name: dev-net-tun
- emptyDir: {}
name: config-volume
- name: tezos-accounts
Expand Down

0 comments on commit b30cd92

Please sign in to comment.