pods

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package pods provides implementation of Pod resources for Kubernetes

Deprecated: Use the resources package instead.

Index

Constants

View Source
const (
	Running   string = "Running"
	Succeeded string = "Succeeded"
)

ValidPod status

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerOptions deprecated

type ContainerOptions struct {
	Name         string // name of the container
	Image        string // image to be attached
	PullPolicy   k8sTypes.PullPolicy
	Command      []string // command to be executed by the container
	Capabilities []string // capabilities to be added to the container's security context
}

ContainerOptions describes a container to be started in a pod

Deprecated: No longer used.

type EphemeralContainerOptions deprecated

type EphemeralContainerOptions struct {
	ContainerOptions
	Wait string
}

EphemeralContainerOptions describes the options for creating an ephemeral container in a pod

Deprecated: No longer used.

type ExecOptions deprecated

type ExecOptions struct {
	Namespace string   // namespace where the pod is running
	Pod       string   // name of the Pod to execute the command in
	Container string   // name of the container to execute the command in
	Command   []string // command to be executed with its parameters
	Stdin     []byte   // stdin to be supplied to the command
}

ExecOptions describe the command to be executed and the target container

Deprecated: No longer used.

type ExecResult deprecated

type ExecResult struct {
	Stdout []byte
	Stderr []byte
}

ExecResult contains the output obtained from the execution of a command

Deprecated: No longer used.

type PodOptions deprecated

type PodOptions struct {
	Namespace     string // namespace where the pod will be executed
	Name          string // name of the pod
	Image         string // image to be executed by the pod's container
	PullPolicy    k8sTypes.PullPolicy
	Command       []string               // command to be executed by the pod's container and its arguments
	RestartPolicy k8sTypes.RestartPolicy // policy for restarting containers in the pod [Always|OnFailure|Never]
	Wait          string                 // timeout for waiting until the pod is running
}

PodOptions describe a Pod to be executed

Deprecated: No longer used.

type Pods deprecated

type Pods struct {
	// contains filtered or unexported fields
}

Pods provides API for manipulating Pod resources within a Kubernetes cluster

Deprecated: No longer used in favor of generic resources.

func New deprecated

func New(ctx context.Context, client kubernetes.Interface, config *rest.Config, metaOptions metav1.ListOptions) *Pods

New creates a new instance backed by the provided client

Deprecated: No longer used.

func (*Pods) AddEphemeralContainer deprecated

func (obj *Pods) AddEphemeralContainer(name, namespace string, options EphemeralContainerOptions) error

AddEphemeralContainer adds an ephemeral container to a running pod. The Pod is identified by name and namespace. The container is described by options

Deprecated: No longer used.

func (*Pods) Create deprecated

func (obj *Pods) Create(options PodOptions) (k8sTypes.Pod, error)

Create runs a pod specified by the options

Deprecated: Use resources.Create instead.

func (*Pods) Delete deprecated

func (obj *Pods) Delete(name, namespace string, opts metav1.DeleteOptions) error

Delete removes the named Pod from the namespace

Deprecated: Use resources.Delete instead.

func (*Pods) Exec deprecated

func (obj *Pods) Exec(options ExecOptions) (*ExecResult, error)

Exec executes a non-interactive command described in options and returns the stdout and stderr outputs

Deprecated: No longer used.

func (*Pods) Get deprecated

func (obj *Pods) Get(name, namespace string) (k8sTypes.Pod, error)

Get returns the named Pods instance within the namespace if available

Deprecated: Use resources.Get instead.

func (*Pods) IsTerminating deprecated

func (obj *Pods) IsTerminating(name, namespace string) (bool, error)

IsTerminating returns if the state of the named pod is currently terminating

Deprecated: No longer used.

func (*Pods) Kill deprecated

func (obj *Pods) Kill(name, namespace string, opts metav1.DeleteOptions) error

Kill removes the named Pod from the namespace

Deprecated: Use resources.Delete instead.

func (*Pods) List deprecated

func (obj *Pods) List(namespace string) ([]k8sTypes.Pod, error)

List returns a collection of Pods available within the namespace

Deprecated: Use resources.List instead.

func (*Pods) Wait deprecated

func (obj *Pods) Wait(options WaitOptions) (bool, error)

Wait for the Pod to be in a given status up to given timeout and returns a boolean indicating if the status was reached. If the pod is Failed returns error.

Deprecated: No longer used.

type WaitOptions deprecated

type WaitOptions struct {
	Name      string // Pod name
	Namespace string // Namespace where the pod is running
	Status    string // Wait until pod reaches the specified status. Must be one of "Running" or "Succeeded".
	Timeout   string // Timeout for waiting condition to be true
}

WaitOptions for waiting for a Pod status

Deprecated: No longer used.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL