kubernetes: k8s.io/kubernetes/pkg/capabilities Index | Files

package capabilities

import "k8s.io/kubernetes/pkg/capabilities"

Package capabilities manages system level capabilities

Index

Package Files

capabilities.go doc.go

func Initialize Uses

func Initialize(c Capabilities)

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

func SetForTests Uses

func SetForTests(c Capabilities)

SetForTests sets capabilities for tests. Convenience method for testing. This should only be called from tests.

func Setup Uses

func Setup(allowPrivileged bool, perConnectionBytesPerSec int64)

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

type Capabilities Uses

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 Uses

func Get() Capabilities

Get returns a read-only copy of the system capabilities.

type PrivilegedSources Uses

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.

Package capabilities imports 1 packages (graph) and is imported by 469 packages. Updated 2019-05-24. Refresh now. Tools for package owners.