k8sutil

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: LGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIfNotExists added in v1.3.0

func CreateIfNotExists(ctx context.Context, client client.Client, obj runtime.Object, meta metav1.Object) error

CreateIfNotExists -

func CreateOrUpdateRbdComponent added in v1.3.0

func CreateOrUpdateRbdComponent(clientset rainbondversiond.Interface, cpt *rainbondv1alpha1.RbdComponent) error

CreateOrUpdateRbdComponent -

func EventsForPersistentVolumeClaim added in v1.3.0

func EventsForPersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim) (*corev1.EventList, error)

EventsForPersistentVolumeClaim -

func GetClientSet added in v1.3.0

func GetClientSet() kubernetes.Interface

func GetFoobarPVC added in v1.3.0

func GetFoobarPVC(ctx context.Context, client client.Client, ns string) (*corev1.PersistentVolumeClaim, error)

func HostPath

func HostPath(hostpath corev1.HostPathType) *corev1.HostPathType

HostPath returns a pointer to the HostPathType value passed in.

func InClusterConfig

func InClusterConfig() (*rest.Config, error)

func IsPodCompleted added in v1.3.0

func IsPodCompleted(pod *corev1.Pod) bool

IsPodCompleted checks if the given pod is ready or not.

func IsPodReady added in v1.3.0

func IsPodReady(pod *corev1.Pod) bool

IsPodReady checks if the given pod is ready or not.

func ListNodes added in v1.3.0

func ListNodes(ctx context.Context, c client.Client) ([]corev1.Node, error)

ListNodes returns all nodes.

func MaterRoleLabel

func MaterRoleLabel(key string) map[string]string

func MountPropagationMode

func MountPropagationMode(moundPropagationMode corev1.MountPropagationMode) *corev1.MountPropagationMode

MountPropagationMode returns a pointer to the MountPropagationMode value passed in.

func MustNewKubeConfig

func MustNewKubeConfig(kubeconfigPath string) *rest.Config

func NewKubeConfig

func NewKubeConfig() (*rest.Config, error)

func PersistentVolumeClaimForGrdata added in v1.3.0

func PersistentVolumeClaimForGrdata(ns, claimName string, accessModes []corev1.PersistentVolumeAccessMode, labels map[string]string, storageClassName string, storageRequest int64) *corev1.PersistentVolumeClaim

func PersistentVolumeReclaimPolicy

func PersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy corev1.PersistentVolumeReclaimPolicy) *corev1.PersistentVolumeReclaimPolicy

PersistentVolumeReclaimPolicy returns a pointer to the PersistentVolumeReclaimPolicy value passed in.

func UpdateCRStatus

func UpdateCRStatus(client client.Client, obj runtime.Object) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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