daemonsetlock

package
v1.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonSetLock

type DaemonSetLock struct {
	// contains filtered or unexported fields
}

DaemonSetLock holds all necessary information to do actions on the kured ds which holds lock info through annotations.

func New

func New(client *kubernetes.Clientset, nodeID, namespace, name, annotation string) *DaemonSetLock

New creates a daemonsetLock object containing the necessary data for follow up k8s requests

func (*DaemonSetLock) Acquire

func (dsl *DaemonSetLock) Acquire(metadata interface{}, TTL time.Duration) (bool, string, error)

Acquire attempts to annotate the kured daemonset with lock info from instantiated DaemonSetLock using client-go

func (*DaemonSetLock) GetDaemonSet

func (dsl *DaemonSetLock) GetDaemonSet(sleep, timeout time.Duration) (*v1.DaemonSet, error)

GetDaemonSet returns the named DaemonSet resource from the DaemonSetLock's configured client

func (*DaemonSetLock) Release

func (dsl *DaemonSetLock) Release() error

Release attempts to remove the lock data from the kured ds annotations using client-go

func (*DaemonSetLock) Test

func (dsl *DaemonSetLock) Test(metadata interface{}) (bool, error)

Test attempts to check the kured daemonset lock status (existence, expiry) from instantiated DaemonSetLock using client-go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL