diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 2789bcb5e5..5ad9ecf6a6 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -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 @@ -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 @@ -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; }