Skip to content

Commit

Permalink
Fix kubeadm etcd client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Nov 19, 2024
1 parent 820e57f commit 26dde8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/kubeadm/app/util/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type etcdClient interface {
Endpoints() []string

// MemberList lists the current cluster membership.
MemberList(ctx context.Context) (*clientv3.MemberListResponse, error)
MemberList(ctx context.Context, opts ...clientv3.OpOption) (*clientv3.MemberListResponse, error)

// MemberAdd adds a new member into the cluster.
MemberAdd(ctx context.Context, peerAddrs []string) (*clientv3.MemberAddResponse, error)
Expand Down
3 changes: 2 additions & 1 deletion cmd/kubeadm/app/util/etcd/etcd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (

pb "go.etcd.io/etcd/api/v3/etcdserverpb"
clientv3 "go.etcd.io/etcd/client/v3"

apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
clientsetfake "k8s.io/client-go/kubernetes/fake"
Expand Down Expand Up @@ -57,7 +58,7 @@ func (f *fakeEtcdClient) Endpoints() []string {
}

// MemberList lists the current cluster membership.
func (f *fakeEtcdClient) MemberList(_ context.Context) (*clientv3.MemberListResponse, error) {
func (f *fakeEtcdClient) MemberList(_ context.Context, _ ...clientv3.OpOption) (*clientv3.MemberListResponse, error) {
return &clientv3.MemberListResponse{
Members: f.members,
}, nil
Expand Down

0 comments on commit 26dde8a

Please sign in to comment.