request

package
v0.0.0-...-dce7008 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sClient

type K8sClient struct {
	K8sClient *k8sclient.Clientset
}

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

Jump to

Keyboard shortcuts

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