cluster

package
v0.0.0-...-7a7d364 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ControlPlaneIDLabel = "node-role.kubernetes.io/control-plane"

ControlPlaneIDLabel identifies a control plane node by the given label, see https://kubernetes.io/docs/reference/labels-annotations-taints/#node-role-kubernetes-io-control-plane

View Source
const LeaseName = "1136b8a6.topolvm.io"
View Source
const OperatorNamespaceEnvVar = "NAMESPACE"

Variables

This section is empty.

Functions

func GetOperatorNamespace

func GetOperatorNamespace() (string, error)

GetOperatorNamespace returns the Namespace the operator should be watching for changes

Types

type CachedTypeResolver

type CachedTypeResolver struct {
	TypeResolver
	// contains filtered or unexported fields
}

func (*CachedTypeResolver) GetType

func (r *CachedTypeResolver) GetType(ctx context.Context) (Type, error)

type DefaultTypeResolver

type DefaultTypeResolver struct{ client.Client }

func (DefaultTypeResolver) GetType

func (r DefaultTypeResolver) GetType(ctx context.Context) (Type, error)

GetType checks to see if the operator is running on an OCP cluster.

type LeaderElectionResolver

type LeaderElectionResolver interface {
	Resolve(ctx context.Context) (configv1.LeaderElection, error)
}

func NewLeaderElectionResolver

func NewLeaderElectionResolver(
	snoCheck SNOCheck,
	enableLeaderElection bool,
	operatorNamespace string,
) (LeaderElectionResolver, error)

NewLeaderElectionResolver returns the correct LeaderElectionResolver Settings for Multi- or SNO-Clusters based on the amount of master nodes discovered in the cluster. If there is exactly one control-plane/master node, the returned LeaderElectionResolver settings are optimized for SNO deployments.

type SNOCheck

type SNOCheck interface {
	IsSNO(ctx context.Context) (bool, error)
}

func NewMasterSNOCheck

func NewMasterSNOCheck(clnt client.Client) SNOCheck

type Type

type Type string
const (
	TypeOCP   Type = "openshift"
	TypeOther Type = "other"
)

type TypeResolver

type TypeResolver interface {
	GetType(ctx context.Context) (Type, error)
}

func NewTypeResolver

func NewTypeResolver(clnt client.Client) TypeResolver

Jump to

Keyboard shortcuts

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