Skip to content

Commit

Permalink
image: Fix handling of DISABLECVM option
Browse files Browse the repository at this point in the history
For boolean configs, we should compare the value instead of just
checking for the key's existence

Signed-off-by: Pradipta Banerjee <[email protected]>
  • Loading branch information
bpradipt committed Sep 20, 2023
1 parent 86d53b9 commit c376181
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ aws() {
[[ "${TAGS}" ]] && optionals+="-tags ${TAGS} " # Custom tags applied to pod vm
[[ "${USE_PUBLIC_IP}" == "true" ]] && optionals+="-use-public-ip " # Use public IP for pod vm
[[ "${ROOT_VOLUME_SIZE}" ]] && optionals+="-root-volume-size ${ROOT_VOLUME_SIZE} " # Specify root volume size for pod vm
[[ "${DISABLECVM}" == "true" ]] && optionals+="-disable-cvm "
[[ "${DISABLE_CLOUD_CONFIG}" == "true" ]] && optionals+="-disable-cloud-config "

set -x
Expand All @@ -62,7 +63,7 @@ azure() {
test_vars AZURE_CLIENT_ID AZURE_TENANT_ID AZURE_SUBSCRIPTION_ID AZURE_RESOURCE_GROUP AZURE_SUBNET_ID AZURE_IMAGE_ID

[[ "${SSH_USERNAME}" ]] && optionals+="-ssh-username ${SSH_USERNAME} "
[[ "${DISABLECVM}" ]] && optionals+="-disable-cvm "
[[ "${DISABLECVM}" == "true" ]] && optionals+="-disable-cvm "
[[ "${AZURE_INSTANCE_SIZES}" ]] && optionals+="-instance-sizes ${AZURE_INSTANCE_SIZES} "
[[ "${TAGS}" ]] && optionals+="-tags ${TAGS} " # Custom tags applied to pod vm
[[ "${DISABLE_CLOUD_CONFIG}" == "true" ]] && optionals+="-disable-cloud-config "
Expand Down

0 comments on commit c376181

Please sign in to comment.