Documentation ¶
Index ¶
- Constants
- func Annotations(spec v1.SpecInterface) map[string]string
- func ContainerSecurityContext(spec v1.SpecInterface) *corev1.SecurityContext
- func Count(podList v1.PodList) (creating, ready, failed []string)
- func Envs(spec v1.SpecInterface, config map[string]interface{}, ...) []corev1.EnvVar
- func IsSpecialStorageClass(storageClassName *string) bool
- func Labels(clusterName string, spec v1.SpecInterface) map[string]string
- func LifeCycle(preStopScriptPath string) *corev1.Lifecycle
- func LivenessProbe(livenessProbeFailureSeconds *int32, port int32, path string) *corev1.Probe
- func MountConfigMapInfo(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, ...) ([]corev1.Volume, []corev1.VolumeMount)
- func MountConfigMaps(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, ...) ([]corev1.Volume, []corev1.VolumeMount)
- func MountEmptyDirVolume(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, ...) ([]corev1.Volume, []corev1.VolumeMount)
- func MountPersistentVolumeClaim(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, ...) ([]corev1.Volume, []corev1.VolumeMount)
- func MountSecrets(volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, ...) ([]corev1.Volume, []corev1.VolumeMount)
- func MountStorageVolumes(spec v1.SpecInterface) ([]corev1.Volume, []corev1.VolumeMount, map[string]bool)
- func PodSecurityContext(spec v1.SpecInterface) *corev1.PodSecurityContext
- func Ports(spec v1.SpecInterface, config map[string]interface{}) []corev1.ContainerPort
- func ReadinessProbe(readinessProbeFailureSeconds *int32, port int32, path string) *corev1.Probe
- func Spec(spec v1.SpecInterface, container corev1.Container, volumes []corev1.Volume) corev1.PodSpec
- func StartupProbe(startupProbeFailureSeconds *int32, port int32, path string) *corev1.Probe
- func Status(podList v1.PodList) map[string]PodStatus
- type PodStatus
Constants ¶
View Source
const (
EmptyDir = "emptyDir"
)
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 IsSpecialStorageClass ¶ added in v1.9.0
func LivenessProbe ¶
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 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, map[string]bool)
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 ¶
ReadinessProbe returns a readiness probe.
func StartupProbe ¶
StartupProbe returns a startup probe.
Types ¶
Click to show internal directories.
Click to hide internal directories.