Skip to content

Commit e64c461

Browse files
committed
setup-deploy-environment: add --channel and drop obsolete gateway step
The closing 'Next steps' hint was stable/release-specific and partly wrong: it told operators to label a gateway node (forge already labels the gwmain pool on both stable and nightly clusters) and to trigger release-upgrade.yaml with a tag (nightly deploys a snapshot of main via nightly.yaml on a schedule, not tags). Add --channel stable|nightly (default stable, so stable output is unchanged apart from removing the obsolete gateway-labeling step) and print channel-appropriate trigger guidance. setup-nightly-cluster.sh passes --channel nightly.
1 parent e743b0b commit e64c461

2 files changed

Lines changed: 32 additions & 5 deletions

File tree

hack/scripts/setup-deploy-environment.sh

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export GH_PAGER=cat
3131
REPO="Azure/unbounded"
3232
MANAGE_CNI_PLUGIN="true"
3333
ASSUME_YES="false"
34+
DEPLOY_CHANNEL="stable"
3435

3536
ENV_NAME=""
3637
KUBECONFIG_PATH=""
@@ -64,6 +65,7 @@ Required:
6465
6566
Optional:
6667
--manage-cni-plugin BOOL Whether unbounded manages the CNI (true|false). Default: true
68+
--channel CHANNEL Deploy channel for the "next steps" hint: stable|nightly. Default: stable
6769
--orca-azure-account NAME Azure storage account for the Orca origin (enables Orca deploy)
6870
--orca-azure-container NAME Azure blob container for the Orca origin
6971
--orca-azure-endpoint URL Azure blob endpoint (optional; blank => *.blob.core.windows.net)
@@ -101,6 +103,7 @@ while [[ $# -gt 0 ]]; do
101103
--site-node-cidr) require_value "$1" "${2:-}"; SITE_NODE_CIDR="$2"; shift 2 ;;
102104
--site-pod-cidr) require_value "$1" "${2:-}"; SITE_POD_CIDR="$2"; shift 2 ;;
103105
--manage-cni-plugin) require_value "$1" "${2:-}"; MANAGE_CNI_PLUGIN="$2"; shift 2 ;;
106+
--channel) require_value "$1" "${2:-}"; DEPLOY_CHANNEL="$2"; shift 2 ;;
104107
--orca-azure-account) require_value "$1" "${2:-}"; ORCA_AZURE_ACCOUNT="$2"; shift 2 ;;
105108
--orca-azure-container) require_value "$1" "${2:-}"; ORCA_AZURE_CONTAINER="$2"; shift 2 ;;
106109
--orca-azure-endpoint) require_value "$1" "${2:-}"; ORCA_AZURE_ENDPOINT="$2"; shift 2 ;;
@@ -140,6 +143,12 @@ case "$MANAGE_CNI_PLUGIN" in
140143
*) die "--manage-cni-plugin must be 'true' or 'false', got '$MANAGE_CNI_PLUGIN'" ;;
141144
esac
142145

146+
# Validate deploy channel (only affects the "next steps" hint printed below).
147+
case "$DEPLOY_CHANNEL" in
148+
stable|nightly) ;;
149+
*) die "--channel must be 'stable' or 'nightly', got '$DEPLOY_CHANNEL'" ;;
150+
esac
151+
143152
# Validate Orca config: account and container go together (endpoint is
144153
# optional). If neither is set, the Orca deploy job is left unconfigured.
145154
if [[ -n "$ORCA_AZURE_ACCOUNT" && -z "$ORCA_AZURE_CONTAINER" ]]; then
@@ -277,17 +286,34 @@ cat <<EOF
277286
278287
Environment $ENV_NAME configured.
279288
289+
EOF
290+
291+
# Gateway nodes are labeled by forge's gateway pool, so no manual labeling
292+
# step is needed (both stable and nightly run on forge-built clusters). The
293+
# trigger differs per channel: stable deploys release tags via
294+
# release-upgrade.yaml; nightly deploys a snapshot of main via nightly.yaml.
295+
if [[ "$DEPLOY_CHANNEL" == "nightly" ]]; then
296+
cat <<EOF
280297
Next steps:
281298
282-
1. Label at least one node as a gateway:
283-
kubectl label node <node-name> \\
284-
unbounded-cloud.io/unbounded-net-gateway=true --overwrite
299+
1. Trigger the first install (run once per cluster):
300+
gh workflow run nightly.yaml \\
301+
--repo $REPO \\
302+
-f force_init=true
303+
304+
2. Subsequent nightly snapshots of main deploy automatically to $ENV_NAME
305+
at 06:00 UTC.
306+
EOF
307+
else
308+
cat <<EOF
309+
Next steps:
285310
286-
2. Trigger the first install (run once per cluster):
311+
1. Trigger the first install (run once per cluster):
287312
gh workflow run release-upgrade.yaml \\
288313
--repo $REPO \\
289314
-f tag=vX.Y.Z \\
290315
-f force_init=true
291316
292-
3. Subsequent published releases will deploy automatically to $ENV_NAME.
317+
2. Subsequent published releases will deploy automatically to $ENV_NAME.
293318
EOF
319+
fi

hack/scripts/setup-nightly-cluster.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ configure_environment() {
419419
--site-node-cidr "${SITE_NODE_CIDR}"
420420
--site-pod-cidr "${SITE_POD_CIDR}"
421421
--manage-cni-plugin "${MANAGE_CNI_PLUGIN}"
422+
--channel nightly
422423
--orca-azure-account "${ORIGIN_ACCOUNT}"
423424
--orca-azure-container "${ORIGIN_CONTAINER}"
424425
--repo "${REPO}"

0 commit comments

Comments
 (0)