package util

import "k8s.io/kubernetes/pkg/kubelet/kuberuntime/util"

Index

Functions

func IpcNamespaceForPod

func IpcNamespaceForPod(pod *v1.Pod) runtimeapi.NamespaceMode

IpcNamespaceForPod returns the runtimeapi.NamespaceMode for the IPC namespace of a pod

func NamespacesForPod

func NamespacesForPod(pod *v1.Pod, runtimeHelper kubecontainer.RuntimeHelper, rcManager RuntimeHandlerResolver) (*runtimeapi.NamespaceOption, error)

namespacesForPod returns the runtimeapi.NamespaceOption for a given pod. An empty or nil pod can be used to get the namespace defaults for v1.Pod.

func NetworkNamespaceForPod

func NetworkNamespaceForPod(pod *v1.Pod) runtimeapi.NamespaceMode

NetworkNamespaceForPod returns the runtimeapi.NamespaceMode for the network namespace of a pod

func PidNamespaceForPod

func PidNamespaceForPod(pod *v1.Pod) runtimeapi.NamespaceMode

PidNamespaceForPod returns the runtimeapi.NamespaceMode for the PID namespace of a pod

func PodSandboxChanged

func PodSandboxChanged(pod *v1.Pod, podStatus *kubecontainer.PodStatus) (bool, uint32, string)

PodSandboxChanged checks whether the spec of the pod is changed and returns (changed, new attempt, original sandboxID if exist).

Types

type RuntimeHandlerResolver

type RuntimeHandlerResolver interface {
	LookupRuntimeHandler(runtimeClassName *string) (string, error)
}

LookupRuntimeHandler is implemented by *runtimeclass.Manager.

Source Files

util.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
3 hours ago

Tools for package owners.