Skip to content

Commit

Permalink
Merge pull request kubernetes#17091 from justinsb/aws_strip_comments
Browse files Browse the repository at this point in the history
Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Dec 10, 2015
2 parents 229f40e + 428e415 commit d8cd5fa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cluster/aws/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,12 @@ function start-master() {
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/create-dynamic-salt-files.sh"
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/download-release.sh"
grep -v "^#" "${KUBE_ROOT}/cluster/aws/templates/salt-master.sh"
) > "${KUBE_TEMP}/master-start.sh"
) > "${KUBE_TEMP}/master-user-data"

# We're running right up against the 16KB limit
# Remove all comment lines and then put back the bin/bash shebang
sed -i -e 's/^[[:blank:]]*#.*$//' -e '/^[[:blank:]]*$/d' "${KUBE_TEMP}/master-user-data"
sed -i '1i #! /bin/bash' "${KUBE_TEMP}/master-user-data"

echo "Starting Master"
master_id=$($AWS_CMD run-instances \
Expand All @@ -904,7 +909,7 @@ function start-master() {
--security-group-ids ${MASTER_SG_ID} \
--associate-public-ip-address \
--block-device-mappings "${MASTER_BLOCK_DEVICE_MAPPINGS}" \
--user-data file://${KUBE_TEMP}/master-start.sh \
--user-data file://${KUBE_TEMP}/master-user-data \
--query Instances[].InstanceId)
add-tag $master_id Name $MASTER_NAME
add-tag $master_id Role $MASTER_TAG
Expand Down

0 comments on commit d8cd5fa

Please sign in to comment.