Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Pull in config enhancements from the upstream eks-ami
Browse files Browse the repository at this point in the history
  • Loading branch information
errm committed Apr 10, 2019
1 parent d0ae081 commit bfef619
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
15 changes: 11 additions & 4 deletions pkg/system/system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,18 @@ After=docker.service
Requires=docker.service
[Service]
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT
ExecStart=/usr/bin/kubelet \
--allow-privileged=true \
--cloud-provider=aws \
--config=/etc/kubernetes/kubelet/config.yaml \
--network-plugin=cni \
--kubeconfig=/var/lib/kubelet/kubeconfig $KUBELET_CONTAINER_RUNTIME_ARGS $KUBELET_ARGS $KUBELET_NODE_LABELS $KUBELET_NODE_TAINTS $KUBELET_EXTRA_ARGS
Restart=always
StartLimitInterval=0
Restart=on-failure
RestartForceExitStatus=SIGPIPE
RestartSec=5
KillMode=process
[Install]
WantedBy=multi-user.target
Expand Down Expand Up @@ -117,11 +119,14 @@ authorization:
cacheAuthorizedTTL: 5m0s
cacheUnauthorizedTTL: 30s
clusterDomain: cluster.local
hairpinMode: hairpin-veth
clusterDNS: [172.20.0.10]
cgroupDriver: cgroupfs
cgroupRoot: /
featureGates:
RotateKubeletServerCertificate: true
serverTLSBootstrap: true
serializeImagePulls: false
kubeReserved:
cpu: 70m
memory: 1024Mi
Expand Down Expand Up @@ -256,16 +261,18 @@ After=containerd.service
Requires=containerd.service
[Service]
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT
ExecStart=/usr/bin/kubelet \
--allow-privileged=true \
--cloud-provider=aws \
--config=/etc/kubernetes/kubelet/config.yaml \
--network-plugin=cni \
--kubeconfig=/var/lib/kubelet/kubeconfig $KUBELET_CONTAINER_RUNTIME_ARGS $KUBELET_ARGS $KUBELET_NODE_LABELS $KUBELET_NODE_TAINTS $KUBELET_EXTRA_ARGS
Restart=always
StartLimitInterval=0
Restart=on-failure
RestartForceExitStatus=SIGPIPE
RestartSec=5
KillMode=process
[Install]
WantedBy=multi-user.target
Expand Down
3 changes: 3 additions & 0 deletions pkg/system/templates/etc/kubernetes/kubelet/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ authorization:
cacheAuthorizedTTL: 5m0s
cacheUnauthorizedTTL: 30s
clusterDomain: cluster.local
hairpinMode: hairpin-veth
clusterDNS: [{{.Node.ClusterDNS}}]
cgroupDriver: cgroupfs
cgroupRoot: /
featureGates:
RotateKubeletServerCertificate: true
serverTLSBootstrap: true
serializeImagePulls: false
{{- if and .Node.ReservedCPU .Node.ReservedMemory }}
kubeReserved:
cpu: {{.Node.ReservedCPU}}
Expand Down
6 changes: 4 additions & 2 deletions pkg/system/templates/etc/systemd/system/kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ After={{.Node.ContainerRuntime}}.service
Requires={{.Node.ContainerRuntime}}.service

[Service]
ExecStartPre=/sbin/iptables -P FORWARD ACCEPT
ExecStart=/usr/bin/kubelet \
--allow-privileged=true \
--cloud-provider=aws \
--config=/etc/kubernetes/kubelet/config.yaml \
--network-plugin=cni \
--kubeconfig=/var/lib/kubelet/kubeconfig $KUBELET_CONTAINER_RUNTIME_ARGS $KUBELET_ARGS $KUBELET_NODE_LABELS $KUBELET_NODE_TAINTS $KUBELET_EXTRA_ARGS

Restart=always
StartLimitInterval=0
Restart=on-failure
RestartForceExitStatus=SIGPIPE
RestartSec=5
KillMode=process

[Install]
WantedBy=multi-user.target

0 comments on commit bfef619

Please sign in to comment.