Skip to content

Commit

Permalink
Merge pull request #597 from andrewsykim/single-quote-resource-pools
Browse files Browse the repository at this point in the history
single quote resource pool in manifest generation since it can begin with special characters like *
  • Loading branch information
k8s-ci-robot authored Sep 30, 2019
2 parents 6b2905b + 5fb012f commit 384ac46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ record_and_export VSPHERE_FOLDER ':-'
record_and_export VSPHERE_TEMPLATE ':-'
record_and_export SSH_AUTHORIZED_KEY ":-''"

# single quote string variables that can start with special characters like "*"
# otherwise invalid yaml will be generated
export VSPHERE_RESOURCE_POOL="'${VSPHERE_RESOURCE_POOL}'"

verify_cpu_mem_dsk() {
eval "[[ \${${1}-} =~ [[:digit:]]+ ]] || ${1}=\"${2}\"; \
[ \"\${${1}}\" -ge \"${2}\" ] || { echo \"${1} must be >= ${2}\" 1>&2; exit 1; }; \
Expand Down

0 comments on commit 384ac46

Please sign in to comment.