{"modulePath":"github.com/openshift/hypershift","version":"v0.1.89","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package podspec\n\n## Constants\n\n```go\nconst (\n\t// CPOImageName is the name under which components can find the CPO image in the release image..\n\tCPOImageName = \"controlplane-operator\"\n\n\t// CPPKIOImageName is the name under which components can find the CP PKI Operator image in the release image..\n\tCPPKIOImageName = \"controlplane-pki-operator\"\n\n\t// AvailabilityProberImageName is the name under which components can find the availability prober\n\t// image in the release image.\n\tAvailabilityProberImageName = \"availability-prober\"\n\n\t// PodTmpDirMountName is a name for a volume created in each pod by the CPO that gives the pods containers a place to mount and write temporary files to.\n\tPodTmpDirMountName = \"tmp-dir\"\n\t// PodTmpDirMountPath is the path that each container created by the CPO will mount the volume PodTmpDirMountName at.\n\tPodTmpDirMountPath = \"/tmp\"\n)\n```\n\n## Functions\n\n```go\nfunc AvailabilityProber(target string, image string, spec *corev1.PodSpec, o ...AvailabilityProberOpt)\n```\n\n```go\nfunc BuildContainer(container *corev1.Container, buildFn func(*corev1.Container)) corev1.Container\n```\n\n```go\nfunc BuildVolume(volume *corev1.Volume, buildFn func(*corev1.Volume)) corev1.Volume\n```\n\n```go\nfunc ContainerPort(pod *corev1.Pod, portName string, defaultPort int32) int32\n```\nContainerPort returns the container port matching the given name, or the default port if no matching named port is found.\n\n```go\nfunc DeploymentAddKubevirtInfraCredentials(deployment *appsv1.Deployment)\n```\n\n```go\nfunc DeploymentAddTrustBundleVolume(trustBundleConfigMap *corev1.LocalObjectReference, deployment *appsv1.Deployment)\n```\n\n```go\nfunc EnforceRestrictedSecurityContextToContainers(podSpec *corev1.PodSpec) error\n```\nEnforceRestrictedSecurityContextToContainers enforces restricted pod security standards on all containers and init containers in a PodSpec. Only NET\\_BIND\\_SERVICE capability is allowed.\n\n```go\nfunc FindContainer(name string, containers []corev1.Container) *corev1.Container\n```\n\n```go\nfunc FindEnvVar(name string, envVars []corev1.EnvVar) *corev1.EnvVar\n```\n\n```go\nfunc FindVolume(name string, volumes []corev1.Volume) *corev1.Volume\n```\n\n```go\nfunc FindVolumeMount(name string, mounts []corev1.VolumeMount) *corev1.VolumeMount\n```\n\n```go\nfunc IsDeploymentReady(_ context.Context, deployment *appsv1.Deployment) bool\n```\n\n```go\nfunc IsPodReady(pod *corev1.Pod) bool\n```\nIsPodReady returns true if the pod has a Ready condition with status True.\n\n```go\nfunc IsStatefulSetReady(_ context.Context, statefulSet *appsv1.StatefulSet) bool\n```\n\n```go\nfunc KASReadinessCheckContainer(kasLivezURL string) corev1.Container\n```\nKASReadinessCheckContainer returns a sidecar container that probes the KAS /livez endpoint. When KAS is unreachable, the readiness probe fails and the pod goes unready, which prevents PDB from treating it as healthy during eviction decisions. This uses /livez (not /readyz) to avoid a circular dependency: KAS /readyz checks aggregated API servers, which include OAS and OAuth API Server.\n\nThe probe execs curl directly, without a shell wrapper. On probe timeout the container runtime kills only the process it forked; when that was a shell, its curl child was orphaned onto PID 1 (\\`sleep\\`, which never reaps) and left behind as a zombie pinning its seccomp BPF filter until the memlock limit was exhausted.\n\n```go\nfunc RemoveContainer(name string, podSpec *corev1.PodSpec)\n```\n\n```go\nfunc RemoveInitContainer(name string, podSpec *corev1.PodSpec)\n```\n\n```go\nfunc UpdateContainer(name string, containers []corev1.Container, update func(c *corev1.Container))\n```\n\n```go\nfunc UpdateVolume(name string, volumes []corev1.Volume, update func(v *corev1.Volume))\n```\n\n```go\nfunc UpsertEnvVar(c *corev1.Container, envVar corev1.EnvVar)\n```\n\n```go\nfunc UpsertEnvVars(c *corev1.Container, envVars []corev1.EnvVar)\n```\n\n## Types\n\n```go\ntype AvailabilityProberOpt func(*AvailabilityProberOpts)\n```\n\n```go\nfunc WithOptions(opts *AvailabilityProberOpts) AvailabilityProberOpt\n```\n\n```go\ntype AvailabilityProberOpts struct {\n\tKubeconfigVolumeName          string\n\tRequiredAPIs                  []schema.GroupVersionKind\n\tWaitForInfrastructureResource bool\n\tWaitForLabeledPodsGone        string\n\tWaitForClusterRolebinding     string\n}\n```\n\n```go\ntype ContainerMounts map[string]string\n```\n\n```go\ntype VolumeMounts map[string]ContainerMounts\n```\n\n```go\nfunc (m VolumeMounts) ContainerMounts(container string) []corev1.VolumeMount\n```\n\n```go\nfunc (m VolumeMounts) Path(container, volume string) string\n```\n\n","path":"github.com/openshift/hypershift/support/podspec","name":"podspec","synopsis":"","isRedistributable":true}
