kubernetesk8s.io/kubernetes/pkg/kubelet/userns Index | Files

package userns

import "k8s.io/kubernetes/pkg/kubelet/userns"

Index

Functions

func EnabledUserNamespacesSupport

func EnabledUserNamespacesSupport() bool

Types

type UsernsManager

type UsernsManager struct {
	// contains filtered or unexported fields
}

func MakeUserNsManager

func MakeUserNsManager(logger klog.Logger, kl userNsPodsManager, idsPerPod *int64) (*UsernsManager, error)

func (*UsernsManager) CleanupOrphanedPodUsernsAllocations

func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(ctx context.Context, pods []*v1.Pod, runningPods []*kubecontainer.Pod) error

CleanupOrphanedPodUsernsAllocations reconciliates the state of user namespace allocations with the pods actually running. It frees any user namespace allocation for orphaned pods.

func (*UsernsManager) GetOrCreateUserNamespaceMappings

func (m *UsernsManager) GetOrCreateUserNamespaceMappings(ctx context.Context, pod *v1.Pod, runtimeHandler string) (*runtimeapi.UserNamespace, error)

GetOrCreateUserNamespaceMappings returns the configuration for the sandbox user namespace

func (*UsernsManager) Release

func (m *UsernsManager) Release(logger klog.Logger, podUID types.UID)

Release releases the user namespace allocated to the specified pod.

Source Files

types.go userns_manager.go

Version
v1.35.1 (latest)
Published
Feb 10, 2026
Platform
linux/amd64
Imports
18 packages
Last checked
2 months ago

Tools for package owners.