forked from Azure/ARO-HCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alba Hita Catala <[email protected]>
- Loading branch information
Showing
5 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source env_vars | ||
source "$(dirname "$0")"/common.sh | ||
|
||
|
||
|
||
arm_x_ms_identity_url_header() { | ||
# Requests directly against the frontend | ||
# need to send a X-Ms-Identity-Url HTTP | ||
# header, which simulates what ARM performs. | ||
# By default we set a dummy value, which is | ||
# enough in the environments where a real | ||
# Managed Identities Data Plane does not | ||
# exist like in the development or integration | ||
# environments. The default can be overwritten | ||
# by providing the environment variable | ||
# ARM_X_MS_IDENTITY_URL when running the script. | ||
: ${ARM_X_MS_IDENTITY_URL:="https://dummyhost.identity.azure.net"} | ||
echo "X-Ms-Identity-Url: ${ARM_X_MS_IDENTITY_URL}" | ||
} | ||
|
||
main() { | ||
|
||
SUBSCRIPTION_ID=$(az account show --query id -o tsv) | ||
CLUSTER_FILE="cluster.json" | ||
|
||
|
||
(arm_system_data_header; correlation_headers; arm_x_ms_identity_url_header) | curl -si -X PUT "localhost:8443/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${CUSTOMER_RG_NAME}/providers/Microsoft.RedHatOpenshift/hcpOpenShiftClusters/${CLUSTER_NAME}?api-version=2024-06-10-preview" \ | ||
--header @- \ | ||
--json @${CLUSTER_FILE} | ||
} | ||
|
||
# Call to the `main` function in the script | ||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source env_vars | ||
source "$(dirname "$0")"/common.sh | ||
|
||
|
||
|
||
arm_x_ms_identity_url_header() { | ||
# Requests directly against the frontend | ||
# need to send a X-Ms-Identity-Url HTTP | ||
# header, which simulates what ARM performs. | ||
# By default we set a dummy value, which is | ||
# enough in the environments where a real | ||
# Managed Identities Data Plane does not | ||
# exist like in the development or integration | ||
# environments. The default can be overwritten | ||
# by providing the environment variable | ||
# ARM_X_MS_IDENTITY_URL when running the script. | ||
: ${ARM_X_MS_IDENTITY_URL:="https://dummyhost.identity.azure.net"} | ||
echo "X-Ms-Identity-Url: ${ARM_X_MS_IDENTITY_URL}" | ||
} | ||
|
||
main() { | ||
|
||
SUBSCRIPTION_ID=$(az account show --query id -o tsv) | ||
CLUSTER_FILE="cluster.json" | ||
|
||
|
||
(arm_system_data_header; correlation_headers; arm_x_ms_identity_url_header) | curl -si -X PATCH "localhost:8443/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${CUSTOMER_RG_NAME}/providers/Microsoft.RedHatOpenshift/hcpOpenShiftClusters/${CLUSTER_NAME}?api-version=2024-06-10-preview" \ | ||
--header @- \ | ||
--json @${CLUSTER_FILE} | ||
} | ||
|
||
# Call to the `main` function in the script | ||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters