pod

package
v0.13.10 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Affinity

type Affinity struct {
	NodeAffinity    *NodeAffinity
	PodAffinity     *PodAffinity
	PodAntiAffinity *PodAntiAffinity
}

Affinity represents Kubernetes Affinity

type Client

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

Client manages communication with the Kubernetes Pods.

func NewClient

func NewClient(clientset kubernetes.Interface) *Client

NewClient constructs a new Client.

func (*Client) Delete added in v0.4.1

func (c *Client) Delete(ctx context.Context, name, namespace string) (err error)

Delete deletes Pod

func (*Client) Set

func (c *Client) Set(ctx context.Context, name, namespace string, o Options) (pod *v1.Pod, err error)

Set updates Pod or creates it if it does not exist

type ConfigMapVolume

type ConfigMapVolume struct {
	Name          string
	ConfigMapName string
	DefaultMode   int32
	Items         Items
	Optional      bool
}

ConfigMapVolume represents Kubernetes ConfigMap Volume

type EmptyDirVolume

type EmptyDirVolume struct {
	Name      string
	Medium    string
	SizeLimit string
}

EmptyDirVolume represents Kubernetes EmptyDir Volume

type HostAlias

type HostAlias struct {
	IP        string
	Hostnames []string
}

HostAlias represents Kubernetes HostAliase

type HostAliases

type HostAliases []HostAlias

HostAliases represents Kubernetes HostAliases

type Item

type Item struct {
	Key   string
	Value string
}

Item represents Kubernetes Volume Item

type Items

type Items []Item

Items represents Kubernetes Volume Items

type NodeAffinity

type NodeAffinity struct {
	PreferredDuringSchedulingIgnoredDuringExecution PreferredSchedulingTerms
	RequiredDuringSchedulingIgnoredDuringExecution  NodeSelector
}

NodeAffinity represents Kubernetes NodeAffinity

type NodeSelector

type NodeSelector struct {
	NodeSelectorTerms NodeSelectorTerms
}

NodeSelector represents Kubernetes NodeSelector

type NodeSelectorRequirement

type NodeSelectorRequirement struct {
	Key      string
	Operator string
	Values   []string
}

NodeSelectorRequirement represents Kubernetes NodeSelectorRequirement

type NodeSelectorRequirements

type NodeSelectorRequirements []NodeSelectorRequirement

NodeSelectorRequirements represents Kubernetes NodeSelectorRequirements

type NodeSelectorTerm

type NodeSelectorTerm struct {
	MatchExpressions NodeSelectorRequirements
	MatchFields      NodeSelectorRequirements
}

NodeSelectorTerm represents Kubernetes NodeSelectorTerm

type NodeSelectorTerms

type NodeSelectorTerms []NodeSelectorTerm

NodeSelectorTerms represents Kubernetes NodeSelectorTerms

type Options

type Options struct {
	Annotations map[string]string
	Labels      map[string]string
	PodSpec     PodSpec
}

Options holds optional parameters for the Client.

type PodAffinity

type PodAffinity struct {
	PreferredDuringSchedulingIgnoredDuringExecution WeightedPodAffinityTerms
	RequiredDuringSchedulingIgnoredDuringExecution  PodAffinityTerms
}

PodAffinity represents Kubernetes PodAffinity

type PodAffinityTerm

type PodAffinityTerm struct {
	LabelSelector map[string]string
	Namespaces    []string
	TopologyKey   string
}

PodAffinityTerm represents Kubernetes PodAffinityTerm

type PodAffinityTerms

type PodAffinityTerms []PodAffinityTerm

PodAffinityTerms represents Kubernetes PodAffinityTerms

type PodAntiAffinity

type PodAntiAffinity struct {
	RequiredDuringSchedulingIgnoredDuringExecution  PodAffinityTerms
	PreferredDuringSchedulingIgnoredDuringExecution WeightedPodAffinityTerms
}

PodAntiAffinity represents Kubernetes PodAntiAffinity

type PodDNSConfig

type PodDNSConfig struct {
	Nameservers []string
	Searches    []string
	Options     PodDNSConfigOptions
}

PodDNSConfig represents Kubernetes Volume

type PodDNSConfigOption

type PodDNSConfigOption struct {
	Name  string
	Value string
}

PodDNSConfigOption represents Kubernetes PodDNSConfigOption

type PodDNSConfigOptions

type PodDNSConfigOptions []PodDNSConfigOption

PodDNSConfigOptions represents Kubernetes PodDNSConfigOptions

type PodReadinessGate

type PodReadinessGate struct {
	ConditionType string
}

PodReadinessGate represents Kubernetes PodReadinessGate

type PodReadinessGates

type PodReadinessGates []PodReadinessGate

PodReadinessGates represents Kubernetes PodReadinessGates

type PodSecurityContext

type PodSecurityContext struct {
	FSGroup             int64
	FSGroupChangePolicy string
	RunAsGroup          int64
	RunAsNonRoot        bool
	RunAsUser           int64
	SELinuxOptions      SELinuxOptions
	SupplementalGroups  []int64
	Sysctls             Sysctls
	WindowsOptions      WindowsOptions
}

PodSecurityContext represents Kubernetes PodSecurityContext

type PodSpec

type PodSpec struct {
	Affinity                      Affinity
	AutomountServiceAccountToken  bool
	Containers                    containers.Containers
	DNSConfig                     PodDNSConfig
	DNSPolicy                     string
	EphemeralContainers           containers.EphemeralContainers
	EnableServiceLinks            bool
	HostAliases                   HostAliases
	Hostname                      string
	HostNetwork                   bool
	HostPID                       bool
	HostIPC                       bool
	ImagePullSecrets              []string
	InitContainers                containers.Containers
	NodeName                      string
	NodeSelector                  map[string]string
	PodSecurityContext            PodSecurityContext
	PreemptionPolicy              string
	Priority                      int32
	PriorityClassName             string
	ReadinessGates                PodReadinessGates
	RestartPolicy                 string
	SchedulerName                 string
	ServiceAccountName            string
	ShareProcessNamespace         bool
	Subdomain                     string
	TerminationGracePeriodSeconds int64
	Tolerations                   Tolerations
	TopologySpreadConstraints     TopologySpreadConstraints
	Volumes                       Volumes
}

PodSpec represents Kubernetes PodSpec

type PodTemplateSpec

type PodTemplateSpec struct {
	Name        string
	Namespace   string
	Annotations map[string]string
	Labels      map[string]string
	Spec        PodSpec
}

PodTemplateSpec represents Kubernetes PodTemplateSpec

func (*PodTemplateSpec) ToK8S

func (pts *PodTemplateSpec) ToK8S() v1.PodTemplateSpec

ToK8S converts PodTemplateSpec to Kuberntes client objects

type PreferredSchedulingTerm

type PreferredSchedulingTerm struct {
	Preference NodeSelectorTerm
	Weight     int32
}

PreferredSchedulingTerm represents Kubernetes PreferredSchedulingTerm

type PreferredSchedulingTerms

type PreferredSchedulingTerms []PreferredSchedulingTerm

PreferredSchedulingTerms represents Kubernetes PreferredSchedulingTerms

type SELinuxOptions

type SELinuxOptions struct {
	User  string
	Role  string
	Type  string
	Level string
}

SELinuxOptions represents Kubernetes SELinuxOptions

type SecretVolume

type SecretVolume struct {
	Name        string
	SecretName  string
	DefaultMode int32
	Items       Items
	Optional    bool
}

SecretVolume represents Kubernetes Secret Volume

type Sysctl

type Sysctl struct {
	Name  string
	Value string
}

Sysctl represents Kubernetes Sysctl

type Sysctls

type Sysctls []Sysctl

Sysctls represents Kubernetes Sysctls

type Toleration

type Toleration struct {
	Key               string
	Operator          string
	Value             string
	Effect            string
	TolerationSeconds int64
}

Toleration represents Kubernetes Toleration

type Tolerations

type Tolerations []Toleration

Tolerations represents Kubernetes Tolerations

type TopologySpreadConstraint

type TopologySpreadConstraint struct {
	MaxSkew           int32
	TopologyKey       string
	WhenUnsatisfiable string
	LabelSelector     map[string]string
}

TopologySpreadConstraint represents Kubernetes TopologySpreadConstraint

type TopologySpreadConstraints

type TopologySpreadConstraints []TopologySpreadConstraint

TopologySpreadConstraints represents Kubernetes TopologySpreadConstraints

type Volume

type Volume struct {
	ConfigMap *ConfigMapVolume
	EmptyDir  *EmptyDirVolume
	Secret    *SecretVolume
}

Volume represents Kubernetes Volume

type Volumes

type Volumes []Volume

Volumes represents Kubernetes Volumes

type WeightedPodAffinityTerm

type WeightedPodAffinityTerm struct {
	PodAffinityTerm PodAffinityTerm
	Weight          int32
}

WeightedPodAffinityTerm represents Kubernetes WeightedPodAffinityTerm

type WeightedPodAffinityTerms

type WeightedPodAffinityTerms []WeightedPodAffinityTerm

WeightedPodAffinityTerms represents Kubernetes WeightedPodAffinityTerms

type WindowsOptions

type WindowsOptions struct {
	GMSACredentialSpecName string
	GMSACredentialSpec     string
	RunAsUserName          string
}

WindowsOptions represents Kubernetes WindowsSecurityContextOptions

Jump to

Keyboard shortcuts

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