utils

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopySecretToRemoteCluster

func CopySecretToRemoteCluster(
	ctx context.Context,
	cl ctrlclient.Client,
	srcSecretName string,
	dstSecretKey ctrlclient.ObjectKey,
	cluster *clusterv1.Cluster,
) error

CopySecretToRemoteCluster will get the Secret from srcSecretName and create it on the remote cluster, copying Data and StringData to dstSecretKey Secret.

func CreateConfigMapForCRS

func CreateConfigMapForCRS(configMapName, configMapNamespace string,
	objs ...runtime.Object,
) (*corev1.ConfigMap, error)

func CreateStorageClass

func CreateStorageClass(
	storageConfig v1alpha1.StorageClassConfig,
	provisionerName v1alpha1.StorageProvisioner,
	isDefault bool,
	defaultParameters map[string]string,
) *storagev1.StorageClass

func CreateStorageClassOnRemote added in v0.8.0

func CreateStorageClassOnRemote(
	ctx context.Context,
	cl ctrlclient.Client,
	configs []v1alpha1.StorageClassConfig,
	cluster *clusterv1.Cluster,
	defaultStorageConfig *v1alpha1.DefaultStorage,
	csiProvider string,
	provisioner v1alpha1.StorageProvisioner,
	defaultParameters map[string]string,
) error

func EnsureCRSForClusterFromObjects

func EnsureCRSForClusterFromObjects(
	ctx context.Context,
	crsName string,
	c ctrlclient.Client,
	cluster *clusterv1.Cluster,
	objects ...runtime.Object,
) error

func EnsureNamespace

func EnsureNamespace(ctx context.Context, c ctrlclient.Client, ns *corev1.Namespace) error

EnsureNamespace will create the namespace if it does not exist.

func EnsureNamespaceWithName added in v0.8.0

func EnsureNamespaceWithName(ctx context.Context, c ctrlclient.Client, name string) error

EnsureNamespaceWithName will create the namespace with the specified name if it does not exist.

func RetrieveValuesTemplate added in v0.8.0

func RetrieveValuesTemplate(
	ctx context.Context,
	c ctrlclient.Client,
	configMapName,
	namespace string,
) (string, error)

func RetrieveValuesTemplateConfigMap

func RetrieveValuesTemplateConfigMap(
	ctx context.Context,
	c ctrlclient.Client,
	configMapName,
	namespace string,
) (*corev1.ConfigMap, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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