Documentation ¶
Index ¶
- func AddOwnerRefToObject(obj Metav1.Object, ownerRef Metav1.OwnerReference)
- func GetClusterUID(k8sClient client.Client) (string, error)
- func GetPodByNamespaceNameWithConfig(namespace, name string, config rest.Config) (Corev1.Pod, error)
- func GetPodName() string
- func GetRunningNamespace() string
- func NewK8SClient() (client.Client, error)
- func NewOwnerReference(objType Metav1.TypeMeta, objMeta Metav1.ObjectMeta, isController bool) Metav1.OwnerReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOwnerRefToObject ¶
func AddOwnerRefToObject(obj Metav1.Object, ownerRef Metav1.OwnerReference)
AddOwnerRefToObject appends the desired OwnerReference to the object
func GetPodByNamespaceNameWithConfig ¶
func GetPodByNamespaceNameWithConfig(namespace, name string, config rest.Config) (Corev1.Pod, error)
GetPodByNamespaceNameWithConfig fetchs pod resource by namespace and name with k8s rest configuration
func GetPodName ¶
func GetPodName() string
func GetRunningNamespace ¶
func GetRunningNamespace() string
func NewK8SClient ¶
func NewOwnerReference ¶
func NewOwnerReference(objType Metav1.TypeMeta, objMeta Metav1.ObjectMeta, isController bool) Metav1.OwnerReference
NewOwnerReference provides ownerReference reference to input object
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.