mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-12-06 15:16:28 +01:00
Add a worker_groups option to define kubelet --node-labels
This commit is contained in:
1 parent
186572d7f4
commit
9876ddbe71
3 files changed
+6
No files matched your search
@@ -9,6 +9,10 @@ CA_CERTIFICATE_FILE_PATH=$CA_CERTIFICATE_DIRECTORY/ca.crt
|
||||
mkdir -p $CA_CERTIFICATE_DIRECTORY
|
||||
echo "${cluster_auth_base64}" | base64 -d >$CA_CERTIFICATE_FILE_PATH
|
||||
|
||||
# Set kubelet --node-labels if kubelet_node_labels were set
|
||||
KUBELET_NODE_LABELS=${kubelet_node_labels}
|
||||
if [[ $KUBELET_NODE_LABELS != "" ]]; then sed -i '/INTERNAL_IP/a \ \ --node-labels='"$KUBELET_NODE_LABELS"'\ \\' /etc/systemd/system/kubelet.service; fi
|
||||
|
||||
# Authenticatoin
|
||||
INTERNAL_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
|
||||
sed -i s,MASTER_ENDPOINT,${endpoint},g /var/lib/kubelet/kubeconfig
|
||||
|
||||
Reference in new issue
Block a user