package pod
import "k8s.io/kubernetes/pkg/api/v1/pod"
Index ¶
- Constants
- func FindPort(pod *v1.Pod, svcPort *v1.ServicePort) (int, error)
- func SetInitContainersAndStatuses(pod *v1.Pod) error
- func SetInitContainersAnnotations(pod *v1.Pod) error
- func SetInitContainersStatusesAnnotations(pod *v1.Pod) error
- func VisitPodSecretNames(pod *v1.Pod, visitor func(string) bool) bool
Constants ¶
const ( // TODO: to be de!eted after v1.3 is released. PodSpec has a dedicated Hostname field. // The annotation value is a string specifying the hostname to be used for the pod e.g 'my-webserver-1' PodHostnameAnnotation = "pod.beta.kubernetes.io/hostname" // TODO: to be de!eted after v1.3 is released. PodSpec has a dedicated Subdomain field. // The annotation value is a string specifying the subdomain e.g. "my-web-service" // If specified, on the pod itself, "<hostname>.my-web-service.<namespace>.svc.<cluster domain>" would resolve to // the pod's IP. // If there is a headless service named "my-web-service" in the same namespace as the pod, then, // <hostname>.my-web-service.<namespace>.svc.<cluster domain>" would be resolved by the cluster DNS Server. PodSubdomainAnnotation = "pod.beta.kubernetes.io/subdomain" )
Functions ¶
func FindPort ¶
FindPort locates the container port for the given pod and portName. If the targetPort is a number, use that. If the targetPort is a string, look that string up in all named ports in all containers in the target pod. If no match is found, fail.
func SetInitContainersAndStatuses ¶
TODO: remove this function when init containers becomes a stable feature
func SetInitContainersAnnotations ¶
TODO: remove this function when init containers becomes a stable feature
func SetInitContainersStatusesAnnotations ¶
TODO: remove this function when init containers becomes a stable feature
func VisitPodSecretNames ¶
VisitPodSecretNames invokes the visitor function with the name of every secret referenced by the pod spec. If visitor returns false, visiting is short-circuited. Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited. Returns true if visiting completed, false if visiting was short-circuited.
Source Files ¶
util.go
- Version
- v1.6.6
- Published
- Jun 16, 2017
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 6 minutes ago –
Tools for package owners.