helper

package
v0.0.0-...-0821b2d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePolicy

func CreatePolicy(
	client *clients.Settings,
	object runtime.Object,
	suffix string) (*ocm.PolicyBuilder, error)

CreatePolicy creates a single policy enforcing the compliance type of the provided object.

func CreatePolicyComponents

func CreatePolicyComponents(
	client *clients.Settings,
	suffix string,
	clusters []string,
	clusterSelector metav1.LabelSelector) error

CreatePolicyComponents defines and creates the policy components like the policy set, placement field, placement rule, and placement binding.

func DeleteClusterLabel

func DeleteClusterLabel(client *clients.Settings, clusterName string, labelToBeDeleted string) error

DeleteClusterLabel deletes a label from and updates the specified cluster.

func DoesClusterLabelExist

func DoesClusterLabelExist(client *clients.Settings, clusterName string, label string) (bool, error)

DoesClusterLabelExist looks for a label on a managed cluster and returns true if it exists.

func GetClusterVersionDefinition

func GetClusterVersionDefinition(client *clients.Settings, config string) (*configv1.ClusterVersion, error)

GetClusterVersionDefinition returns a ClusterVersion definition based on the client.

Use "Image" to include only DesiredUpdate.Image retrieved from the provided client. Use "Version" to include only DesiredUpdate.Version retrieved from the provided client. Use "Both" to include both DesiredUpdate.Image and DesiredUpdate.Version retrieved from the provided client.

func GetPolicyNameWithPrefix

func GetPolicyNameWithPrefix(client *clients.Settings, prefix, namespace string) (string, error)

GetPolicyNameWithPrefix returns the name of the first policy to start with prefix in the provided namespace, or an empty string if no such policy exists.

func SetupCguWithCatSrc

func SetupCguWithCatSrc(cguBuilder *cgu.CguBuilder) (*cgu.CguBuilder, error)

SetupCguWithCatSrc creates the policy with a catalog source and its components for a cguBuilder then creates the cguBuilder.

func SetupCguWithClusterVersion

func SetupCguWithClusterVersion(
	cguBuilder *cgu.CguBuilder, clusterVersion *configv1.ClusterVersion) (*cgu.CguBuilder, error)

SetupCguWithClusterVersion creates the policy with the provided clustrer version and its components for a cguBuilder then creates the cguBuilder.

func SetupCguWithNamespace

func SetupCguWithNamespace(cguBuilder *cgu.CguBuilder, suffix string) (*cgu.CguBuilder, error)

SetupCguWithNamespace creates the policy with a namespace and its components for a cguBuilder then creates the cguBuilder.

func WaitForCguBlocked

func WaitForCguBlocked(cguBuilder *cgu.CguBuilder, message string) error

WaitForCguBlocked waits up to the timeout until the provided cguBuilder matches the condition for being blocked.

func WaitToEnableCgu

func WaitToEnableCgu(cguBuilder *cgu.CguBuilder) (*cgu.CguBuilder, error)

WaitToEnableCgu waits for the TalmSystemStablizationTime before enabling the CGU.

Types

This section is empty.

Jump to

Keyboard shortcuts

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