Documentation
¶
Index ¶
- func ConfigNamespace() (string, error)
- func CreateConfigMap(ctx context.Context, cli kubernetes.Interface, namespace string, spec string) (*v1.ConfigMap, error)
- func CreateDeployment(ctx context.Context, cli kubernetes.Interface, namespace string, spec string) (*v1beta1.Deployment, error)
- func CreateStatefulSet(ctx context.Context, cli kubernetes.Interface, namespace string, spec string) (*v1beta1.StatefulSet, error)
- func Exec(cli kubernetes.Interface, namespace, pod, container string, command []string) (string, string, error)
- func ExecWithOptions(kubeCli kubernetes.Interface, options ExecOptions) (string, string, error)
- func FetchPods(cli kubernetes.Interface, namespace string, uid types.UID, ...) ([]v1.Pod, error)
- func FetchReplicaSet(cli kubernetes.Interface, namespace string, uid types.UID, ...) (*v1beta1ext.ReplicaSet, error)
- func LoadConfig() (config *rest.Config, err error)
- func NewClient() kubernetes.Interface
- func WaitOnDeploymentReady(ctx context.Context, kubeCli kubernetes.Interface, d *v1beta1.Deployment) bool
- func WaitOnStatefulSetReady(ctx context.Context, kubeCli kubernetes.Interface, ss *v1beta1.StatefulSet) bool
- type ExecOptions
- type Job
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigNamespace ¶
func CreateConfigMap ¶
func CreateConfigMap(ctx context.Context, cli kubernetes.Interface, namespace string, spec string) (*v1.ConfigMap, error)
CreateConfigMap creates a configmap set from a yaml spec.
func CreateDeployment ¶
func CreateDeployment(ctx context.Context, cli kubernetes.Interface, namespace string, spec string) (*v1beta1.Deployment, error)
CreateDeployment creates a deployment set from a yaml spec.
func CreateStatefulSet ¶
func CreateStatefulSet(ctx context.Context, cli kubernetes.Interface, namespace string, spec string) (*v1beta1.StatefulSet, error)
CreateStatefulSet creates a stateful set from a yaml spec.
func Exec ¶
func Exec(cli kubernetes.Interface, namespace, pod, container string, command []string) (string, string, error)
Exec is our version of the call to `kubectl exec` that does not depend on k8s.io/kubernetes.
func ExecWithOptions ¶
func ExecWithOptions(kubeCli kubernetes.Interface, options ExecOptions) (string, string, error)
ExecWithOptions executes a command in the specified container, returning stdout, stderr and error. `options` allowed for additional parameters to be passed.
func FetchPods ¶
func FetchPods(cli kubernetes.Interface, namespace string, uid types.UID, labels map[string]string) ([]v1.Pod, error)
FetchPods fetches the pods matching the specified labels and owner UID
func FetchReplicaSet ¶
func FetchReplicaSet(cli kubernetes.Interface, namespace string, uid types.UID, labels map[string]string) (*v1beta1ext.ReplicaSet, error)
FetchReplicaSet fetches the replicaset matching the specified labels and owner UID
func LoadConfig ¶
LoadConfig returns a kubernetes client config based on global settings.
func NewClient ¶
func NewClient() kubernetes.Interface
NewClient returns a k8 client configured by the k10 environment.
func WaitOnDeploymentReady ¶
func WaitOnDeploymentReady(ctx context.Context, kubeCli kubernetes.Interface, d *v1beta1.Deployment) bool
WaitOnDeploymentReady waits for the deployment to be ready
func WaitOnStatefulSetReady ¶
func WaitOnStatefulSetReady(ctx context.Context, kubeCli kubernetes.Interface, ss *v1beta1.StatefulSet) bool
WaitOnStatefulSetReady waits for the stateful set to be ready
Types ¶
type ExecOptions ¶
type ExecOptions struct { Command []string Namespace string PodName string ContainerName string Stdin io.Reader CaptureStdout bool CaptureStderr bool }
ExecOptions passed to ExecWithOptions
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job object is used for running the user specified container as a Kubernetes job.