k8sutils

package
v2.8.2-0...-dd449ac Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// StorkDeploymentName - stork deployment name
	StorkDeploymentName = "stork"

	// DefaultAdminNamespace - default admin namespace, where stork will be installed
	DefaultAdminNamespace = "kube-system"
)

Variables

This section is empty.

Functions

func CreateCRD

func CreateCRD(resource apiextensions.CustomResource) error

CreateCRD creates the given custom resource

func GetImageRegistryFromDeployment

func GetImageRegistryFromDeployment(name, namespace string) (string, string, error)

GetImageRegistryFromDeployment - extract image registry and image registry secret from deployment spec

func GetPVCsForGroupSnapshot

func GetPVCsForGroupSnapshot(namespace string, matchLabels map[string]string) ([]v1.PersistentVolumeClaim, error)

GetPVCsForGroupSnapshot returns all PVCs in given namespace that match the given matchLabels. All PVCs need to be bound.

func GetStorkPodNamespace

func GetStorkPodNamespace() (string, error)

GetStorkPodNamespace - will return the stork pod namespace.

func GetVolumeNamesFromLabelSelector

func GetVolumeNamesFromLabelSelector(namespace string, labels map[string]string) ([]string, error)

GetVolumeNamesFromLabelSelector returns PV names for all PVCs in given namespace that match the given labels

func ValidateCRD

func ValidateCRD(client *clientset.Clientset, crdName string) error

ValidateCRD validate crd with apiversion v1beta1

func ValidateCRDV1

func ValidateCRDV1(client *clientset.Clientset, crdName string) error

ValidateCRDV1 validate crd with apiversion v1

Types

This section is empty.

Jump to

Keyboard shortcuts

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