locking

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdadmInitMutex

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

EtcdadmInitMutex uses a ConfigMap to synchronize cluster initialization.

func NewEtcdadmInitMutex

func NewEtcdadmInitMutex(log logr.Logger, client client.Client) *EtcdadmInitMutex

NewControlPlaneInitMutex returns a lock that can be held by a control plane node before init.

func (*EtcdadmInitMutex) Lock

func (c *EtcdadmInitMutex) Lock(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) bool

Lock allows a control plane node to be the first and only node to run kubeadm init

func (*EtcdadmInitMutex) Unlock

func (c *EtcdadmInitMutex) Unlock(ctx context.Context, cluster *clusterv1.Cluster) bool

Unlock releases the lock

Jump to

Keyboard shortcuts

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