utils

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProvider added in v0.8.0

func GetProvider(cluster *clusterv1.Cluster) string

func ManagementCluster

func ManagementCluster(ctx context.Context, c client.Reader) (*clusterv1.Cluster, error)

ManagementCluster returns a Cluster object if c is pointing to a management cluster, otherwise returns nil.

func ManagementOrFutureManagementCluster added in v0.30.0

func ManagementOrFutureManagementCluster(ctx context.Context, c client.Reader) (*clusterv1.Cluster, error)

ManagementOrFutureManagementCluster returns a Cluster object to either the management cluster, when c is a client to the management cluster. Or a cluster that is assumed to become the management cluster in the future, when is c is a client to a bootstrap cluster and there is only a single Cluster object.

func NewLabels added in v0.9.0

func NewLabels(fs ...LabelFn) map[string]string

Types

type LabelFn added in v0.9.0

type LabelFn func(labels map[string]string)

func WithClusterName added in v0.9.0

func WithClusterName(clusterName string) LabelFn

func WithMove added in v0.9.0

func WithMove() LabelFn

Jump to

Keyboard shortcuts

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