Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 5e8f1d8

Browse files
committed
option to override clusterctl
1 parent 90c9c44 commit 5e8f1d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/generate-cluster.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set -e
66
DEFAULT_CONFIG_URL=https://api.github.com/repos/packethost/cluster-api-provider-packet/releases/latest
77
TMPYAML=/tmp/clusterctl-packet.yaml
88

9+
# might want to use a specific path to clusterctl
10+
CLUSTERCTL=${CLUSTERCTL:-clusterctl}
11+
912
CONFIG_URL=${CONFIG_URL:-""}
1013

1114
# if the config url was not provided, download it
@@ -62,7 +65,7 @@ FACILITY=${PACKET_FACILITY}
6265

6366
# and now export them all so envsubst can use them
6467
export PROJECT_ID FACILITY NODE_OS WORKER_NODE_TYPE MASTER_NODE_TYPE POD_CIDR SERVICE_CIDR SSH_KEY KUBERNETES_VERSION
65-
clusterctl --config=${CONFIG_URL} config cluster ${CLUSTER_NAME} > $TEMPLATE_OUT
68+
${CLUSTERCTL} --config=${CONFIG_URL} config cluster ${CLUSTER_NAME} > $TEMPLATE_OUT
6669
# remove any lingering config file
6770
rm -f ${TMPYAML}
6871

0 commit comments

Comments
 (0)