feat: support SPDY subprotocol version v5 (K8s API >= v1.29.0) (#1185)
This commit is contained in:
@@ -30,7 +30,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
coordclientset "k8s.io/client-go/kubernetes/typed/coordination/v1"
|
||||
"k8s.io/utils/clock"
|
||||
"k8s.io/utils/pointer"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
// Code heavily borrowed from: https://github.com/kubernetes/kubernetes/blob/v1.18.13/pkg/kubelet/nodelease/controller.go
|
||||
@@ -275,8 +275,8 @@ func (c *leaseController) newLease(ctx context.Context, node *corev1.Node, base
|
||||
Namespace: corev1.NamespaceNodeLease,
|
||||
},
|
||||
Spec: coordinationv1.LeaseSpec{
|
||||
HolderIdentity: pointer.String(node.Name),
|
||||
LeaseDurationSeconds: pointer.Int32(c.leaseDurationSeconds),
|
||||
HolderIdentity: ptr.To(node.Name),
|
||||
LeaseDurationSeconds: ptr.To(c.leaseDurationSeconds),
|
||||
},
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user