pod

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEALTH_API_PATH = "/api/health"
)

Variables

This section is empty.

Functions

func Annotations

func Annotations(spec v1.SpecInterface) map[string]string

func ContainerSecurityContext added in v1.7.1

func ContainerSecurityContext(spec v1.SpecInterface) *corev1.SecurityContext

func Count added in v1.8.0

func Count(podList v1.PodList) (creating, ready, failed []string)

func Envs

func Envs(spec v1.SpecInterface, config map[string]interface{},
	feExternalServiceName string, namespace string, envs []corev1.EnvVar) []corev1.EnvVar

func IsSpecialStorageClass added in v1.9.0

func IsSpecialStorageClass(storageClassName *string) bool

func Labels

func Labels(clusterName string, spec v1.SpecInterface) map[string]string

func LifeCycle

func LifeCycle(lifeCycle *corev1.Lifecycle, preStopScriptPath string) *corev1.Lifecycle

LifeCycle returns a lifecycle.

func LivenessProbe

func LivenessProbe(livenessProbeFailureSeconds *int32, port int32, path string) *corev1.Probe

LivenessProbe returns a liveness probe.

func MountConfigMapInfo

func MountConfigMapInfo(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount,
	cmInfo v1.ConfigMapInfo, mountPath string) ([]corev1.Volume, []corev1.VolumeMount)

MountConfigMapInfo parse ConfigMapInfo from spec and mount them to pod. Note: we can not reuse MountConfigMaps because it generates a volume name by call getVolumeName,

func MountConfigMaps

func MountConfigMaps(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount,
	references []v1.ConfigMapReference) ([]corev1.Volume, []corev1.VolumeMount)

func MountEmptyDirVolume added in v1.9.0

func MountEmptyDirVolume(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount,
	volumeName, mountPath, subPath string) ([]corev1.Volume, []corev1.VolumeMount)

func MountHostPathVolume added in v1.9.3

func MountHostPathVolume(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount,
	volumeName string, mountPath string, subPath string,
	hostPath *corev1.HostPathVolumeSource) ([]corev1.Volume, []corev1.VolumeMount)

func MountPersistentVolumeClaim added in v1.9.0

func MountPersistentVolumeClaim(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount,
	volumeName, mountPath, subPath string) ([]corev1.Volume, []corev1.VolumeMount)

func MountSecrets

func MountSecrets(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount,
	references []v1.SecretReference) ([]corev1.Volume, []corev1.VolumeMount)

func MountStorageVolumes

func MountStorageVolumes(spec v1.SpecInterface) ([]corev1.Volume, []corev1.VolumeMount)

MountStorageVolumes parse StorageVolumes from spec and mount them to pod. If StorageClassName is EmptyDir, mount an emptyDir volume to pod.

func PodSecurityContext added in v1.7.1

func PodSecurityContext(spec v1.SpecInterface) *corev1.PodSecurityContext

func Ports

func Ports(spec v1.SpecInterface, config map[string]interface{}) []corev1.ContainerPort

func ReadinessProbe

func ReadinessProbe(readinessProbeFailureSeconds *int32, port int32, path string) *corev1.Probe

ReadinessProbe returns a readiness probe.

func Spec

func Spec(spec v1.SpecInterface, container corev1.Container, volumes []corev1.Volume) corev1.PodSpec

func StartupProbe

func StartupProbe(startupProbeFailureSeconds *int32, port int32, path string) *corev1.Probe

StartupProbe returns a startup probe.

func Status added in v1.8.0

func Status(podList v1.PodList) map[string]PodStatus

Status return the status of pods.

Types

type PodStatus added in v1.8.0

type PodStatus struct {
	Phase  v1.PodPhase
	Reason string
}

Jump to

Keyboard shortcuts

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