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

Commit

Permalink
pod-checkpointer: Update to pod-checkpointer image that fixes #432
Browse files Browse the repository at this point in the history
- Fixes #432.

- pod-checkpointer pod logs errors as it cannot talk to the kubelet api
  as mentioned in the issue.

  This is becuase the pod-checkpointer queries the localhost at 10250 and
  10255 ports to talk to the kubelet API.

  Since in Lokomotive, we run the kubelet as a pod, this causes
  `connection refused` errors as nothing is listening at localhost.

  To rectify the above problem, the solution requires chanves in two
  places:

  1. Provide a way to access the pod's `status.hostIP` as an environment
     variable named `HOST_IP` to use instead of localhost. This is done by
     modifying the daemonset configuration of kubelet.

  2. Change the pod-checkpointer code to use the `HOST_IP` from above.
     This is done in the PR: https://github.com/kinvolk/bootkube/pull/2

- Next we update the image tag to use the new pod-checkpointer image.
  The tag includes the commit id which made this change.

- Lastly we update the generated assets.

Signed-off-by: Imran Pochi <imran@kinvolk.io>
  • Loading branch information
ipochi committed May 29, 2020
1 parent c5728c2 commit 3dbfbfb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ spec:
- --lock-file=/var/run/lock/pod-checkpointer.lock
- --kubeconfig=/etc/checkpointer/kubeconfig
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: NODE_NAME
valueFrom:
fieldRef:
Expand Down
2 changes: 1 addition & 1 deletion assets/lokomotive-kubernetes/bootkube/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ variable "container_images" {
calico_controllers = "calico/kube-controllers:v3.14.1"
hyperkube = "k8s.gcr.io/hyperkube:v1.18.3"
coredns = "coredns/coredns:coredns-"
pod_checkpointer = "kinvolk/pod-checkpointer:83e25e5968391b9eb342042c435d1b3eeddb2be1"
pod_checkpointer = "kinvolk/pod-checkpointer:d1c58443fe7d7d33aa5bf7d80d65d299be6e5847"
kube_apiserver = "k8s.gcr.io/kube-apiserver:v1.18.3"
kube_controller_manager = "k8s.gcr.io/kube-controller-manager:v1.18.3"
kube_scheduler = "k8s.gcr.io/kube-scheduler:v1.18.3"
Expand Down
6 changes: 3 additions & 3 deletions pkg/assets/generated_assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3dbfbfb

Please sign in to comment.