package user

import "k8s.io/kubernetes/pkg/security/podsecuritypolicy/user"

Package user contains code for validating and defaulting the UID of a pod or container according to a security policy.

Index

Types

type RunAsUserStrategy

type RunAsUserStrategy interface {
	// Generate creates the uid based on policy rules.
	Generate(pod *api.Pod, container *api.Container) (*types.UnixUserID, error)
	// Validate ensures that the specified values fall within the range of the strategy.
	Validate(pod *api.Pod, container *api.Container) field.ErrorList
}

RunAsUserStrategy defines the interface for all uid constraint strategies.

func NewMustRunAs

NewMustRunAs provides a strategy that requires the container to run as a specific UID in a range.

func NewRunAsAny

NewRunAsAny provides a strategy that will return nil.

func NewRunAsNonRoot

func NewRunAsNonRoot(options *extensions.RunAsUserStrategyOptions) (RunAsUserStrategy, error)

Source Files

doc.go mustrunas.go nonroot.go runasany.go types.go

Version
v1.8.0-alpha.1
Published
Jun 19, 2017
Platform
js/wasm
Imports
6 packages
Last checked
6 seconds ago

Tools for package owners.