From 432c0ad060ec18f826b78d8aa413633077b0c378 Mon Sep 17 00:00:00 2001 From: Andrew Johnstone Date: Tue, 22 Oct 2019 10:56:24 +0100 Subject: [PATCH 1/2] #361 - custom pause container image support --- files/bootstrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/bootstrap.sh b/files/bootstrap.sh index 10b9b403f..506b377eb 100755 --- a/files/bootstrap.sh +++ b/files/bootstrap.sh @@ -111,6 +111,8 @@ function get_pause_container_account_for_region () { echo "${PAUSE_CONTAINER_ACCOUNT:-602401143452}";; esac } +PAUSE_CONTAINER_ACCOUNT=$(get_pause_container_account_for_region "${AWS_DEFAULT_REGION}") +PAUSE_CONTAINER_IMAGE=${PAUSE_CONTAINER_IMAGE:-$PAUSE_CONTAINER_ACCOUNT.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/eks/pause-${ARCH}:$PAUSE_CONTAINER_VERSION} if [ -z "$CLUSTER_NAME" ]; then echo "CLUSTER_NAME is not defined" @@ -200,7 +202,7 @@ fi cat < /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf [Service] -Environment='KUBELET_ARGS=--node-ip=$INTERNAL_IP --pod-infra-container-image=$(get_pause_container_account_for_region "${AWS_DEFAULT_REGION}").dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/eks/pause-${ARCH}:$PAUSE_CONTAINER_VERSION' +Environment='KUBELET_ARGS=--node-ip=$INTERNAL_IP --pod-infra-container-image=$PAUSE_CONTAINER_IMAGE' EOF if [[ -n "$KUBELET_EXTRA_ARGS" ]]; then From 233feb762f34999b7a2a1cf5b6da31230ba4e717 Mon Sep 17 00:00:00 2001 From: Andrew Johnstone Date: Tue, 22 Oct 2019 11:38:18 +0100 Subject: [PATCH 2/2] #361 - custom pause container image support --- files/bootstrap.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/files/bootstrap.sh b/files/bootstrap.sh index 506b377eb..a02644dad 100755 --- a/files/bootstrap.sh +++ b/files/bootstrap.sh @@ -111,8 +111,6 @@ function get_pause_container_account_for_region () { echo "${PAUSE_CONTAINER_ACCOUNT:-602401143452}";; esac } -PAUSE_CONTAINER_ACCOUNT=$(get_pause_container_account_for_region "${AWS_DEFAULT_REGION}") -PAUSE_CONTAINER_IMAGE=${PAUSE_CONTAINER_IMAGE:-$PAUSE_CONTAINER_ACCOUNT.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/eks/pause-${ARCH}:$PAUSE_CONTAINER_VERSION} if [ -z "$CLUSTER_NAME" ]; then echo "CLUSTER_NAME is not defined" @@ -132,6 +130,10 @@ else exit 1 fi +PAUSE_CONTAINER_ACCOUNT=$(get_pause_container_account_for_region "${AWS_DEFAULT_REGION}") +PAUSE_CONTAINER_IMAGE=${PAUSE_CONTAINER_IMAGE:-$PAUSE_CONTAINER_ACCOUNT.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/eks/pause-${ARCH}} +PAUSE_CONTAINER="$PAUSE_CONTAINER_IMAGE:$PAUSE_CONTAINER_VERSION" + ### kubelet kubeconfig CA_CERTIFICATE_DIRECTORY=/etc/kubernetes/pki @@ -202,7 +204,7 @@ fi cat < /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf [Service] -Environment='KUBELET_ARGS=--node-ip=$INTERNAL_IP --pod-infra-container-image=$PAUSE_CONTAINER_IMAGE' +Environment='KUBELET_ARGS=--node-ip=$INTERNAL_IP --pod-infra-container-image=$PAUSE_CONTAINER' EOF if [[ -n "$KUBELET_EXTRA_ARGS" ]]; then