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

Fix etcd operator to work with k8s 1.21 #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions doc/alpha-features.md

This file was deleted.

13 changes: 4 additions & 9 deletions pkg/util/k8sutil/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"net"
"net/url"
"os"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -75,7 +74,6 @@ const (
defaultDNSTimeout = int64(0)
)

const TolerateUnreadyEndpointsAnnotation = "service.alpha.kubernetes.io/tolerate-unready-endpoints"

func GetEtcdVersion(pod *v1.Pod) string {
return pod.Annotations[etcdVersionAnnotationKey]
Expand Down Expand Up @@ -254,15 +252,12 @@ func newEtcdServiceManifest(svcName, clusterName, clusterIP string, ports []v1.S
ObjectMeta: metav1.ObjectMeta{
Name: svcName,
Labels: labels,
Annotations: map[string]string{
TolerateUnreadyEndpointsAnnotation: strconv.FormatBool(publishNotReadyAddresses),
},
},
Spec: v1.ServiceSpec{
Ports: ports,
Selector: labels,
ClusterIP: clusterIP,
// PublishNotReadyAddresses: publishNotReadyAddresses, // TODO(ckoehn): Activate once TolerateUnreadyEndpointsAnnotation is deprecated.
Ports: ports,
Selector: labels,
ClusterIP: clusterIP,
PublishNotReadyAddresses: publishNotReadyAddresses,
},
}
return svc
Expand Down