func NewControlPlaneInitMutex(log logr.Logger, client client.Client) *ControlPlaneInitMutex {
	return &ControlPlaneInitMutex{
		log:    log,
		client: client,
	}
}
NewControlPlaneInitMutex returns a lock that can be held by a control plane node before init.
package locking
import (
	"context"
	"encoding/json"
	"fmt"
	"github.com/go-logr/logr"
	"github.com/pkg/errors"
	apicorev1 "k8s.io/api/core/v1"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
	"sigs.k8s.io/controller-runtime/pkg/client"
)
const semaphoreInformationKey = "lock-information"
type ControlPlaneInitMutex struct {
	log    logr.Logger
	client client.Client
}