@@ -18,7 +18,8 @@ const (
1818 etcdEndpointName = "etcd-endpoints"
1919
2020 // EtcdEndpointName points to the old host-etcd-2 endpoint applicable for clusters prior to 4.5
21- EtcdEndpointName = "host-etcd-2"
21+ EtcdEndpointName = "host-etcd-2"
22+ BootstrapIPAnnotationKey = "alpha.installer.openshift.io/etcd-bootstrap"
2223)
2324
2425var (
@@ -94,12 +95,19 @@ func innerObserveStorageURLs(fallbackObserver fallBackObserverFn, alwaysAppendLo
9495 return previouslyObservedConfig , append (errs , err )
9596 }
9697
97- // note: etcd bootstrap should never be added to the in-cluster kube-apiserver
98- // this can result in some early pods crashlooping, but ensures that we never contact the bootstrap machine from
99- // the in-cluster kube-apiserver so we can safely teardown out of order.
100-
98+ allEtcdEnpoints := []string {}
10199 for k := range etcdEndpoints .Data {
102- address := etcdEndpoints .Data [k ]
100+ allEtcdEnpoints = append (allEtcdEnpoints , etcdEndpoints .Data [k ])
101+ }
102+
103+ // include etcd bootstrap IP in the list
104+ // this ensures that all masters use it and their local etcd can be torn down / updated
105+ // and this won't block revision rollout
106+ if bootstrapIP , found := etcdEndpoints .GetAnnotations ()[BootstrapIPAnnotationKey ]; found {
107+ allEtcdEnpoints = append (allEtcdEnpoints , bootstrapIP )
108+ }
109+
110+ for _ , address := range allEtcdEnpoints {
103111 ip := net .ParseIP (address )
104112 if ip == nil {
105113 ipErr := fmt .Errorf ("configmaps/%s in the %s namespace: %v is not a valid IP address" , etcdEndpointName , EtcdEndpointNamespace , address )
0 commit comments