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 ¶ added in v0.4.4
type API struct { Client kubernetes.Interface // contains filtered or unexported fields }
API provides shared informers for all Kubernetes objects
func NewAPI ¶ added in v0.4.4
func NewAPI(k8sClient kubernetes.Interface, resources ...ApiResource) *API
NewAPI takes a Kubernetes client and returns an initialized API
func NewFakeAPI ¶ added in v0.4.4
func (*API) CM ¶ added in v0.4.4
func (api *API) CM() coreinformers.ConfigMapInformer
func (*API) Deploy ¶ added in v0.4.4
func (api *API) Deploy() appinformers.DeploymentInformer
func (*API) Endpoint ¶ added in v0.4.4
func (api *API) Endpoint() coreinformers.EndpointsInformer
func (*API) GetObjects ¶ added in v0.4.4
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 ¶ added in v0.5.0
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 ¶ added in v0.4.4
GetPodsFor returns all running and pending Pods associated with a given Kubernetes object. Use includeFailed to also get failed Pods
func (*API) NS ¶ added in v0.4.4
func (api *API) NS() coreinformers.NamespaceInformer
func (*API) Pod ¶ added in v0.4.4
func (api *API) Pod() coreinformers.PodInformer
func (*API) RC ¶ added in v0.4.4
func (api *API) RC() coreinformers.ReplicationControllerInformer
func (*API) RS ¶ added in v0.4.4
func (api *API) RS() appinformers.ReplicaSetInformer
func (*API) Svc ¶ added in v0.4.4
func (api *API) Svc() coreinformers.ServiceInformer
type ApiResource ¶ added in v0.4.4
type ApiResource int
const ( CM ApiResource = iota Deploy Endpoint NS Pod RC RS Svc )