Skip to content

Commit

Permalink
removed echoes from entry point script
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthvn committed Jun 29, 2020
1 parent 30f98bd commit abf7fed
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ wait_for_ipam() {
# If there is no init container, copy the required files
if [[ "$AWS_VPC_K8S_CNI_CONFIGURE_RPFILTER" != "false" ]]; then
# Copy files
echo "Copying CNI plugin binaries ... "
PLUGIN_BINS="portmap aws-cni-support.sh"
for b in $PLUGIN_BINS; do
# If the file exist, delete it first
Expand All @@ -72,23 +71,14 @@ if [[ "$AWS_VPC_K8S_CNI_CONFIGURE_RPFILTER" != "false" ]]; then
done
fi

echo -n "Starting IPAM daemon in the background ... "
./aws-k8s-agent | tee -i "$AGENT_LOG_PATH" 2>&1 &
echo "ok."

echo -n "Checking for IPAM connectivity ... "

if ! wait_for_ipam; then
echo " failed."
echo "Timed out waiting for IPAM daemon to start:"
cat "$AGENT_LOG_PATH" >&2
exit 1
fi

echo "ok."

echo -n "Copying CNI plugin binary and config file ... "

cp aws-cni "$HOST_CNI_BIN_PATH"

sed -i s~__VETHPREFIX__~"${AWS_VPC_K8S_CNI_VETHPREFIX}"~g 10-aws.conflist
Expand All @@ -97,12 +87,9 @@ sed -i s~__PLUGINLOGFILE__~"${AWS_VPC_K8S_PLUGIN_LOG_FILE}"~g 10-aws.conflist
sed -i s~__PLUGINLOGLEVEL__~"${AWS_VPC_K8S_PLUGIN_LOG_LEVEL}"~g 10-aws.conflist
cp 10-aws.conflist "$HOST_CNI_CONFDIR_PATH"

echo "ok."

if [[ -f "$HOST_CNI_CONFDIR_PATH/aws.conf" ]]; then
rm "$HOST_CNI_CONFDIR_PATH/aws.conf"
fi

# Bring the aws-k8s-agent process back into the foreground
echo "Foregrounding IPAM daemon ... "
fg %1 >/dev/null 2>&1 || { echo "failed (process terminated)" && cat "$AGENT_LOG_PATH" && exit 1; }

0 comments on commit abf7fed

Please sign in to comment.