Skip to content

Commit ea4570a

Browse files
authored
Merge pull request kubernetes#84167 from yutedz/health-path-prefix
etcd health check key should have proper prefix
2 parents 780e40d + f4941e2 commit ea4570a

File tree

1 file changed

+2
-2
lines changed
  • staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory

1 file changed

+2
-2
lines changed

staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) {
8686
client := clientValue.Load().(*clientv3.Client)
8787
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
8888
defer cancel()
89-
// See https://github.com/etcd-io/etcd/blob/master/etcdctl/ctlv3/command/ep_command.go#L118
90-
_, err := client.Get(ctx, path.Join(c.Prefix, "health"))
89+
// See https://github.com/etcd-io/etcd/blob/c57f8b3af865d1b531b979889c602ba14377420e/etcdctl/ctlv3/command/ep_command.go#L118
90+
_, err := client.Get(ctx, path.Join("/", c.Prefix, "health"))
9191
if err == nil {
9292
return nil
9393
}

0 commit comments

Comments
 (0)