mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: update K8s packages to v0.32.1
Update K8s packages in go.mod to v0.32.1 Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
74
vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go
generated
vendored
74
vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go
generated
vendored
@ -35,74 +35,8 @@ const (
|
||||
endpointsResourceLock = "endpoints"
|
||||
configMapsResourceLock = "configmaps"
|
||||
LeasesResourceLock = "leases"
|
||||
// When using endpointsLeasesResourceLock, you need to ensure that
|
||||
// API Priority & Fairness is configured with non-default flow-schema
|
||||
// that will catch the necessary operations on leader-election related
|
||||
// endpoint objects.
|
||||
//
|
||||
// The example of such flow scheme could look like this:
|
||||
// apiVersion: flowcontrol.apiserver.k8s.io/v1beta2
|
||||
// kind: FlowSchema
|
||||
// metadata:
|
||||
// name: my-leader-election
|
||||
// spec:
|
||||
// distinguisherMethod:
|
||||
// type: ByUser
|
||||
// matchingPrecedence: 200
|
||||
// priorityLevelConfiguration:
|
||||
// name: leader-election # reference the <leader-election> PL
|
||||
// rules:
|
||||
// - resourceRules:
|
||||
// - apiGroups:
|
||||
// - ""
|
||||
// namespaces:
|
||||
// - '*'
|
||||
// resources:
|
||||
// - endpoints
|
||||
// verbs:
|
||||
// - get
|
||||
// - create
|
||||
// - update
|
||||
// subjects:
|
||||
// - kind: ServiceAccount
|
||||
// serviceAccount:
|
||||
// name: '*'
|
||||
// namespace: kube-system
|
||||
endpointsLeasesResourceLock = "endpointsleases"
|
||||
// When using configMapsLeasesResourceLock, you need to ensure that
|
||||
// API Priority & Fairness is configured with non-default flow-schema
|
||||
// that will catch the necessary operations on leader-election related
|
||||
// configmap objects.
|
||||
//
|
||||
// The example of such flow scheme could look like this:
|
||||
// apiVersion: flowcontrol.apiserver.k8s.io/v1beta2
|
||||
// kind: FlowSchema
|
||||
// metadata:
|
||||
// name: my-leader-election
|
||||
// spec:
|
||||
// distinguisherMethod:
|
||||
// type: ByUser
|
||||
// matchingPrecedence: 200
|
||||
// priorityLevelConfiguration:
|
||||
// name: leader-election # reference the <leader-election> PL
|
||||
// rules:
|
||||
// - resourceRules:
|
||||
// - apiGroups:
|
||||
// - ""
|
||||
// namespaces:
|
||||
// - '*'
|
||||
// resources:
|
||||
// - configmaps
|
||||
// verbs:
|
||||
// - get
|
||||
// - create
|
||||
// - update
|
||||
// subjects:
|
||||
// - kind: ServiceAccount
|
||||
// serviceAccount:
|
||||
// name: '*'
|
||||
// namespace: kube-system
|
||||
configMapsLeasesResourceLock = "configmapsleases"
|
||||
endpointsLeasesResourceLock = "endpointsleases"
|
||||
configMapsLeasesResourceLock = "configmapsleases"
|
||||
)
|
||||
|
||||
// LeaderElectionRecord is the record that is stored in the leader election annotation.
|
||||
@ -177,9 +111,9 @@ func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interf
|
||||
}
|
||||
switch lockType {
|
||||
case endpointsResourceLock:
|
||||
return nil, fmt.Errorf("endpoints lock is removed, migrate to %s (using version v0.27.x)", endpointsLeasesResourceLock)
|
||||
return nil, fmt.Errorf("endpoints lock is removed, migrate to %s", LeasesResourceLock)
|
||||
case configMapsResourceLock:
|
||||
return nil, fmt.Errorf("configmaps lock is removed, migrate to %s (using version v0.27.x)", configMapsLeasesResourceLock)
|
||||
return nil, fmt.Errorf("configmaps lock is removed, migrate to %s", LeasesResourceLock)
|
||||
case LeasesResourceLock:
|
||||
return leaseLock, nil
|
||||
case endpointsLeasesResourceLock:
|
||||
|
Reference in New Issue
Block a user