kubernetes: k8s.io/kubernetes/pkg/security/podsecuritypolicy/user Index | Files

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.


Package Files

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

type RunAsUserStrategy Uses

type RunAsUserStrategy interface {
    // Generate creates the uid based on policy rules.
    Generate(pod *api.Pod, container *api.Container) (*int64, error)
    // Validate ensures that the specified values fall within the range of the strategy.
    // scPath is the field path to the container's security context
    Validate(scPath *field.Path, pod *api.Pod, container *api.Container, runAsNonRoot *bool, runAsUser *int64) field.ErrorList

RunAsUserStrategy defines the interface for all uid constraint strategies.

func NewMustRunAs Uses

func NewMustRunAs(options *policy.RunAsUserStrategyOptions) (RunAsUserStrategy, error)

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

func NewRunAsAny Uses

func NewRunAsAny(options *policy.RunAsUserStrategyOptions) (RunAsUserStrategy, error)

NewRunAsAny provides a strategy that will return nil.

func NewRunAsNonRoot Uses

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

Package user imports 5 packages (graph) and is imported by 56 packages. Updated 2018-11-05. Refresh now. Tools for package owners.