Skip to content

Commit

Permalink
Revert "Use external cloud provider for EKS Local deployments" (#1167)
Browse files Browse the repository at this point in the history
This reverts commit 2297119.
  • Loading branch information
vpineda1996 authored Feb 3, 2023
1 parent aafd2c6 commit 4b9b546
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,8 @@ if [[ "${ENABLE_LOCAL_OUTPOST}" == "true" ]]; then
mv /var/lib/kubelet/kubeconfig /var/lib/kubelet/bootstrap-kubeconfig
KUBELET_EXTRA_ARGS="--bootstrap-kubeconfig /var/lib/kubelet/bootstrap-kubeconfig $KUBELET_EXTRA_ARGS"
fi
### For Local Outpost deployments, we will use the the external cloud provider
KUBELET_CLOUD_PROVIDER="external"
else
sed -i s,CLUSTER_NAME,$CLUSTER_NAME,g /var/lib/kubelet/kubeconfig

### For any other type of deployment we will use the aws cloud provider for backwards compatibility
KUBELET_CLOUD_PROVIDER="aws"
fi

### kubelet.service configuration
Expand Down Expand Up @@ -467,11 +462,6 @@ cat << EOF > /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf
Environment='KUBELET_ARGS=--node-ip=$INTERNAL_IP --pod-infra-container-image=$PAUSE_CONTAINER --v=2'
EOF

cat << EOF > /etc/systemd/system/kubelet.service.d/20-kubelet-cloud-provider.conf
[Service]
Environment='KUBELET_CLOUD_PROVIDER=$KUBELET_CLOUD_PROVIDER'
EOF

if [[ -n "$KUBELET_EXTRA_ARGS" ]]; then
cat << EOF > /etc/systemd/system/kubelet.service.d/30-kubelet-extra-args.conf
[Service]
Expand Down
2 changes: 1 addition & 1 deletion files/kubelet-containerd.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requires=containerd.service sandbox-image.service
[Service]
Slice=runtime.slice
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -w 5
ExecStart=/usr/bin/kubelet --cloud-provider $KUBELET_CLOUD_PROVIDER \
ExecStart=/usr/bin/kubelet --cloud-provider aws \
--config /etc/kubernetes/kubelet/kubelet-config.json \
--kubeconfig /var/lib/kubelet/kubeconfig \
--container-runtime remote \
Expand Down
2 changes: 1 addition & 1 deletion files/kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires=docker.service

[Service]
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT -w 5
ExecStart=/usr/bin/kubelet --cloud-provider $KUBELET_CLOUD_PROVIDER \
ExecStart=/usr/bin/kubelet --cloud-provider aws \
--config /etc/kubernetes/kubelet/kubelet-config.json \
--kubeconfig /var/lib/kubelet/kubeconfig \
--container-runtime docker \
Expand Down

0 comments on commit 4b9b546

Please sign in to comment.