kube

package
v0.0.0-...-c4e93b7 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 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 Client

type Client struct {
	Clientset *kubernetes.Clientset
	// contains filtered or unexported fields
}

Client is used to connect with k8s api server

func NewClient

func NewClient() (*Client, error)

NewClient returns a new k8s client if success

func (*Client) GetK8sPodAnnotations

func (kc *Client) GetK8sPodAnnotations(k8sPodNamespaces string, k8sPodName string) (map[string]string,
	error)

GetK8sPodAnnotations returns the pod's annotation through k8s api server

func (*Client) GetStsName

func (kc *Client) GetStsName(podNamespace string, podName string) string

GetStsName returns the name of the pod's owner

func (*Client) IsPodFixedIP

func (kc *Client) IsPodFixedIP(podNamespace string, podName string) bool

IsPodFixedIP returns true for pods in the control of statefulset, and with the annotation "hcipam_ip_fixed=true"

type K8sArgs

type K8sArgs struct {
	types.CommonArgs
	K8sPodName             types.UnmarshallableString
	K8sPodNamespace        types.UnmarshallableString
	K8sPodInfraContainerID types.UnmarshallableString
	K8sAnnotation          types.UnmarshallableString
}

K8sArgs is the valid CNI_ARGS used for Kubernetes

Jump to

Keyboard shortcuts

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