capabilities

package
v0.42.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 17

Documentation

Index

Constants

View Source
const All = "ALL"

All is a special value used to add/drop all known capabilities. Useful on the CLI for `--cap-add=all` etc.

Variables

View Source
var (

	// ErrUnknownCapability is thrown when an unknown capability is processed.
	ErrUnknownCapability = errors.New("unknown capability")

	// ContainerImageLabels - label can indicate the required
	// capabilities required by containers to run the container image.
	ContainerImageLabels = []string{"io.containers.capabilities"}
)

Functions

func AllCapabilities

func AllCapabilities() []string

AllCapabilities returns all known capabilities.

func BoundingSet added in v0.35.3

func BoundingSet() ([]string, error)

BoundingSet returns the capabilities in the current bounding set

func MergeCapabilities

func MergeCapabilities(base, adds, drops []string) ([]string, error)

MergeCapabilities computes a set of capabilities by adding capabilities to or dropping them from base.

Note that: "ALL" in capAdd adds returns known capabilities "All" in capDrop returns only the capabilities specified in capAdd

func NormalizeCapabilities added in v0.14.8

func NormalizeCapabilities(caps []string) ([]string, error)

NormalizeCapabilities normalizes caps by adding a "CAP_" prefix (if not yet present).

func ValidateCapabilities

func ValidateCapabilities(caps []string) error

ValidateCapabilities validates if caps only contains valid capabilities.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL