Documentation ¶
Index ¶
- type ConfigMap
- type KubeAPI
- func (k *KubeAPI) CheckPods(namespace string, pods []string) error
- func (k *KubeAPI) CreateJob(namespace string, job *v1batch.Job) (*v1batch.Job, error)
- func (k *KubeAPI) CreateNamespace(name string) (*corev1.Namespace, error)
- func (k *KubeAPI) DeleteDeployment(namespace, deployment string) error
- func (k *KubeAPI) DeleteJob(namespace string, job *v1batch.Job) error
- func (k *KubeAPI) DeleteNamespace(name string) error
- func (k *KubeAPI) DeletePod(namespace, pod string) error
- func (k *KubeAPI) DeleteService(namespace, service string) error
- func (k *KubeAPI) DeleteStatefulSet(namespace, statefulset string) error
- func (k *KubeAPI) Exec(namespace, pod, container string, command []string) (string, string, error)
- func (k *KubeAPI) GetConfigMap(namespace, name string, opts metav1.GetOptions) (*v1.ConfigMap, error)
- func (k *KubeAPI) GetConfigMaps(namespace string, label, field string) ([]ConfigMap, error)
- func (k *KubeAPI) GetDeployment(namespace, deployment string) (*apps.Deployment, error)
- func (k *KubeAPI) GetDeploymentPods(namespace, deployment string) ([]string, error)
- func (k *KubeAPI) GetJob(namespace, job string) (*v1batch.Job, error)
- func (k *KubeAPI) GetPod(namespace, pod string) (*v1.Pod, error)
- func (k *KubeAPI) GetSecret(namespace, name string) (*v1.Secret, error)
- func (k *KubeAPI) GetService(namespace, service string) (*v1.Service, error)
- func (k *KubeAPI) GetStatefulSet(namespace, statefulset string) (*apps.StatefulSet, error)
- func (k *KubeAPI) GetStatefulSetPods(namespace, statefulset string) ([]string, error)
- func (k *KubeAPI) IsDeploymentReady(namespace, deployment string) (bool, error)
- func (k *KubeAPI) IsJobComplete(namespace string, job *v1batch.Job) error
- func (k *KubeAPI) IsJobDeleted(namespace string, job *v1batch.Job) error
- func (k *KubeAPI) IsPodDeleted(namespace, pod string) bool
- func (k *KubeAPI) IsPodReady(namespace string, pod string) (bool, error)
- func (k *KubeAPI) IsPodRunning(namespace, pod string) (bool, error)
- func (k *KubeAPI) IsStatefulSetReady(namespace, statefulset string) (bool, error)
- func (k *KubeAPI) ListConfigMaps(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error)
- func (k *KubeAPI) ListDeployments(namespace, label string) (*apps.DeploymentList, error)
- func (k *KubeAPI) ListPods(namespace string) (*v1.PodList, error)
- func (k *KubeAPI) Logs(l *LogOpts, out io.Writer) error
- func (k *KubeAPI) NewProxy(local, remote int, pod, namespace string) (*Proxy, error)
- type LogOpts
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeAPI ¶
type KubeAPI struct { Client *kubernetes.Clientset Config *rest.Config Timeout time.Duration InCluster bool }
KubeAPI is the main data structure containing the various settings required to use the package. All methods use this structure as the receiver.
func (*KubeAPI) CheckPods ¶
CheckPods method is a wrapper that checks if a pod is running and ready.
func (*KubeAPI) CreateNamespace ¶
CreateNamespace method creates a new namespace in Kubernetes.
func (*KubeAPI) DeleteDeployment ¶
DeleteDeployment method deletes a given deployment in a given namespace.
func (*KubeAPI) DeleteNamespace ¶
CreateNamespace method deletes a namespace in Kubernetes.
func (*KubeAPI) DeleteService ¶
GetService method deletes a given service in a given namespace.
func (*KubeAPI) DeleteStatefulSet ¶
DeleteStatefulSet method deletes a given statefulset in a given namespace.
func (*KubeAPI) GetConfigMap ¶
func (*KubeAPI) GetConfigMaps ¶
func (*KubeAPI) GetDeployment ¶
func (k *KubeAPI) GetDeployment(namespace, deployment string) (*apps.Deployment, error)
GetDeployment method returns a deployment data structure for a given deployment in a given namespace.
func (*KubeAPI) GetDeploymentPods ¶
GetDeploymentPods method returns the pods associated with a given deployment in a given namespace.
func (*KubeAPI) GetJob ¶
GetJob method returns a job data structure for a given job in a given namespace.
func (*KubeAPI) GetPod ¶
GetPod method returns a pod data structure for a given pod in a given namespace.
func (*KubeAPI) GetService ¶
GetService method returns a given service in a given namespace.
func (*KubeAPI) GetStatefulSet ¶
func (k *KubeAPI) GetStatefulSet(namespace, statefulset string) (*apps.StatefulSet, error)
GetStatefulSet method returns a given statefulset in a given namespace.
func (*KubeAPI) GetStatefulSetPods ¶
GetStatefulSetPods method returns all the pods associated with a given StatefulSet.
func (*KubeAPI) IsDeploymentReady ¶
IsDeploymentReady method tests if a deployment is ready to be used.
func (*KubeAPI) IsJobComplete ¶
IsJobComplete method tests if a job has completed successfully.
func (*KubeAPI) IsJobDeleted ¶
IsJobDeleted method tests if a job has deleted successfully.
func (*KubeAPI) IsPodDeleted ¶
IsPodDeleted method tests if a pod has been terminated.
func (*KubeAPI) IsPodReady ¶
IsPodReady method tests if a pod is ready.
func (*KubeAPI) IsPodRunning ¶
IsPodRunning method tests if a pod is running.
func (*KubeAPI) IsStatefulSetReady ¶
IsStatefulSetReady method tests if a statefulset is ready to use.
func (*KubeAPI) ListConfigMaps ¶
func (k *KubeAPI) ListConfigMaps(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error)
func (*KubeAPI) ListDeployments ¶
func (k *KubeAPI) ListDeployments(namespace, label string) (*apps.DeploymentList, error)
type LogOpts ¶
type LogOpts struct { Container string Namespace string Pod string Follow bool Previous bool Timestamps bool }
LogOpts is a data structure used to configure log captures for a container.
type Proxy ¶
type Proxy struct { Hostname string Local int Remote int Namespace string PodName string Out io.Writer // contains filtered or unexported fields }
Proxy is a data structure used when configuring a port forward proxy.
func (*Proxy) ForwardPort ¶
ForwardPort method forwards the configured ports configured in an instance of Proxy.