argoutil

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendStringMap

func AppendStringMap(src map[string]string, add map[string]string) map[string]string

AppendStringMap will append the map `add` to the given map `src` and return the result.

func CreateEvent

func CreateEvent(client client.Client, action string, message string, reason string, meta metav1.ObjectMeta) error

CreateEvent will create a new Kubernetes Event with the given action, message, reason and involved uid.

func DefaultLabels

func DefaultLabels(name string) map[string]string

DefaultLabels returns the default set of labels for controllers.

func DefaultPVCResources

func DefaultPVCResources() corev1.ResourceRequirements

DefaultPVCResources will return the default PVC resources.

func FetchObject

func FetchObject(client client.Client, namespace string, name string, obj runtime.Object) error

FetchObject will retrieve the object with the given namespace and name using the Kubernetes API. The result will be stored in the given object.

func FetchPersistentVolumes

func FetchPersistentVolumes(cli client.Client, labelz map[string]string, volumes *[]corev1.PersistentVolume) error

FetchPersistentVolumes will return the list of PersistentVolumes that match the given labels.

func IsObjectFound

func IsObjectFound(client client.Client, namespace string, name string, obj runtime.Object) bool

IsObjectFound will perform a basic check that the given object exists via the Kubernetes API. If an error occurs as part of the check, the function will return false.

func NewPersistentVolumeClaim

func NewPersistentVolumeClaim(meta metav1.ObjectMeta) *corev1.PersistentVolumeClaim

NewPersistentVolumeClaim returns a new PersistentVolumeClaim instance for the ObjectMeta resource.

func NewPersistentVolumeClaimWithName

func NewPersistentVolumeClaimWithName(name string, meta metav1.ObjectMeta) *corev1.PersistentVolumeClaim

NewPersistentVolumeClaimWithName returns a new PersistentVolumeClaim instance with the given name.

func VerifyAPI

func VerifyAPI(group string, version string) (bool, error)

VerifyAPI will verify that the given group/version is present in the cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

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