Documentation ¶
Index ¶
- func GetConfig(runOutsideCluster bool) (*rest.Config, error)
- func GetKClient(restconfig *rest.Config) (*kubernetes.Clientset, error)
- func GetPodDeployment(kClient *kubernetes.Clientset, namespace, podName string) (deployments []string, err error)
- func GetPodRequests(kClient *kubernetes.Clientset, namespace, podName string) (cpu int64, mem int64, err error)
- func GetPodsBySelector(kClient *kubernetes.Clientset, namespace string, selector map[string]string) (*v1.PodList, error)
- func GetSvcSelectorByIngressBackend(kClient *kubernetes.Clientset, namespace string, ServiceName string) (map[string]string, error)
- type Ingress
- type IngressBackend
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKClient ¶
func GetKClient(restconfig *rest.Config) (*kubernetes.Clientset, error)
GetKClient returns *kubernetes.Clientset with tested connection
func GetPodDeployment ¶
func GetPodDeployment(kClient *kubernetes.Clientset, namespace, podName string) (deployments []string, err error)
GetPodDeployment return's pod's Deployment object
func GetPodRequests ¶
func GetPodRequests(kClient *kubernetes.Clientset, namespace, podName string) (cpu int64, mem int64, err error)
GetPodsCpuReq returns CPU and memory requests 0.100 CPU mean "1/10 of 1 core CPU time". memory units is bytes
func GetPodsBySelector ¶
func GetPodsBySelector(kClient *kubernetes.Clientset, namespace string, selector map[string]string) (*v1.PodList, error)
GetPodsBySelector
func GetSvcSelectorByIngressBackend ¶
func GetSvcSelectorByIngressBackend(kClient *kubernetes.Clientset, namespace string, ServiceName string) (map[string]string, error)
GetSvcSelectorByIngressBackend returns service's selector
Types ¶
type IngressBackend ¶
type IngressBackend struct { // Specifies the name of the referenced service. ServiceName string `json:"serviceName" protobuf:"bytes,1,opt,name=serviceName"` // Specifies the port of the referenced service. ServicePort intstr.IntOrString `json:"servicePort" protobuf:"bytes,2,opt,name=servicePort"` }
IngressBackend describes all endpoints for a given service and port.
func GetIngressBackend ¶
func GetIngressBackend(kClient *kubernetes.Clientset, namespace, ingress, host, path string) (backend IngressBackend, err error)
GetIngressBackend returns ingress backend by specific host and path
Click to show internal directories.
Click to hide internal directories.