Documentation ¶
Index ¶
- func ConfigMapExist() bool
- func RestartPod(podID string) error
- func UpdateCimYang()
- type ControlIpRequest
- type ControlIpResponse
- type KubeClient
- func (c *KubeClient) AddAnnotation(path, valueJSON, namespace, podName string) error
- func (c *KubeClient) CreateCimConfigMap() error
- func (c *KubeClient) DeleteAnnotation(path, namespace, podName string) error
- func (c *KubeClient) DeletePod(podName, namespace string) error
- func (c *KubeClient) DeletePodWithGrace(podName, namespace string, GracePeriodSeconds *int64) error
- func (c *KubeClient) GetCimCMRevision()
- func (c *KubeClient) GetCimConfigMap() (*v1.ConfigMap, error)
- func (c *KubeClient) GetDeployment(namespace, deploymentName string) (*v1.Deployment, error)
- func (c *KubeClient) GetLabelValue(label string) string
- func (c *KubeClient) GetLoggingPod(nodename string) (*v1.PodList, error)
- func (c *KubeClient) GetPod(namespace, podName string) (*v1.Pod, error)
- func (c *KubeClient) GetPodDeletionGracePeriod(namespace, podName string) (int64, error)
- func (c *KubeClient) GetPodUUID() string
- func (c *KubeClient) GetReplicaCount(namespace, deployment string) (int32, error)
- func (c *KubeClient) GetStatefulSets(namespace, statefulsetName string) (*v1.StatefulSet, error)
- func (c *KubeClient) GetTopoGwFqdn() (string, error)
- func (c *KubeClient) GetXGVelaNamespace() (string, error)
- func (c *KubeClient) ListPods(namespace string) (*v1.PodList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapExist ¶
func ConfigMapExist() bool
func UpdateCimYang ¶
func UpdateCimYang()
Types ¶
type ControlIpRequest ¶
type ControlIpResponse ¶
type KubeClient ¶
type KubeClient struct {
Client *kubernetes.Clientset
}
var ( //KubeConnect k8s connection object KubeConnect *KubeClient )
func NewKubeConfig ¶
func NewKubeConfig() (*KubeClient, error)
NewKubeConfig get k8s client connection
func (*KubeClient) AddAnnotation ¶
func (c *KubeClient) AddAnnotation(path, valueJSON, namespace, podName string) error
AddAnnotation adds an annotation specified by path and it's value specified in valueJson, in a pod in a given namespace
func (*KubeClient) CreateCimConfigMap ¶
func (c *KubeClient) CreateCimConfigMap() error
func (*KubeClient) DeleteAnnotation ¶
func (c *KubeClient) DeleteAnnotation(path, namespace, podName string) error
DeleteAnnotation deletes an annotation specified in a path, in a pod in a given namespace
func (*KubeClient) DeletePod ¶
func (c *KubeClient) DeletePod(podName, namespace string) error
DeletePod restart a pod
func (*KubeClient) DeletePodWithGrace ¶
func (c *KubeClient) DeletePodWithGrace(podName, namespace string, GracePeriodSeconds *int64) error
DeletePodWithGrace restarts a pod with a grace period
func (*KubeClient) GetCimCMRevision ¶
func (c *KubeClient) GetCimCMRevision()
func (*KubeClient) GetCimConfigMap ¶
func (c *KubeClient) GetCimConfigMap() (*v1.ConfigMap, error)
list out configmap in given namespace
func (*KubeClient) GetDeployment ¶
func (c *KubeClient) GetDeployment(namespace, deploymentName string) (*v1.Deployment, error)
GetDeployment get deployment details
func (*KubeClient) GetLabelValue ¶
func (c *KubeClient) GetLabelValue(label string) string
GetLabelValue gets the value of the label passed, for current pod
func (*KubeClient) GetLoggingPod ¶
func (c *KubeClient) GetLoggingPod(nodename string) (*v1.PodList, error)
Get Local daemonset Logging pod
func (*KubeClient) GetPod ¶
func (c *KubeClient) GetPod(namespace, podName string) (*v1.Pod, error)
GetPod get pod details
func (*KubeClient) GetPodDeletionGracePeriod ¶
func (c *KubeClient) GetPodDeletionGracePeriod(namespace, podName string) (int64, error)
GetPodDeletionGracePeriod returns grace period for pod deletion in seconds
func (*KubeClient) GetPodUUID ¶
func (c *KubeClient) GetPodUUID() string
GetPodUUID fetches the UUID of the pod
func (*KubeClient) GetReplicaCount ¶
func (c *KubeClient) GetReplicaCount(namespace, deployment string) (int32, error)
GetReplicaCount gets the replicas in a deployment or a statefulset.
func (*KubeClient) GetStatefulSets ¶
func (c *KubeClient) GetStatefulSets(namespace, statefulsetName string) (*v1.StatefulSet, error)
GetStatefulSets get StatefulSets details
func (*KubeClient) GetTopoGwFqdn ¶
func (c *KubeClient) GetTopoGwFqdn() (string, error)
GetTopoGwFqdn get topo-gw fqdn from annotations
func (*KubeClient) GetXGVelaNamespace ¶
func (c *KubeClient) GetXGVelaNamespace() (string, error)
GetXGVelaNamespace get cluster role details