Skip to content

Commit

Permalink
ARO-15000 | Add no-CNI cappability to frontend
Browse files Browse the repository at this point in the history
Made changes in the demo script files to form cluster creation payload accordingly if $NETWORK_TYPE is redefined.
Made changes in the frontend code to accept network-type from boolean url paramemeter "nocni".

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
  • Loading branch information
cgiradkar committed Feb 6, 2025
1 parent 8816f9f commit d2472c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demo/03-create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ main() {

jq \
--arg managed_rg "$MANAGED_RESOURCE_GROUP" \
--arg network_type "$NETWORK_TYPE" \
--arg subnet_id "$SUBNET_ID" \
--arg nsg_id "$NSG_ID" \
--argjson uamis_json_map "$UAMIS_JSON_MAP" \
Expand All @@ -216,7 +217,8 @@ main() {
.properties.spec.platform.subnetId = $subnet_id |
.properties.spec.platform.networkSecurityGroupId = $nsg_id |
.properties.spec.platform.operatorsAuthentication.userAssignedIdentities = $uamis_json_map |
.identity.userAssignedIdentities = $identity_uamis_json_map
.identity.userAssignedIdentities = $identity_uamis_json_map |
.properties.spec.network.networkType = $network_type
' "${CLUSTER_TMPL_FILE}" > ${CLUSTER_FILE}

(arm_system_data_header; correlation_headers; arm_x_ms_identity_url_header) | curl -sSi -X PUT "localhost:8443/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${CUSTOMER_RG_NAME}/providers/Microsoft.RedHatOpenshift/hcpOpenShiftClusters/${CLUSTER_NAME}?api-version=2024-06-10-preview" \
Expand Down
5 changes: 5 additions & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ This creates an HCP named `$USER`. If you want to use a different name, run
CLUSTER_NAME=abc ./03-create-cluster.sh
```

If you want to create a cluster without default CNI installed, run
```bash
NETWORK_TYPE=Other ./03-create-cluster.sh
```

Observe the cluster creation with `./query-cluster-rp.sh` until `properties.provisioningState` is (hopefully) `Succeeded`.
`properties.spec.api.url` holds the URL to the API server of the HCP.

Expand Down
3 changes: 3 additions & 0 deletions demo/env_vars
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
if [ -z "${CUSTOMER_RG_NAME:-}" ]; then
export CUSTOMER_RG_NAME="$USER-net-rg"
fi
if [ -z "${NETWORK_TYPE:-}" ]; then
export NETWORK_TYPE="OVNKubernetes"
fi
export CUSTOMER_VNET_NAME="customer-vnet"
export CUSTOMER_VNET_SUBNET1="customer-subnet-1"
export CUSTOMER_NSG="customer-nsg"
Expand Down

0 comments on commit d2472c9

Please sign in to comment.