From b98cec20b1768208bef8870c924811ac57badc2b Mon Sep 17 00:00:00 2001 From: Abeer Sethi <38733827+abeer91@users.noreply.github.com> Date: Tue, 10 Mar 2020 16:13:55 -0700 Subject: [PATCH] Added 1.15 support and removed --allow-privileged flag from all EKS supported versions (1.12+). (#428) --- Makefile | 8 ++++++-- files/1.14/kubelet.service | 21 --------------------- files/kubelet.service | 1 - scripts/install-worker.sh | 6 +----- 4 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 files/1.14/kubelet.service diff --git a/Makefile b/Makefile index 4f9bba762..1556a552c 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ T_YELLOW := \e[0;33m T_RESET := \e[0m .PHONY: all -all: 1.12 1.13 1.14 +all: 1.12 1.13 1.14 1.15 .PHONY: validate validate: @@ -47,4 +47,8 @@ k8s: validate .PHONY: 1.14 1.14: - $(MAKE) k8s kubernetes_version=1.14.9 kubernetes_build_date=2020-01-22 \ No newline at end of file + $(MAKE) k8s kubernetes_version=1.14.9 kubernetes_build_date=2020-01-22 + +.PHONY: 1.15 +1.15: + $(MAKE) k8s kubernetes_version=1.15.10 kubernetes_build_date=2020-02-14 \ No newline at end of file diff --git a/files/1.14/kubelet.service b/files/1.14/kubelet.service deleted file mode 100644 index 358b659ae..000000000 --- a/files/1.14/kubelet.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=Kubernetes Kubelet -Documentation=https://github.com/kubernetes/kubernetes -After=docker.service -Requires=docker.service - -[Service] -ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -w 5 -ExecStart=/usr/bin/kubelet --cloud-provider aws \ - --config /etc/kubernetes/kubelet/kubelet-config.json \ - --kubeconfig /var/lib/kubelet/kubeconfig \ - --container-runtime docker \ - --network-plugin cni $KUBELET_ARGS $KUBELET_EXTRA_ARGS - -Restart=on-failure -RestartForceExitStatus=SIGPIPE -RestartSec=5 -KillMode=process - -[Install] -WantedBy=multi-user.target diff --git a/files/kubelet.service b/files/kubelet.service index ae33350f1..358b659ae 100644 --- a/files/kubelet.service +++ b/files/kubelet.service @@ -8,7 +8,6 @@ Requires=docker.service ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -w 5 ExecStart=/usr/bin/kubelet --cloud-provider aws \ --config /etc/kubernetes/kubelet/kubelet-config.json \ - --allow-privileged=true \ --kubeconfig /var/lib/kubelet/kubeconfig \ --container-runtime docker \ --network-plugin cni $KUBELET_ARGS $KUBELET_EXTRA_ARGS diff --git a/scripts/install-worker.sh b/scripts/install-worker.sh index db66f39b5..edea0beab 100644 --- a/scripts/install-worker.sh +++ b/scripts/install-worker.sh @@ -190,11 +190,7 @@ sudo mkdir -p /etc/kubernetes/kubelet sudo mkdir -p /etc/systemd/system/kubelet.service.d sudo mv $TEMPLATE_DIR/kubelet-kubeconfig /var/lib/kubelet/kubeconfig sudo chown root:root /var/lib/kubelet/kubeconfig -if [ "$KUBERNETES_MINOR_VERSION" = "1.14" ]; then - sudo mv $TEMPLATE_DIR/1.14/kubelet.service /etc/systemd/system/kubelet.service -else - sudo mv $TEMPLATE_DIR/kubelet.service /etc/systemd/system/kubelet.service -fi +sudo mv $TEMPLATE_DIR/kubelet.service /etc/systemd/system/kubelet.service sudo chown root:root /etc/systemd/system/kubelet.service sudo mv $TEMPLATE_DIR/kubelet-config.json /etc/kubernetes/kubelet/kubelet-config.json sudo chown root:root /etc/kubernetes/kubelet/kubelet-config.json