Documentation ¶
Index ¶
- func NewClientSet(kubeConfig string) (*kubernetes.Clientset, error)
- type API
- func (api *API) CM() coreinformers.ConfigMapInformer
- func (api *API) Deploy() appinformers.DeploymentInformer
- func (api *API) Endpoint() coreinformers.EndpointsInformer
- func (api *API) GetObjects(namespace, restype, name string) ([]runtime.Object, error)
- func (api *API) GetOwnerKindAndName(pod *apiv1.Pod) (string, string)
- func (api *API) GetPodsFor(obj runtime.Object, includeFailed bool) ([]*apiv1.Pod, error)
- func (api *API) NS() coreinformers.NamespaceInformer
- func (api *API) Pod() coreinformers.PodInformer
- func (api *API) RC() coreinformers.ReplicationControllerInformer
- func (api *API) RS() appinformers.ReplicaSetInformer
- func (api *API) Svc() coreinformers.ServiceInformer
- func (api *API) Sync(readyCh chan<- struct{})
- type ApiResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientSet ¶
func NewClientSet(kubeConfig string) (*kubernetes.Clientset, error)
Types ¶
type API ¶
type API struct { Client kubernetes.Interface // contains filtered or unexported fields }
API provides shared informers for all Kubernetes objects
func NewAPI ¶
func NewAPI(k8sClient kubernetes.Interface, resources ...ApiResource) *API
NewAPI takes a Kubernetes client and returns an initialized API
func NewFakeAPI ¶
func (*API) CM ¶
func (api *API) CM() coreinformers.ConfigMapInformer
func (*API) Deploy ¶
func (api *API) Deploy() appinformers.DeploymentInformer
func (*API) Endpoint ¶
func (api *API) Endpoint() coreinformers.EndpointsInformer
func (*API) GetObjects ¶
GetObjects returns a list of Kubernetes objects, given a namespace, type, and name. If namespace is an empty string, match objects in all namespaces. If name is an empty string, match all objects of the given type.
func (*API) GetOwnerKindAndName ¶
GetOwnerKindAndName returns the pod owner's kind and name, using owner references from the Kubernetes API. The kind is represented as the Kubernetes singular resource type (e.g. deployment, daemonset, job, etc.)
func (*API) GetPodsFor ¶
GetPodsFor returns all running and pending Pods associated with a given Kubernetes object. Use includeFailed to also get failed Pods
func (*API) NS ¶
func (api *API) NS() coreinformers.NamespaceInformer
func (*API) Pod ¶
func (api *API) Pod() coreinformers.PodInformer
func (*API) RC ¶
func (api *API) RC() coreinformers.ReplicationControllerInformer
func (*API) RS ¶
func (api *API) RS() appinformers.ReplicaSetInformer
func (*API) Svc ¶
func (api *API) Svc() coreinformers.ServiceInformer
type ApiResource ¶
type ApiResource int
const ( CM ApiResource = iota Deploy Endpoint NS Pod RC RS Svc )