kubernetes

package
v0.0.0-...-7b41efc Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(flags *pflag.FlagSet) *clientcmd.ConfigOverrides

func IsInCluster

func IsInCluster() bool

func ParseResourceName

func ParseResourceName(url string) (string, string, string)

Types

type KindVersion

type KindVersion struct {
	Group     string
	Version   string
	Preferred bool
	Name      string
}

type KindVersions

type KindVersions map[string][]KindVersion

type KubeClient

type KubeClient struct {
	Client *kubernetes.Clientset
	Config *rest.Config
}

func NewClient

func NewClient(cmd *cobra.Command, configOverrides *clientcmd.ConfigOverrides) *KubeClient

func (*KubeClient) DiscoverResourceNameAndPreferredGV

func (kubeClient *KubeClient) DiscoverResourceNameAndPreferredGV() KindVersions

func (*KubeClient) ForwardResource

func (kubeClient *KubeClient) ForwardResource(prometheus *prometheus.Prometheus, readyChannel, stopChannel chan struct{})

func (*KubeClient) GetDaemonSet

func (kubeClient *KubeClient) GetDaemonSet(namespace string, name string) (*appsv1.DaemonSet, error)

func (*KubeClient) GetDeployment

func (kubeClient *KubeClient) GetDeployment(namespace string, name string) (*appsv1.Deployment, error)

func (*KubeClient) GetPersistentVolumeClaim

func (kubeClient *KubeClient) GetPersistentVolumeClaim(namespace string, name string) (*corev1.PersistentVolumeClaim, error)

func (*KubeClient) GetReplicaSet

func (kubeClient *KubeClient) GetReplicaSet(pod corev1.Pod) (*appsv1.ReplicaSet, error)

func (*KubeClient) GetStatefulSet

func (kubeClient *KubeClient) GetStatefulSet(namespace string, name string) (*appsv1.StatefulSet, error)

func (*KubeClient) ListPods

func (kubeClient *KubeClient) ListPods(query PodQuery) []corev1.Pod

type PodQuery

type PodQuery struct {
	Namespace          string
	LabelSelector      string
	AnnotationSelector string
	Names              []string
}

Jump to

Keyboard shortcuts

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