Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
terraform: remove kubeconfig ConditionPathExists on kubelet.service
Browse files Browse the repository at this point in the history
It has been added to the [Service] section which meant it had no effect.
Adding it to the right place (the [Unit] section) means
/etc/kubernetes/kubeconfig must exist the first time the Kubelet starts,
otherwise the unit is skipped and it never tries to start again.

This removes that directive: it's fine to have the kubelet try to start
again and again until the file exists.
  • Loading branch information
iaguis committed Jun 29, 2021
1 parent 48a7089 commit 3c7122e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ systemd:
[Unit]
Description=Kubelet
Wants=rpc-statd.service
ConditionPathExists=/etc/kubernetes/kubeconfig
[Service]
EnvironmentFile=/etc/kubernetes/kubelet.env
ExecStartPre=/bin/mkdir -p /var/lib/kubelet/volumeplugins
Expand Down
1 change: 0 additions & 1 deletion assets/terraform-modules/controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ systemd:
- name: 10-controller.conf
contents: |
[Unit]
ConditionPathExists=/etc/kubernetes/kubeconfig
[Service]
ExecStartPre=/bin/mkdir -p /etc/kubernetes/checkpoint-secrets
ExecStartPre=/bin/mkdir -p /etc/kubernetes/inactive-manifests
Expand Down
1 change: 0 additions & 1 deletion assets/terraform-modules/node/templates/node.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ systemd:
[Unit]
Description=Kubelet
Wants=rpc-statd.service
ConditionPathExists=/etc/kubernetes/kubeconfig
[Service]
EnvironmentFile=/etc/kubernetes/kubelet.env
ExecStartPre=/bin/mkdir -p /var/lib/kubelet/volumeplugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ systemd:
Requires=coreos-metadata.service
After=coreos-metadata.service
Wants=rpc-statd.service
ConditionPathExists=/etc/kubernetes/kubeconfig
[Service]
EnvironmentFile=/run/metadata/flatcar
EnvironmentFile=/etc/kubernetes/kubelet.env
Expand Down

0 comments on commit 3c7122e

Please sign in to comment.