locking

package
v3.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package locking implements locking functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPlaneInitMutex

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

ControlPlaneInitMutex uses a ConfigMap to synchronize cluster initialization.

func NewControlPlaneInitMutex

func NewControlPlaneInitMutex(client client.Client) *ControlPlaneInitMutex

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

func (*ControlPlaneInitMutex) Lock

func (c *ControlPlaneInitMutex) 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 (*ControlPlaneInitMutex) Unlock

func (c *ControlPlaneInitMutex) 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