Documentation ¶
Index ¶
- Variables
- func Annotations() map[string]string
- func GetNodeName() string
- func GetPodID() string
- func GetPodName() string
- func GetPodNamespace() string
- func Labels() map[string]string
- func LocalIP() (ip string)
- func Map2Json(m map[string]string) string
- func Map2Str(m map[string]string) string
- func Runtime() map[string]string
- func SimplifyService(service *v1.Service) *v1.Service
- type Client
- func (c *Client) CreateIfNotExistService(namespace string, service *v1.Service) error
- func (c *Client) GetPod(namespace, name string) (*v1.Pod, error)
- func (c *Client) GetPodLabels(namespace, name string) (map[string]string, error)
- func (c *Client) GetPodsByFieldSelector(namespace string, fieldSelector map[string]string) ([]v1.Pod, error)
- func (c *Client) GetPodsBySelector(namespace string, selector map[string]string) ([]v1.Pod, error)
- func (c *Client) GetPodsIPsBySelector(namespace string, selector map[string]string) ([]string, error)
- func (c *Client) GetService(namespace, name string) (*v1.Service, error)
- func (c *Client) GetServiceLabels(namespace, name string) (map[string]string, error)
- func (c *Client) GetServiceSelector(namespace, name string) (map[string]string, error)
- func (c *Client) PatchPodLabels(namespace, name string, label map[string]string) error
- func (c *Client) PatchServiceLabels(namespace, name string, labels map[string]string) error
- func (c *Client) PatchServiceSelector(namespace, name string, selector map[string]string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var APIClient = NewClient(Config{})
Functions ¶
func Annotations ¶
Annotations stores the meta data of the pod and other important information "leaseLockName": the name of the lease lock resource "leaseLockNamespace": the namespace of the lease lock resource "region": the region of the pod
func GetNodeName ¶
func GetNodeName() string
func GetPodName ¶
func GetPodName() string
func GetPodNamespace ¶
func GetPodNamespace() string
Types ¶
type Client ¶
func NewClientWithClients ¶
NewClientWithClients TODO: consider using a clientset if already have a clientset instance
func (*Client) CreateIfNotExistService ¶
func (*Client) GetPodLabels ¶
func (*Client) GetPodsByFieldSelector ¶
func (*Client) GetPodsBySelector ¶
func (*Client) GetPodsIPsBySelector ¶
func (*Client) GetService ¶
func (*Client) GetServiceLabels ¶
GetServiceLabels returns labels of a kubernetes service.
func (*Client) GetServiceSelector ¶
GetServiceSelector returns selector of a kubernetes service.
func (*Client) PatchPodLabels ¶
func (*Client) PatchServiceLabels ¶
PatchServiceLabels by default uses strategic merge patch. if label k v does ont exist, it will add. if k v exist, it will update.
Click to show internal directories.
Click to hide internal directories.