util

package
v0.0.0-...-2b86969 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// InfrastructureName is the name of the Infrastructure,
	// as Infrastructure is a singleton within the cluster.
	InfrastructureName = "cluster"
)

Variables

This section is empty.

Functions

func FilterClusterOperator

func FilterClusterOperator(name string) predicate.Predicate

FilterClusterOperator filters cluster operator requests to just the one with the name provided.

func FilterControlPlaneMachineSet

func FilterControlPlaneMachineSet(controlPlaneMachineSetName, namespace string) predicate.Predicate

FilterControlPlaneMachineSet filters control plane machine set requests to just the singleton within the namespace provided.

func FilterControlPlaneMachines

func FilterControlPlaneMachines(namespace string) predicate.Predicate

FilterControlPlaneMachines filters machine requests to just the machines that present as control plane machines, i.e. they are labelled with the correct labels to identify them as control plane machines.

func FilterControlPlaneNodes

func FilterControlPlaneNodes() predicate.Predicate

FilterControlPlaneNodes filters nodes requests to just the nodes that present as control plane nodes and that have had a transition in the NodeReady condition.

func FilterInfrastructure

func FilterInfrastructure(infraName string) predicate.Predicate

FilterInfrastructure filters out responding to any Infrastructure object that is not the one specified.

func GetAllowedTLSCipherSuites

func GetAllowedTLSCipherSuites() []uint16

GetAllowedTLSCipherSuites returns a slice of security vetted TLS CipherSuites.

func GetInfrastructure

func GetInfrastructure(ctx context.Context, cl client.Client) (*configv1.Infrastructure, error)

GetInfrastructure returns the infrastructure matching the infrastructureName.

func GetLeaderElectionDefaults

func GetLeaderElectionDefaults(restConfig *rest.Config, leaderElection configv1.LeaderElection) configv1.LeaderElection

GetLeaderElectionDefaults returns leader election configs defaults based on the cluster topology.

func GetReleaseVersion

func GetReleaseVersion() string

GetReleaseVersion returns a string representing the release version.

func ObjToControlPlaneMachineSet

func ObjToControlPlaneMachineSet(controlPlaneMachineSetName, namespace string) func(context.Context, client.Object) []reconcile.Request

ObjToControlPlaneMachineSet maps any object to the control plane machine set singleton in the namespace provided.

func Ptr

func Ptr[T any](v T) *T

Ptr takes a pointer to the passed object.

func SetupFeatureGateAccessor

func SetupFeatureGateAccessor(mgr manager.Manager) (featuregates.FeatureGateAccess, error)

SetupFeatureGateAccessor Setup FeatureGateAccess instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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