pod

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// DefaultStartupProbeInitialDelaySeconds is the default  initial delay or the startup probe
	DefaultStartupProbeInitialDelaySeconds = 10

	// DefaultStartupProbePeriodSeconds is the default period for the startup probe
	DefaultStartupProbePeriodSeconds = 10

	// DefaultStartupProbeFailureThreshold is the default failure threshold  for the startup probe
	DefaultStartupProbeFailureThreshold = 10

	// DefaultStartupProbeSuccessThreshold is the default success threshold  for the startup probe
	DefaultStartupProbeSuccessThreshold = 1

	// DefaultStartupProbeTimeoutSeconds is the default timeout for the startup probe
	DefaultStartupProbeTimeoutSeconds = 1

	// DefaultReadinessProbeInitialDelaySeconds is the default  initial delay or the readiness probe
	DefaultReadinessProbeInitialDelaySeconds = 10

	// DefaultReadinessProbePeriodSeconds is the default period for the readiness probe
	DefaultReadinessProbePeriodSeconds = 10

	// DefaultReadinessProbeFailureThreshold is the default failure threshold  for the readiness probe
	DefaultReadinessProbeFailureThreshold = 5

	// DefaultReadinessProbeSuccessThreshold is the default success threshold  for the readiness probe
	DefaultReadinessProbeSuccessThreshold = 1

	// DefaultReadinessProbeTimeoutSeconds is the default timeout for the readiness probe
	DefaultReadinessProbeTimeoutSeconds = 1

	// DefaultLivenessProbeInitialDelaySeconds is the default initial delay for the liveness probe
	DefaultLivenessProbeInitialDelaySeconds = 10

	// DefaultLivenessProbePeriodSeconds is the default period for the liveness probe
	DefaultLivenessProbePeriodSeconds = 10

	// DefaultLivenessProbeFailureThreshold is the default failure threshold for the liveness probe
	DefaultLivenessProbeFailureThreshold = 5

	// DefaultLivenessProbeSuccessThreshold is the default success threshold for the liveness probe
	DefaultLivenessProbeSuccessThreshold = 1

	// DefaultLivenessProbeTimeoutSeconds is the default timeout for the liveness probe
	DefaultLivenessProbeTimeoutSeconds = 1
)

Variables

This section is empty.

Functions

func DecorateContainerEnvVars

func DecorateContainerEnvVars(envoySideCarStatus bool, sources ...v1.EnvVar) []v1.EnvVar

DecorateContainerEnvVars generate the pod environment variables

func IsReady added in v0.10.6

func IsReady(pod *v1.Pod) bool

IsReady checks if the pod is ready

func ListAllWithMatchingLabels added in v0.10.6

func ListAllWithMatchingLabels(cl client.Client, namespace string, labels map[string]string) (*v1.PodList, error)

ListAllWithMatchingLabels list the pods matching the labels

func ListAllWithMatchingLabelsByReadiness added in v0.10.6

func ListAllWithMatchingLabelsByReadiness(cl client.Client, namespace string, labels map[string]string) (ready []v1.Pod, unready []v1.Pod, err error)

ListAllWithMatchingLabelsByReadiness list the pods matching the labels

func NewSpec

func NewSpec(cfg basetype.PodConfig, volumes []v1.Volume, initContainers []v1.Container, containers []v1.Container) v1.PodSpec

func NewTemplateSpec

func NewTemplateSpec(name, generateName string, labels, annotations map[string]string, podSpec v1.PodSpec) v1.PodTemplateSpec

Types

type Probe added in v0.10.2

type Probe struct {
	// +kubebuilder:validation:Minimum=0
	// +optional
	InitialDelaySeconds int32 `json:"initialDelaySeconds"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	PeriodSeconds int32 `json:"periodSeconds"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	FailureThreshold int32 `json:"failureThreshold"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	SuccessThreshold int32 `json:"successThreshold"`
	// +kubebuilder:validation:Minimum=0
	// +optional
	TimeoutSeconds int32 `json:"timeoutSeconds"`
}

func (*Probe) ToK8sProbe added in v0.11.0

func (in *Probe) ToK8sProbe(handler v1.Handler) *v1.Probe

type Probes added in v0.10.2

type Probes struct {
	// +optional
	Startup *Probe `json:"startup"`
	// +optional
	Liveness *Probe `json:"liveness"`
	// +optional
	Readiness *Probe `json:"readiness"`
}

func (*Probes) DeepCopy added in v0.10.2

func (in *Probes) DeepCopy() *Probes

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probes.

func (*Probes) DeepCopyInto added in v0.10.2

func (in *Probes) DeepCopyInto(out *Probes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Probes) SetDefault added in v0.10.3

func (in *Probes) SetDefault() (changed bool)

SetDefault set the default values

Jump to

Keyboard shortcuts

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