kubernetes/cmd/kubeadm/app/util/etcd
Rafael Fernández López 3e59a0651f
kubeadm: optimize the upgrade path from ClusterStatus to annotations
When doing the very first upgrade from a cluster that contains the
source of truth in the ClusterStatus struct, the new kubeadm logic
will try to retrieve this information from annotations.

This changeset adds to both etcd and apiserver endpoint retrieval the
special case in which they won't retry if we are in such cases. The
logic will retry if we find any unknown error, but will not retry in
the following cases:

- etcd annotations do not contain etcd endpoints, but the overall list
  of etcd pods is greater than 0. This means that we listed at least
  one etcd pod, but they are missing the annotation.

- API server annotation is not found on the api server pod for a given
  node name, but no errors aside from that one were found. This means
  that the API server pod is present, but is missing the annotation.

In both cases there is no point in retrying, and so, this speeds up the
upgrade path when coming from a previous existing cluster.
2020-02-20 12:19:05 +01:00
..
BUILD kubeadm: remove ClusterStatus dependency 2020-02-20 12:18:56 +01:00
etcd_test.go kubeadm: optimize the upgrade path from ClusterStatus to annotations 2020-02-20 12:19:05 +01:00
etcd.go kubeadm: optimize the upgrade path from ClusterStatus to annotations 2020-02-20 12:19:05 +01:00