cluster-api: Index | Files

package locking

import ""


Package Files


type ControlPlaneInitMutex Uses

type ControlPlaneInitMutex struct {
    // contains filtered or unexported fields

ControlPlaneInitMutex uses a ConfigMap to synchronize cluster initialization.

func NewControlPlaneInitMutex Uses

func NewControlPlaneInitMutex(log logr.Logger, client client.Client) *ControlPlaneInitMutex

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

func (*ControlPlaneInitMutex) Lock Uses

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 Uses

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

Unlock releases the lock

Package locking imports 10 packages (graph) and is imported by 2 packages. Updated 2020-12-29. Refresh now. Tools for package owners.