Documentation ¶
Index ¶
- type K8sClient
- func (kClient *K8sClient) ChoosePod(flags *genericclioptions.ConfigFlags, podName string, deployment string, ...) (apiv1.Pod, string, string, error)
- func (kClient *K8sClient) GetDeploymentPod(flags *genericclioptions.ConfigFlags, deployment string) (apiv1.Pod, error)
- func (kClient *K8sClient) GetDeployments(flags *genericclioptions.ConfigFlags, namespace string) ([]appsv1.Deployment, error)
- func (kClient *K8sClient) GetEndpointSlicesByName(flags *genericclioptions.ConfigFlags, namespace string, name string) ([]discoveryv1.EndpointSlice, error)
- func (kClient *K8sClient) GetIngressDefinitions(flags *genericclioptions.ConfigFlags, namespace string) ([]networking.Ingress, error)
- func (kClient *K8sClient) GetLabeledPod(flags *genericclioptions.ConfigFlags, label string) (apiv1.Pod, error)
- func (kClient *K8sClient) GetNamedPod(flags *genericclioptions.ConfigFlags, name string) (apiv1.Pod, error)
- func (kClient *K8sClient) GetNumEndpoints(flags *genericclioptions.ConfigFlags, namespace string, serviceName string) (*int, error)
- func (kClient *K8sClient) GetServiceByName(flags *genericclioptions.ConfigFlags, name string, services *[]apiv1.Service) (apiv1.Service, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8sClient ¶
Struct K8sClient for common clientset and functions
func NewK8sClient ¶
func NewK8sClient(flags *genericclioptions.ConfigFlags) (K8sClient, error)
NewK8sClient Creates a common k8s clientset for different client types
func (*K8sClient) ChoosePod ¶
func (kClient *K8sClient) ChoosePod(flags *genericclioptions.ConfigFlags, podName string, deployment string, selector string) (apiv1.Pod, string, string, error)
ChoosePod finds a pod either by deployment or by name
func (*K8sClient) GetDeploymentPod ¶
func (kClient *K8sClient) GetDeploymentPod(flags *genericclioptions.ConfigFlags, deployment string) (apiv1.Pod, error)
GetDeploymentPod finds a pod from a given deployment
func (*K8sClient) GetDeployments ¶
func (kClient *K8sClient) GetDeployments(flags *genericclioptions.ConfigFlags, namespace string) ([]appsv1.Deployment, error)
GetDeployments returns an array of Deployments
func (*K8sClient) GetEndpointSlicesByName ¶
func (kClient *K8sClient) GetEndpointSlicesByName(flags *genericclioptions.ConfigFlags, namespace string, name string) ([]discoveryv1.EndpointSlice, error)
GetEndpointSlicesByName returns the endpointSlices for the service with the given name
func (*K8sClient) GetIngressDefinitions ¶
func (kClient *K8sClient) GetIngressDefinitions(flags *genericclioptions.ConfigFlags, namespace string) ([]networking.Ingress, error)
GetIngressDefinitions returns an array of Ingress resource definitions
func (*K8sClient) GetLabeledPod ¶
func (kClient *K8sClient) GetLabeledPod(flags *genericclioptions.ConfigFlags, label string) (apiv1.Pod, error)
GetLabeledPod finds a pod from a given label
func (*K8sClient) GetNamedPod ¶
func (kClient *K8sClient) GetNamedPod(flags *genericclioptions.ConfigFlags, name string) (apiv1.Pod, error)
GetNamedPod finds a pod with the given name
func (*K8sClient) GetNumEndpoints ¶
func (kClient *K8sClient) GetNumEndpoints(flags *genericclioptions.ConfigFlags, namespace string, serviceName string) (*int, error)
GetNumEndpoints counts the number of endpointslices adresses for the service with the given name
func (*K8sClient) GetServiceByName ¶
func (kClient *K8sClient) GetServiceByName(flags *genericclioptions.ConfigFlags, name string, services *[]apiv1.Service) (apiv1.Service, error)
GetServiceByName finds and returns the service definition with the given name