Help us shape the future of Go! Take the 2026 Go Developer Survey

pod

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectGet

func ConnectGet(client *golangsdk.ServiceClient, namespace string, name string, opts ConnectGetOpts) error

func ConnectPost

func ConnectPost(client *golangsdk.ServiceClient, namespace string, name string, opts ConnectPostOpts) error

func Log added in v0.9.6

func Log(client *golangsdk.ServiceClient, opts LogOpts) (string, error)

Log reads logs of the specified pod

Types

type Affinity

type Affinity struct {
	NodeAffinity    *NodeAffinity    `json:"nodeAffinity,omitempty"`
	PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty"`
}

Affinity represents pod affinity and anti-affinity

type Capabilities

type Capabilities struct {
	Add  []string `json:"add,omitempty"`
	Drop []string `json:"drop,omitempty"`
}

Capabilities represents container capabilities

type ConfigMapEnvSource

type ConfigMapEnvSource struct {
	Name     string `json:"name,omitempty"`
	Optional *bool  `json:"optional,omitempty"`
}

ConfigMapEnvSource selects a ConfigMap to populate environment variables

type ConfigMapKeySelector

type ConfigMapKeySelector struct {
	Key      string `json:"key"`
	Name     string `json:"name,omitempty"`
	Optional *bool  `json:"optional,omitempty"`
}

ConfigMapKeySelector selects a key from a ConfigMap

type ConfigMapProjection

type ConfigMapProjection struct {
	Items    []KeyToPath `json:"items,omitempty"`
	Name     string      `json:"name,omitempty"`
	Optional *bool       `json:"optional,omitempty"`
}

ConfigMapProjection adapts a ConfigMap into a projected volume

type ConfigMapVolumeSource

type ConfigMapVolumeSource struct {
	DefaultMode *int32      `json:"defaultMode,omitempty"`
	Items       []KeyToPath `json:"items,omitempty"`
	Name        string      `json:"name,omitempty"`
	Optional    *bool       `json:"optional,omitempty"`
}

ConfigMapVolumeSource adapts a ConfigMap into a volume

type ConnectGetOpts added in v0.9.6

type ConnectGetOpts struct {
	// Command to execute
	Command string `q:"command,omitempty"`

	// Container in which to execute the command
	Container string `q:"container,omitempty"`

	// Redirect the standard error stream of the pod for this call
	Stderr *bool `q:"stderr,omitempty"`

	// Redirect the standard input stream of the pod for this call
	Stdin *bool `q:"stdin,omitempty"`

	// Redirect the standard output stream of the pod for this call
	Stdout *bool `q:"stdout,omitempty"`

	// TTY if true indicates that a tty will be allocated for the exec call
	TTY *bool `q:"tty,omitempty"`
}

ConnectGetOpts contains query parameters for the exec GET request

type ConnectPostOpts added in v0.9.6

type ConnectPostOpts struct {
	// Command to execute
	Command string `q:"command,omitempty"`

	// Container in which to execute the command
	Container string `q:"container,omitempty"`

	// Redirect the standard error stream of the pod for this call
	Stderr *bool `q:"stderr,omitempty"`

	// Redirect the standard input stream of the pod for this call
	Stdin *bool `q:"stdin,omitempty"`

	// Redirect the standard output stream of the pod for this call
	Stdout *bool `q:"stdout,omitempty"`

	// TTY if true indicates that a tty will be allocated for the exec call
	TTY *bool `q:"tty,omitempty"`
}

ConnectPostOpts contains query parameters for the exec POST request

type Container

type Container struct {
	Args                     []string             `json:"args,omitempty"`
	Command                  []string             `json:"command,omitempty"`
	Env                      []EnvVar             `json:"env,omitempty"`
	EnvFrom                  []EnvFromSource      `json:"envFrom,omitempty"`
	Image                    string               `json:"image,omitempty"`
	ImagePullPolicy          string               `json:"imagePullPolicy,omitempty"`
	Lifecycle                *Lifecycle           `json:"lifecycle,omitempty"`
	LivenessProbe            *Probe               `json:"livenessProbe,omitempty"`
	Name                     string               `json:"name"`
	Ports                    []ContainerPort      `json:"ports,omitempty"`
	ReadinessProbe           *Probe               `json:"readinessProbe,omitempty"`
	Resources                ResourceRequirements `json:"resources,omitempty"`
	SecurityContext          *SecurityContext     `json:"securityContext,omitempty"`
	StartupProbe             *Probe               `json:"startupProbe,omitempty"`
	Stdin                    bool                 `json:"stdin,omitempty"`
	StdinOnce                bool                 `json:"stdinOnce,omitempty"`
	TerminationMessagePath   string               `json:"terminationMessagePath,omitempty"`
	TerminationMessagePolicy string               `json:"terminationMessagePolicy,omitempty"`
	TTY                      bool                 `json:"tty,omitempty"`
	VolumeMounts             []VolumeMount        `json:"volumeMounts,omitempty"`
	WorkingDir               string               `json:"workingDir,omitempty"`
}

Container represents a container in a pod

type ContainerPort

type ContainerPort struct {
	ContainerPort int32  `json:"containerPort"`
	Name          string `json:"name,omitempty"`
	Protocol      string `json:"protocol,omitempty"`
}

ContainerPort represents a port in a container running in a pod

type ContainerState

type ContainerState struct {
	Running    *ContainerStateRunning    `json:"running,omitempty"`
	Terminated *ContainerStateTerminated `json:"terminated,omitempty"`
	Waiting    *ContainerStateWaiting    `json:"waiting,omitempty"`
}

ContainerState represents the state of a container

type ContainerStateRunning

type ContainerStateRunning struct {
	StartedAt string `json:"startedAt,omitempty"`
}

ContainerStateRunning represents a running container state

type ContainerStateTerminated

type ContainerStateTerminated struct {
	ContainerID string `json:"containerID,omitempty"`
	ExitCode    int32  `json:"exitCode"`
	FinishedAt  string `json:"finishedAt,omitempty"`
	Message     string `json:"message,omitempty"`
	Reason      string `json:"reason,omitempty"`
	Signal      int32  `json:"signal,omitempty"`
	StartedAt   string `json:"startedAt,omitempty"`
}

ContainerStateTerminated represents a terminated container state

type ContainerStateWaiting

type ContainerStateWaiting struct {
	Message string `json:"message,omitempty"`
	Reason  string `json:"reason,omitempty"`
}

ContainerStateWaiting represents a waiting container state

type ContainerStatus

type ContainerStatus struct {
	ContainerID  string          `json:"containerID,omitempty"`
	Image        string          `json:"image"`
	ImageID      string          `json:"imageID"`
	LastState    *ContainerState `json:"lastState,omitempty"`
	Name         string          `json:"name"`
	Ready        bool            `json:"ready"`
	RestartCount int32           `json:"restartCount"`
	Started      *bool           `json:"started,omitempty"`
	State        *ContainerState `json:"state,omitempty"`
}

ContainerStatus represents the status of a container

type CreateOpts added in v0.9.6

type CreateOpts struct {
	// DryRun when present, indicates that modifications should not be persisted
	DryRun string `json:"-" q:"dryRun,omitempty"`

	// FieldManager is a name associated with the actor or entity making these changes
	FieldManager string `json:"-" q:"fieldManager,omitempty"`

	// Pretty if 'true', then the output is pretty printed
	Pretty string `json:"-" q:"pretty,omitempty"`

	Pod
}

CreateOpts contains the options for creating a pod

type DeleteBody

type DeleteBody struct {
	// APIVersion defines the versioned schema
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind represents the REST resource
	Kind string `json:"kind,omitempty"`

	// GracePeriodSeconds is the duration in seconds before deletion
	GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"`

	// PropagationPolicy determines how garbage collection will be performed
	PropagationPolicy string `json:"propagationPolicy,omitempty"`

	// DryRun when present, indicates modifications should not be persisted
	DryRun []string `json:"dryRun,omitempty"`

	// OrphanDependents determines if dependent objects should be orphaned
	OrphanDependents *bool `json:"orphanDependents,omitempty"`

	// Preconditions must be fulfilled before deletion
	Preconditions *Preconditions `json:"preconditions,omitempty"`
}

DeleteBody represents the body of delete request

type DeleteOpts

type DeleteOpts struct {
	// Name of the namespace to delete
	NameSpace string `json:"-" required:"true"`

	// Name of the pod to delete
	PodName string `json:"-" required:"true"`

	// Body contains the delete options
	Body DeleteBody `json:"-" required:"true"`
}

type DownwardAPIProjection

type DownwardAPIProjection struct {
	Items []DownwardAPIVolumeFile `json:"items,omitempty"`
}

DownwardAPIProjection represents downward API info for projecting

type DownwardAPIVolumeFile

type DownwardAPIVolumeFile struct {
	FieldRef         *ObjectFieldSelector   `json:"fieldRef,omitempty"`
	Mode             *int32                 `json:"mode,omitempty"`
	Path             string                 `json:"path"`
	ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"`
}

DownwardAPIVolumeFile represents information to create the file containing the pod field

type DownwardAPIVolumeSource

type DownwardAPIVolumeSource struct {
	DefaultMode *int32                  `json:"defaultMode,omitempty"`
	Items       []DownwardAPIVolumeFile `json:"items,omitempty"`
}

DownwardAPIVolumeSource represents a downward API volume source

type EmptyDirVolumeSource

type EmptyDirVolumeSource struct {
	Medium    string `json:"medium,omitempty"`
	SizeLimit string `json:"sizeLimit,omitempty"`
}

EmptyDirVolumeSource represents an empty directory volume

type EnvFromSource

type EnvFromSource struct {
	ConfigMapRef *ConfigMapEnvSource `json:"configMapRef,omitempty"`
	Prefix       string              `json:"prefix,omitempty"`
	SecretRef    *SecretEnvSource    `json:"secretRef,omitempty"`
}

EnvFromSource represents a source to populate environment variables

type EnvVar

type EnvVar struct {
	Name      string        `json:"name"`
	Value     string        `json:"value,omitempty"`
	ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
}

EnvVar represents an environment variable

type EnvVarSource

type EnvVarSource struct {
	ConfigMapKeyRef  *ConfigMapKeySelector  `json:"configMapKeyRef,omitempty"`
	FieldRef         *ObjectFieldSelector   `json:"fieldRef,omitempty"`
	ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty"`
	SecretKeyRef     *SecretKeySelector     `json:"secretKeyRef,omitempty"`
}

EnvVarSource represents a source for an environment variable's value

type EphemeralContainer

type EphemeralContainer struct {
	Args                     []string         `json:"args,omitempty"`
	Command                  []string         `json:"command,omitempty"`
	Env                      []EnvVar         `json:"env,omitempty"`
	EnvFrom                  []EnvFromSource  `json:"envFrom,omitempty"`
	Image                    string           `json:"image,omitempty"`
	Name                     string           `json:"name"`
	SecurityContext          *SecurityContext `json:"securityContext,omitempty"`
	Stdin                    bool             `json:"stdin,omitempty"`
	StdinOnce                bool             `json:"stdinOnce,omitempty"`
	TargetContainerName      string           `json:"targetContainerName,omitempty"`
	TerminationMessagePath   string           `json:"terminationMessagePath,omitempty"`
	TerminationMessagePolicy string           `json:"terminationMessagePolicy,omitempty"`
	TTY                      bool             `json:"tty,omitempty"`
	VolumeMounts             []VolumeMount    `json:"volumeMounts,omitempty"`
	WorkingDir               string           `json:"workingDir,omitempty"`
}

EphemeralContainer represents an ephemeral container

type EphemeralVolumeSource

type EphemeralVolumeSource struct {
	VolumeClaimTemplate *PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty"`
}

EphemeralVolumeSource represents an ephemeral volume source

type ExecAction

type ExecAction struct {
	Command []string `json:"command,omitempty"`
}

ExecAction represents an exec lifecycle action

type HTTPGetAction

type HTTPGetAction struct {
	Host        string       `json:"host,omitempty"`
	HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"`
	Path        string       `json:"path,omitempty"`
	Port        string       `json:"port"`
	Scheme      string       `json:"scheme,omitempty"`
}

HTTPGetAction represents an HTTP GET lifecycle action

type HTTPHeader

type HTTPHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

HTTPHeader represents an HTTP header

type HostAlias

type HostAlias struct {
	Hostnames []string `json:"hostnames,omitempty"`
	IP        string   `json:"ip,omitempty"`
}

HostAlias represents a mapping between IP and hostnames

type KeyToPath

type KeyToPath struct {
	Key  string `json:"key"`
	Mode *int32 `json:"mode,omitempty"`
	Path string `json:"path"`
}

KeyToPath maps a string key to a path within a volume

type LabelSelector

type LabelSelector struct {
	MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty"`
	MatchLabels      map[string]string          `json:"matchLabels,omitempty"`
}

LabelSelector represents label selectors

type LabelSelectorRequirement

type LabelSelectorRequirement struct {
	Key      string   `json:"key"`
	Operator string   `json:"operator"`
	Values   []string `json:"values,omitempty"`
}

LabelSelectorRequirement represents a requirement for label selection

type Lifecycle

type Lifecycle struct {
	PostStart *LifecycleHandler `json:"postStart,omitempty"`
	PreStop   *LifecycleHandler `json:"preStop,omitempty"`
}

Lifecycle represents container lifecycle hooks

type LifecycleHandler

type LifecycleHandler struct {
	Exec    *ExecAction    `json:"exec,omitempty"`
	HTTPGet *HTTPGetAction `json:"httpGet,omitempty"`
}

LifecycleHandler represents a lifecycle handler

type ListOpts added in v0.9.6

type ListOpts struct {
	// AllowWatchBookmarks requests watch events with type "BOOKMARK"
	AllowWatchBookmarks *bool `q:"allowWatchBookmarks,omitempty"`

	// Continue option should be set when retrieving more results from the server
	Continue string `q:"continue,omitempty"`

	// FieldSelector is a selector to restrict the list of returned objects by their fields
	FieldSelector string `q:"fieldSelector,omitempty"`

	// LabelSelector is a selector to restrict the list of returned objects by their labels
	LabelSelector string `q:"labelSelector,omitempty"`

	// Limit is a maximum number of responses to return for a list call
	Limit *int `q:"limit,omitempty"`

	// ResourceVersion sets a constraint on what resource versions a request may be served from
	ResourceVersion string `q:"resourceVersion,omitempty"`

	// ResourceVersionMatch determines how resourceVersion is applied to list calls
	ResourceVersionMatch string `q:"resourceVersionMatch,omitempty"`

	// SendInitialEvents when set together with Watch option
	SendInitialEvents *bool `q:"sendInitialEvents,omitempty"`

	// TimeoutSeconds is timeout for the list/watch call
	TimeoutSeconds *int `q:"timeoutSeconds,omitempty"`

	// Watch for changes to the described resources
	Watch *bool `q:"watch,omitempty"`

	// Pretty if 'true', then the output is pretty printed
	Pretty string `q:"pretty,omitempty"`
}

ListOpts allows the filtering and sorting of paginated collections through the API

type LocalObjectReference

type LocalObjectReference struct {
	Name string `json:"name,omitempty"`
}

LocalObjectReference contains enough information to locate the referenced object

type LogOpts added in v0.9.6

type LogOpts struct {
	// Namespace of the pod
	Namespace string `json:"-" required:"true"`

	// Name of the pod
	Name string `json:"-" required:"true"`

	// Container for which to stream logs. Defaults to only container if there is one container in the pod.
	Container string `q:"container,omitempty"`

	// Follow the log stream of the pod
	Follow *bool `q:"follow,omitempty"`

	// InsecureSkipTLSVerifyBackend indicates skipping TLS verification of the backend
	InsecureSkipTLSVerifyBackend *bool `q:"insecureSkipTLSVerifyBackend,omitempty"`

	// LimitBytes limits the number of bytes of log output
	LimitBytes *int `q:"limitBytes,omitempty"`

	// Pretty if 'true', then the output is pretty printed
	Pretty string `q:"pretty,omitempty"`

	// Previous return previous terminated container logs
	Previous *bool `q:"previous,omitempty"`

	// SinceSeconds is a relative time in seconds before the current time from which to show logs
	SinceSeconds *int `q:"sinceSeconds,omitempty"`

	// TailLines is the number of lines from the end of the logs to show
	TailLines *int `q:"tailLines,omitempty"`

	// Timestamps adds an RFC3339 timestamp at the beginning of every line of log output
	Timestamps *bool `q:"timestamps,omitempty"`
}

LogOpts contains the options for reading pod logs

type ManagedFieldsEntry

type ManagedFieldsEntry struct {
	APIVersion  string      `json:"apiVersion,omitempty"`
	FieldsType  string      `json:"fieldsType,omitempty"`
	FieldsV1    interface{} `json:"fieldsV1,omitempty"`
	Manager     string      `json:"manager,omitempty"`
	Operation   string      `json:"operation,omitempty"`
	Subresource string      `json:"subresource,omitempty"`
	Time        string      `json:"time,omitempty"`
}

ManagedFieldsEntry contains information about the manager that created or modified a resource

type NFSVolumeSource

type NFSVolumeSource struct {
	Path     string `json:"path"`
	ReadOnly bool   `json:"readOnly,omitempty"`
	Server   string `json:"server"`
}

NFSVolumeSource represents an NFS mount

type NodeAffinity

type NodeAffinity struct {
	RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}

NodeAffinity represents node affinity scheduling rules

type NodeSelector

type NodeSelector struct {
	NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"`
}

NodeSelector represents a node selector

type NodeSelectorRequirement

type NodeSelectorRequirement struct {
	Key      string   `json:"key"`
	Operator string   `json:"operator"`
	Values   []string `json:"values,omitempty"`
}

NodeSelectorRequirement represents a node selector requirement

type NodeSelectorTerm

type NodeSelectorTerm struct {
	MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty"`
}

NodeSelectorTerm contains a list of node selector requirements

type ObjectFieldSelector

type ObjectFieldSelector struct {
	APIVersion string `json:"apiVersion,omitempty"`
	FieldPath  string `json:"fieldPath"`
}

ObjectFieldSelector selects a field from the pod

type ObjectMeta

type ObjectMeta struct {
	Annotations                map[string]string    `json:"annotations,omitempty"`
	ClusterName                string               `json:"clusterName,omitempty"`
	CreationTimestamp          string               `json:"creationTimestamp,omitempty"`
	DeletionGracePeriodSeconds *int64               `json:"deletionGracePeriodSeconds,omitempty"`
	DeletionTimestamp          string               `json:"deletionTimestamp,omitempty"`
	Enable                     *bool                `json:"enable,omitempty"`
	Finalizers                 []string             `json:"finalizers,omitempty"`
	GenerateName               string               `json:"generateName,omitempty"`
	Generation                 *int64               `json:"generation,omitempty"`
	Labels                     map[string]string    `json:"labels,omitempty"`
	ManagedFields              []ManagedFieldsEntry `json:"managedFields,omitempty"`
	Name                       string               `json:"name,omitempty"`
	Namespace                  string               `json:"namespace,omitempty"`
	OwnerReferences            []OwnerReference     `json:"ownerReferences,omitempty"`
	ResourceVersion            string               `json:"resourceVersion,omitempty"`
	SelfLink                   string               `json:"selfLink,omitempty"`
	UID                        string               `json:"uid,omitempty"`
}

ObjectMeta represents metadata about the object

type OwnerReference

type OwnerReference struct {
	APIVersion         string `json:"apiVersion"`
	BlockOwnerDeletion *bool  `json:"blockOwnerDeletion,omitempty"`
	Controller         *bool  `json:"controller,omitempty"`
	Kind               string `json:"kind"`
	Name               string `json:"name"`
	UID                string `json:"uid"`
}

OwnerReference represents a reference to an object's owner

type PatchOpts added in v0.9.6

type PatchOpts struct {
	// Namespace of the pod
	Namespace string `json:"-" required:"true"`

	// Name of the pod
	Name string `json:"-" required:"true"`

	// DryRun when present, indicates that modifications should not be persisted
	DryRun string `q:"dryRun,omitempty"`

	// FieldManager is a name associated with the actor or entity making these changes
	FieldManager string `q:"fieldManager,omitempty"`

	// Force indicates that the server should force Apply requests
	Force *bool `q:"force,omitempty"`

	// Pretty if 'true', then the output is pretty printed
	Pretty string `q:"pretty,omitempty"`
}

PatchOpts contains the options for partially updating a pod

type PersistentVolumeClaimSpec

type PersistentVolumeClaimSpec struct {
	AccessModes      []string                   `json:"accessModes,omitempty"`
	DataSource       *TypedLocalObjectReference `json:"dataSource,omitempty"`
	DataSourceRef    *TypedLocalObjectReference `json:"dataSourceRef,omitempty"`
	Resources        ResourceRequirements       `json:"resources,omitempty"`
	Selector         *LabelSelector             `json:"selector,omitempty"`
	StorageClassName string                     `json:"storageClassName,omitempty"`
	VolumeMode       string                     `json:"volumeMode,omitempty"`
	VolumeName       string                     `json:"volumeName,omitempty"`
}

PersistentVolumeClaimSpec represents the specification of a PVC

type PersistentVolumeClaimTemplate

type PersistentVolumeClaimTemplate struct {
	Metadata ObjectMeta                `json:"metadata,omitempty"`
	Spec     PersistentVolumeClaimSpec `json:"spec"`
}

PersistentVolumeClaimTemplate represents a template for PVC creation

type PersistentVolumeClaimVolumeSource

type PersistentVolumeClaimVolumeSource struct {
	ClaimName string `json:"claimName"`
	ReadOnly  bool   `json:"readOnly,omitempty"`
}

PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim

type Pod

type Pod struct {
	APIVersion string     `json:"apiVersion,omitempty"`
	Kind       string     `json:"kind,omitempty"`
	Metadata   ObjectMeta `json:"metadata,omitempty"`
	Spec       PodSpec    `json:"spec,omitempty"`
	Status     PodStatus  `json:"status,omitempty"`
}

Pod represents a pod in Kubernetes

func Create

func Create(client *golangsdk.ServiceClient, namespace string, opts CreateOpts) (*Pod, error)

Create requests the creation of a new pod

func Delete

func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (*Pod, error)

Delete removes a pod with specified options

func ExtractPods added in v0.9.6

func ExtractPods(r pagination.NewPage) ([]Pod, error)

ExtractPods accepts a Page struct and extracts the elements into a slice of Pod structs

func Get

func Get(client *golangsdk.ServiceClient, nameSpace, pod string) (*Pod, error)

Get retrieves a specific pod based on its name

func List added in v0.9.6

func List(client *golangsdk.ServiceClient, namespace string, opts ListOpts) ([]Pod, error)

List returns collection of pods in a namespace

func Patch added in v0.9.6

func Patch(client *golangsdk.ServiceClient, opts PatchOpts, body interface{}, contentType string) (*Pod, error)

Patch partially updates the specified pod. The body parameter should be the patch content matching the contentType. Supported content types:

  • "application/json-patch+json" (JSON Patch, RFC 6902)
  • "application/merge-patch+json" (Merge Patch, RFC 7386)
  • "application/strategic-merge-patch+json" (Strategic Merge Patch)

func Update

func Update(client *golangsdk.ServiceClient, namespace, podName string, opts UpdateOpts) (*Pod, error)

Update requests the update of a pod

type PodAffinityTerm

type PodAffinityTerm struct {
	LabelSelector *LabelSelector `json:"labelSelector,omitempty"`
	Namespaces    []string       `json:"namespaces,omitempty"`
	TopologyKey   string         `json:"topologyKey"`
}

PodAffinityTerm represents a pod affinity term

type PodAntiAffinity

type PodAntiAffinity struct {
	PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
	RequiredDuringSchedulingIgnoredDuringExecution  []PodAffinityTerm         `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}

PodAntiAffinity represents pod anti-affinity scheduling rules

type PodCondition

type PodCondition struct {
	LastProbeTime      string `json:"lastProbeTime,omitempty"`
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	Message            string `json:"message,omitempty"`
	Reason             string `json:"reason,omitempty"`
	Status             string `json:"status"`
	Type               string `json:"type"`
}

PodCondition represents a pod condition

type PodDNSConfig

type PodDNSConfig struct {
	Nameservers []string             `json:"nameservers,omitempty"`
	Options     []PodDNSConfigOption `json:"options,omitempty"`
	Searches    []string             `json:"searches,omitempty"`
}

PodDNSConfig represents DNS configurations

type PodDNSConfigOption

type PodDNSConfigOption struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

PodDNSConfigOption represents a DNS configuration option

type PodIP

type PodIP struct {
	IP string `json:"ip,omitempty"`
}

PodIP represents a pod IP address

type PodPage added in v0.9.6

type PodPage struct {
	pagination.NewSinglePageBase
}

PodPage is the page returned by a pager when traversing over a collection of pods

type PodReadinessGate

type PodReadinessGate struct {
	ConditionType string `json:"conditionType"`
}

PodReadinessGate represents a readiness gate

type PodSecurityContext

type PodSecurityContext struct {
	FSGroup             *int64   `json:"fsGroup,omitempty"`
	FSGroupChangePolicy string   `json:"fsGroupChangePolicy,omitempty"`
	RunAsGroup          *int64   `json:"runAsGroup,omitempty"`
	RunAsNonRoot        *bool    `json:"runAsNonRoot,omitempty"`
	RunAsUser           *int64   `json:"runAsUser,omitempty"`
	SupplementalGroups  []int64  `json:"supplementalGroups,omitempty"`
	Sysctls             []Sysctl `json:"sysctls,omitempty"`
}

PodSecurityContext holds pod-level security attributes

type PodSpec

type PodSpec struct {
	ActiveDeadlineSeconds         *int64                     `json:"activeDeadlineSeconds,omitempty"`
	Affinity                      *Affinity                  `json:"affinity,omitempty"`
	Containers                    []Container                `json:"containers"`
	DNSConfig                     *PodDNSConfig              `json:"dnsConfig,omitempty"`
	DNSPolicy                     string                     `json:"dnsPolicy,omitempty"`
	EphemeralContainers           []EphemeralContainer       `json:"ephemeralContainers,omitempty"`
	HostAliases                   []HostAlias                `json:"hostAliases,omitempty"`
	Hostname                      string                     `json:"hostname,omitempty"`
	ImagePullSecrets              []LocalObjectReference     `json:"imagePullSecrets,omitempty"`
	InitContainers                []Container                `json:"initContainers,omitempty"`
	NodeName                      string                     `json:"nodeName,omitempty"`
	Overhead                      map[string]string          `json:"overhead,omitempty"`
	ReadinessGates                []PodReadinessGate         `json:"readinessGates,omitempty"`
	RestartPolicy                 string                     `json:"restartPolicy,omitempty"`
	SchedulerName                 string                     `json:"schedulerName,omitempty"`
	SecurityContext               *PodSecurityContext        `json:"securityContext,omitempty"`
	SetHostnameAsFQDN             *bool                      `json:"setHostnameAsFQDN,omitempty"`
	ShareProcessNamespace         *bool                      `json:"shareProcessNamespace,omitempty"`
	TerminationGracePeriodSeconds *int64                     `json:"terminationGracePeriodSeconds,omitempty"`
	Tolerations                   []Toleration               `json:"tolerations,omitempty"`
	TopologySpreadConstraints     []TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	Volumes                       []Volume                   `json:"volumes,omitempty"`
}

PodSpec represents the specification of a pod

type PodStatus

type PodStatus struct {
	Conditions                 []PodCondition    `json:"conditions,omitempty"`
	ContainerStatuses          []ContainerStatus `json:"containerStatuses,omitempty"`
	EphemeralContainerStatuses []ContainerStatus `json:"ephemeralContainerStatuses,omitempty"`
	HostIP                     string            `json:"hostIP,omitempty"`
	InitContainerStatuses      []ContainerStatus `json:"initContainerStatuses,omitempty"`
	Message                    string            `json:"message,omitempty"`
	NominatedNodeName          string            `json:"nominatedNodeName,omitempty"`
	Phase                      string            `json:"phase,omitempty"`
	PodIP                      string            `json:"podIP,omitempty"`
	PodIPs                     []PodIP           `json:"podIPs,omitempty"`
	QOSClass                   string            `json:"qosClass,omitempty"`
	Reason                     string            `json:"reason,omitempty"`
	StartTime                  string            `json:"startTime,omitempty"`
}

PodStatus represents the current status of a pod

type Preconditions

type Preconditions struct {
	// ResourceVersion specifies the target ResourceVersion
	ResourceVersion string `json:"resourceVersion,omitempty"`

	// UID specifies the target UID
	UID string `json:"uid,omitempty"`
}

Preconditions represents conditions that must be fulfilled before deletion

type Probe

type Probe struct {
	Exec                          *ExecAction      `json:"exec,omitempty"`
	FailureThreshold              int32            `json:"failureThreshold,omitempty"`
	HTTPGet                       *HTTPGetAction   `json:"httpGet,omitempty"`
	InitialDelaySeconds           int32            `json:"initialDelaySeconds,omitempty"`
	PeriodSeconds                 int32            `json:"periodSeconds,omitempty"`
	SuccessThreshold              int32            `json:"successThreshold,omitempty"`
	TCPSocket                     *TCPSocketAction `json:"tcpSocket,omitempty"`
	TerminationGracePeriodSeconds *int64           `json:"terminationGracePeriodSeconds,omitempty"`
	TimeoutSeconds                int32            `json:"timeoutSeconds,omitempty"`
}

Probe represents a container probe

type ProjectedVolumeSource

type ProjectedVolumeSource struct {
	DefaultMode *int32             `json:"defaultMode,omitempty"`
	Sources     []VolumeProjection `json:"sources,omitempty"`
}

ProjectedVolumeSource represents a projected volume source

type ResourceFieldSelector

type ResourceFieldSelector struct {
	ContainerName string `json:"containerName,omitempty"`
	Divisor       string `json:"divisor,omitempty"`
	Resource      string `json:"resource"`
}

ResourceFieldSelector selects a resource of the container

type ResourceRequirements

type ResourceRequirements struct {
	Limits   map[string]string `json:"limits,omitempty"`
	Requests map[string]string `json:"requests,omitempty"`
}

ResourceRequirements represents compute resource requirements

type SecretEnvSource

type SecretEnvSource struct {
	Name     string `json:"name,omitempty"`
	Optional *bool  `json:"optional,omitempty"`
}

SecretEnvSource selects a Secret to populate environment variables

type SecretKeySelector

type SecretKeySelector struct {
	Key      string `json:"key"`
	Name     string `json:"name,omitempty"`
	Optional *bool  `json:"optional,omitempty"`
}

SecretKeySelector selects a key from a Secret

type SecretProjection

type SecretProjection struct {
	Items    []KeyToPath `json:"items,omitempty"`
	Name     string      `json:"name,omitempty"`
	Optional *bool       `json:"optional,omitempty"`
}

SecretProjection adapts a Secret into a projected volume

type SecretVolumeSource

type SecretVolumeSource struct {
	DefaultMode *int32      `json:"defaultMode,omitempty"`
	Items       []KeyToPath `json:"items,omitempty"`
	Optional    *bool       `json:"optional,omitempty"`
	SecretName  string      `json:"secretName,omitempty"`
}

SecretVolumeSource adapts a Secret into a volume

type SecurityContext

type SecurityContext struct {
	Capabilities           *Capabilities `json:"capabilities,omitempty"`
	ProcMount              string        `json:"procMount,omitempty"`
	ReadOnlyRootFilesystem *bool         `json:"readOnlyRootFilesystem,omitempty"`
	RunAsGroup             *int64        `json:"runAsGroup,omitempty"`
	RunAsNonRoot           *bool         `json:"runAsNonRoot,omitempty"`
	RunAsUser              *int64        `json:"runAsUser,omitempty"`
}

SecurityContext represents security options for a container

type Sysctl

type Sysctl struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Sysctl represents a kernel parameter to be set

type TCPSocketAction

type TCPSocketAction struct {
	Host string `json:"host,omitempty"`
	Port string `json:"port"`
}

TCPSocketAction represents a TCP socket action

type Toleration added in v0.9.6

type Toleration struct {
	// Effect indicates the taint effect to match. Empty means match all taint effects.
	Effect string `json:"effect,omitempty"`

	// Key is the taint key that the toleration applies to. Empty means match all taint keys.
	Key string `json:"key,omitempty"`

	// Operator represents a key's relationship to the value. Valid operators are Exists and Equal.
	Operator string `json:"operator,omitempty"`

	// TolerationSeconds represents the period of time the toleration tolerates the taint.
	TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"`

	// Value is the taint value the toleration matches to.
	Value string `json:"value,omitempty"`
}

Toleration represents a toleration that is applied to a pod to schedule it onto nodes with matching taints

type TopologySpreadConstraint

type TopologySpreadConstraint struct {
	LabelSelector      *LabelSelector `json:"labelSelector,omitempty"`
	MatchLabelKeys     []string       `json:"matchLabelKeys,omitempty"`
	MaxSkew            int32          `json:"maxSkew"`
	MinDomains         *int32         `json:"minDomains,omitempty"`
	NodeAffinityPolicy string         `json:"nodeAffinityPolicy,omitempty"`
	NodeTaintsPolicy   string         `json:"nodeTaintsPolicy,omitempty"`
	TopologyKey        string         `json:"topologyKey"`
	WhenUnsatisfiable  string         `json:"whenUnsatisfiable"`
}

TopologySpreadConstraint represents how to spread pods

type TypedLocalObjectReference

type TypedLocalObjectReference struct {
	APIGroup string `json:"apiGroup,omitempty"`
	Kind     string `json:"kind"`
	Name     string `json:"name"`
}

TypedLocalObjectReference contains enough information to locate the referenced object

type UpdateOpts added in v0.9.6

type UpdateOpts struct {
	// DryRun when present, indicates that modifications should not be persisted
	DryRun string `json:"-" q:"dryRun,omitempty"`

	// FieldManager is a name associated with the actor or entity making these changes
	FieldManager string `json:"-" q:"fieldManager,omitempty"`

	// Pretty if 'true', then the output is pretty printed
	Pretty string `json:"-" q:"pretty,omitempty"`

	Pod
}

UpdateOpts contains the options for updating a pod

type Volume

type Volume struct {
	ConfigMap             *ConfigMapVolumeSource             `json:"configMap,omitempty"`
	DownwardAPI           *DownwardAPIVolumeSource           `json:"downwardAPI,omitempty"`
	EmptyDir              *EmptyDirVolumeSource              `json:"emptyDir,omitempty"`
	Ephemeral             *EphemeralVolumeSource             `json:"ephemeral,omitempty"`
	Name                  string                             `json:"name"`
	NFS                   *NFSVolumeSource                   `json:"nfs,omitempty"`
	PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
	Projected             *ProjectedVolumeSource             `json:"projected,omitempty"`
	Secret                *SecretVolumeSource                `json:"secret,omitempty"`
}

Volume represents a pod volume

type VolumeMount

type VolumeMount struct {
	ExtendPathMode string `json:"extendPathMode,omitempty"`
	MountPath      string `json:"mountPath"`
	Name           string `json:"name"`
	ReadOnly       bool   `json:"readOnly,omitempty"`
	SubPath        string `json:"subPath,omitempty"`
	SubPathExpr    string `json:"subPathExpr,omitempty"`
}

VolumeMount represents the mounting of a volume in a container

type VolumeProjection

type VolumeProjection struct {
	ConfigMap   *ConfigMapProjection   `json:"configMap,omitempty"`
	DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty"`
	Secret      *SecretProjection      `json:"secret,omitempty"`
}

VolumeProjection represents a projected volume source

type WeightedPodAffinityTerm

type WeightedPodAffinityTerm struct {
	PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm"`
	Weight          int32           `json:"weight"`
}

WeightedPodAffinityTerm represents a weighted pod affinity term

Jump to

Keyboard shortcuts

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