Documentation ¶
Index ¶
- type Interface
- type Kube
- func (k *Kube) GetAnnotationsOnPod(namespace, name string) (map[string]string, error)
- func (k *Kube) GetEndpoints(namespace string) (*kapi.EndpointsList, error)
- func (k *Kube) GetNamespace(name string) (*kapi.Namespace, error)
- func (k *Kube) GetNamespaces() (*kapi.NamespaceList, error)
- func (k *Kube) GetNetworkPolicies(namespace string) (*kapisnetworking.NetworkPolicyList, error)
- func (k *Kube) GetNode(name string) (*kapi.Node, error)
- func (k *Kube) GetNodes() (*kapi.NodeList, error)
- func (k *Kube) GetPod(namespace, name string) (*kapi.Pod, error)
- func (k *Kube) GetPods(namespace string) (*kapi.PodList, error)
- func (k *Kube) GetPodsByLabels(namespace string, selector labels.Selector) (*kapi.PodList, error)
- func (k *Kube) GetService(namespace, name string) (*kapi.Service, error)
- func (k *Kube) SetAnnotationOnNamespace(ns *kapi.Namespace, key, value string) error
- func (k *Kube) SetAnnotationOnNode(node *kapi.Node, key, value string) error
- func (k *Kube) SetAnnotationOnPod(pod *kapi.Pod, key, value string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { SetAnnotationOnPod(pod *kapi.Pod, key, value string) error SetAnnotationOnNode(node *kapi.Node, key, value string) error SetAnnotationOnNamespace(ns *kapi.Namespace, key, value string) error GetAnnotationsOnPod(namespace, name string) (map[string]string, error) GetPod(namespace, name string) (*kapi.Pod, error) GetPods(namespace string) (*kapi.PodList, error) GetPodsByLabels(namespace string, selector labels.Selector) (*kapi.PodList, error) GetNodes() (*kapi.NodeList, error) GetNode(name string) (*kapi.Node, error) GetService(namespace, name string) (*kapi.Service, error) GetEndpoints(namespace string) (*kapi.EndpointsList, error) GetNamespace(name string) (*kapi.Namespace, error) GetNamespaces() (*kapi.NamespaceList, error) GetNetworkPolicies(namespace string) (*kapisnetworking.NetworkPolicyList, error) }
Interface represents the exported methods for dealing with getting/setting kubernetes resources
type Kube ¶
type Kube struct {
KClient kubernetes.Interface
}
Kube is the structure object upon which the Interface is implemented
func (*Kube) GetAnnotationsOnPod ¶
GetAnnotationsOnPod obtains the pod annotations from kubernetes apiserver, given the name and namespace
func (*Kube) GetEndpoints ¶ added in v0.3.0
func (k *Kube) GetEndpoints(namespace string) (*kapi.EndpointsList, error)
GetEndpoints returns all the Endpoint resources from kubernetes apiserver, given namespace
func (*Kube) GetNamespace ¶ added in v0.3.0
GetNamespace returns the Namespace resource from kubernetes apiserver, given its name
func (*Kube) GetNamespaces ¶ added in v0.3.0
func (k *Kube) GetNamespaces() (*kapi.NamespaceList, error)
GetNamespaces returns all Namespace resource from kubernetes apiserver
func (*Kube) GetNetworkPolicies ¶ added in v0.3.0
func (k *Kube) GetNetworkPolicies(namespace string) (*kapisnetworking.NetworkPolicyList, error)
GetNetworkPolicies returns all network policy objects from kubernetes
func (*Kube) GetPod ¶
GetPod obtains the Pod resource from kubernetes apiserver, given the name and namespace
func (*Kube) GetPods ¶
GetPods obtains the Pod resource from kubernetes apiserver, given the name and namespace
func (*Kube) GetPodsByLabels ¶
GetPodsByLabels obtains the Pod resources from kubernetes apiserver, given the namespace and label
func (*Kube) GetService ¶
GetService returns the Service resource from kubernetes apiserver, given its name and namespace
func (*Kube) SetAnnotationOnNamespace ¶ added in v0.3.0
SetAnnotationOnNamespace takes the Namespace object and key/value pair to set it as an annotation
func (*Kube) SetAnnotationOnNode ¶
SetAnnotationOnNode takes the node object and key/value string pair to set it as an annotation