client-gok8s.io/client-go/1.4/pkg/capabilities Index | Files

package capabilities

import "k8s.io/client-go/1.4/pkg/capabilities"

package capabilities manages system level capabilities

Index

Functions

func Initialize

func Initialize(c Capabilities)

Initialize the capability set. This can only be done once per binary, subsequent calls are ignored.

func SetForTests

func SetForTests(c Capabilities)

SetCapabilitiesForTests. Convenience method for testing. This should only be called from tests.

func Setup

func Setup(allowPrivileged bool, privilegedSources PrivilegedSources, perConnectionBytesPerSec int64)

Setup the capability set. It wraps Initialize for improving usability.

Types

type Capabilities

type Capabilities struct {
	AllowPrivileged bool

	// Pod sources from which to allow privileged capabilities like host networking, sharing the host
	// IPC namespace, and sharing the host PID namespace.
	PrivilegedSources PrivilegedSources

	// PerConnectionBandwidthLimitBytesPerSec limits the throughput of each connection (currently only used for proxy, exec, attach)
	PerConnectionBandwidthLimitBytesPerSec int64
}

Capabilities defines the set of capabilities available within the system. For now these are global. Eventually they may be per-user

func Get

func Get() Capabilities

Returns a read-only copy of the system capabilities.

type PrivilegedSources

type PrivilegedSources struct {
	// List of pod sources for which using host network is allowed.
	HostNetworkSources []string

	// List of pod sources for which using host pid namespace is allowed.
	HostPIDSources []string

	// List of pod sources for which using host ipc is allowed.
	HostIPCSources []string
}

PrivilegedSources defines the pod sources allowed to make privileged requests for certain types of capabilities like host networking, sharing the host IPC namespace, and sharing the host PID namespace.

Source Files

capabilities.go doc.go

Version
v1.4.0
Published
Oct 17, 2016
Platform
js/wasm
Imports
1 packages
Last checked
17 minutes ago

Tools for package owners.