k8s

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePatch

func CreatePatch(o, n, datastruct interface{}) ([]byte, error)

CreatePatch -

func DefListEventsByPod

func DefListEventsByPod(clientset kubernetes.Interface, pod *corev1.Pod) *corev1.EventList

DefListEventsByPod default implementatoin of ListEventsByPod

func ExtractLabels

func ExtractLabels(labels map[string]string) (string, string, string, string)

ExtractLabels extracts the service information from the labels

func GetClientSet

func GetClientSet() kubernetes.Interface

GetClientSet -

func GetKubeVersion

func GetKubeVersion() *utilversion.Version

GetKubeVersion returns the version of k8s

func InClusterConfig

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

InClusterConfig in cluster config

func IngressPathType

func IngressPathType(pathType networkingv1.PathType) *networkingv1.PathType

IngressPathType -

func IsHighVersion

func IsHighVersion() bool

IsHighVersion -

func MustNewKubeConfig

func MustNewKubeConfig(kubeconfigPath string) *rest.Config

MustNewKubeConfig -

func NewClientset

func NewClientset(kubecfg string) (kubernetes.Interface, error)

NewClientset -

func NewClientsetOrDie

func NewClientsetOrDie(kubecfg string) kubernetes.Interface

NewClientsetOrDie new clientset or die used for who just wants a kubernetes clientset

func NewRestClient

func NewRestClient(restConfig *rest.Config) (*rest.RESTClient, error)

NewRestClient new rest client

func NewRestConfig

func NewRestConfig(kubecfg string) (restConfig *rest.Config, err error)

NewRestConfig new rest config

func ObjKey

func ObjKey(obj metav1.Object) string

ObjKey returns the key of the given object.

Types

type ListEventsByPod

type ListEventsByPod func(kubernetes.Interface, *corev1.Pod) *corev1.EventList

ListEventsByPod -

Jump to

Keyboard shortcuts

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