Skip to content

Commit

Permalink
add livenessSeconds & VIP config
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gillson <[email protected]>
  • Loading branch information
TylerGillson committed Oct 26, 2023
1 parent 33544ae commit b9c9d92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/templates/two-node-create.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"spec": {
"cloudConfig": {
"controlPlaneEndpoint": {
"host": "10.10.142.174",
"host": "_____place_holder_____",
"type": "IP"
},
"sshKeys": [
Expand Down
9 changes: 8 additions & 1 deletion test/test-two-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export DOMAIN=dev.spectrocloud.com
export PUBLIC_PACK_REPO_UID=<YOUR_PUBLIC_PACK_REPO_UID> # this varies per Palette tenant
export CLUSTER_NAME=two-node
export CLUSTER_PROFILE_UID= # if left blank, a cluster profile will be created
export CLUSTER_VIP= # choose an unassigned VIP

# images
export OCI_REGISTRY=ttl.sh
Expand Down Expand Up @@ -93,6 +94,7 @@ stylus:
debug: true
twoNode:
enabled: true
livenessSeconds: 15
install:
poweroff: true
users:
Expand Down Expand Up @@ -257,8 +259,13 @@ function prepare_cluster() {
echo STYLUS_HASH is unset. Please execute build_all and retry.
exit 1
fi
if nslookup $CLUSTER_VIP >/dev/null; then
echo CLUSTER_VIP: $CLUSTER_VIP is allocated. Please retry with an unallocated VIP.
exit 1
fi
jq '
.metadata.name = env.CLUSTER_NAME |
.spec.cloudConfig.controlPlaneEndpoint.host = env.CLUSTER_VIP |
.spec.machinePoolConfig[0].cloudConfig.edgeHosts[0].hostUid = env.HOST_1 |
.spec.machinePoolConfig[1].cloudConfig.edgeHosts[0].hostUid = env.HOST_2 |
.spec.profiles[0].uid = env.CLUSTER_PROFILE_UID |
Expand Down Expand Up @@ -401,7 +408,7 @@ function main() {
if [[ $sourced == 1 ]]; then
set +e
echo "You can now use any of these functions:"
echo
echo ""
grep ^function ${BASH_SOURCE[0]} | grep -v main | awk '{gsub(/function /,""); gsub(/\(\) \{/,""); print;}'
echo
else
Expand Down

0 comments on commit b9c9d92

Please sign in to comment.