Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,15 @@ update_agentserviceconfig() {
set_power_configs() {
# PowerVS VSI(Virtual Server Instance) configs
POWERVS_VSI_NAME="power-${HOSTED_CLUSTER_NAME}-worker"
POWERVS_VSI_MEMORY=$(jq -r '.powervsVSIMemory' "${AGENT_POWER_CREDENTIALS}/ibmcloud-resources.json")
POWERVS_VSI_PROCESSORS=$(jq -r '.powervsVSIProcessors' "${AGENT_POWER_CREDENTIALS}/ibmcloud-resources.json")
POWERVS_VSI_PROC_TYPE=$(jq -r '.powervsVSIProcType' "${AGENT_POWER_CREDENTIALS}/ibmcloud-resources.json")
if [[ -z "${POWERVS_VSI_MEMORY}" ]]; then
POWERVS_VSI_MEMORY=$(jq -r '.powervsVSIMemory' "${AGENT_POWER_CREDENTIALS}/ibmcloud-resources.json")
fi
if [[ -z "${POWERVS_VSI_PROCESSORS}" ]]; then
POWERVS_VSI_PROCESSORS=$(jq -r '.powervsVSIProcessors' "${AGENT_POWER_CREDENTIALS}/ibmcloud-resources.json")
fi
if [[ -z "${POWERVS_VSI_PROC_TYPE}" ]]; then
POWERVS_VSI_PROC_TYPE=$(jq -r '.powervsVSIProcType' "${AGENT_POWER_CREDENTIALS}/ibmcloud-resources.json")
fi
Comment on lines +106 to +114

@prb112 prb112 Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should just set the bash defaults ...

POWERVS_VSI_MEMORY=${POWERVS_VSI_MEMORY:-$(jq -r '.powervsVSIMemory' "$json_file")}
POWERVS_VSI_PROCESSORS=${POWERVS_VSI_PROCESSORS:-$(jq -r '.powervsVSIProcessors' "$json_file")}
POWERVS_VSI_PROC_TYPE=${POWERVS_VSI_PROC_TYPE:-$(jq -r '.powervsVSIProcType' "$json_file")}

if [ ${IS_HETEROGENEOUS} == "yes" ]; then
# NOTE: Using e980 as a workaround for VPC Load Balancer connectivity issues with
# s922 in heterogeneous node pools, until a permanent fix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ ref:
- name: IS_HETEROGENEOUS
documentation: "Flag to indicate whether the power workers being created are part of a heterogeneous cluster"
default: "no"
- name: POWERVS_VSI_MEMORY
documentation: "Memory in GB for PowerVS worker VSI. If empty, reads from ibmcloud-resources.json"
default: ""
- name: POWERVS_VSI_PROCESSORS
documentation: "Number of processors for PowerVS worker VSI. If empty, reads from ibmcloud-resources.json"
default: ""
- name: POWERVS_VSI_PROC_TYPE
documentation: "Processor type for PowerVS worker VSI (shared/dedicated/capped). If empty, reads from ibmcloud-resources.json"
default: ""
commands: hypershift-mce-power-create-ibmcloud-workers-infra-commands.sh
from: dev-scripts
grace_period: 15m0s
Expand Down