Documentation
¶
Index ¶
- func AppendStringMap(src map[string]string, add map[string]string) map[string]string
- func CreateEvent(client client.Client, action string, message string, reason string, ...) error
- func DefaultLabels(name string) map[string]string
- func DefaultPVCResources() corev1.ResourceRequirements
- func FetchObject(client client.Client, namespace string, name string, obj runtime.Object) error
- func FetchPersistentVolumes(cli client.Client, labelz map[string]string, ...) error
- func IsObjectFound(client client.Client, namespace string, name string, obj runtime.Object) bool
- func NewPersistentVolumeClaim(meta metav1.ObjectMeta) *corev1.PersistentVolumeClaim
- func NewPersistentVolumeClaimWithName(name string, meta metav1.ObjectMeta) *corev1.PersistentVolumeClaim
- func VerifyAPI(group string, version string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendStringMap ¶
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 ¶
DefaultLabels returns the default set of labels for controllers.
func DefaultPVCResources ¶
func DefaultPVCResources() corev1.ResourceRequirements
DefaultPVCResources will return the default PVC resources.
func FetchObject ¶
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 ¶
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.
Types ¶
This section is empty.