isolation

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsolationResult

type IsolationResult struct {
	// contains filtered or unexported fields
}

func NewIsolationResult

func NewIsolationResult(pid int, slice string, controller []string) *IsolationResult

func NodeIsolationResult

func NodeIsolationResult() *IsolationResult

func (*IsolationResult) Controller

func (r *IsolationResult) Controller() []string

func (*IsolationResult) MountRoot

func (r *IsolationResult) MountRoot() string

func (*IsolationResult) NetNamespace

func (r *IsolationResult) NetNamespace() string

func (*IsolationResult) PIDNamespace

func (r *IsolationResult) PIDNamespace() string

func (*IsolationResult) Pid

func (r *IsolationResult) Pid() int

func (*IsolationResult) Slice

func (r *IsolationResult) Slice() string

type MockPodIsolationDetector

type MockPodIsolationDetector struct {
	// contains filtered or unexported fields
}

Mock of PodIsolationDetector interface

func NewMockPodIsolationDetector

func NewMockPodIsolationDetector(ctrl *gomock.Controller) *MockPodIsolationDetector

func (*MockPodIsolationDetector) Detect

func (*MockPodIsolationDetector) EXPECT

func (_m *MockPodIsolationDetector) EXPECT() *_MockPodIsolationDetectorRecorder

func (*MockPodIsolationDetector) Whitelist

func (_m *MockPodIsolationDetector) Whitelist(controller []string) PodIsolationDetector

type PodIsolationDetector

type PodIsolationDetector interface {
	// Detect takes a vm, looks up a socket based the VM and detects pid, cgroups and namespaces of the owner of that socket.
	// It returns an IsolationResult containing all isolation information
	Detect(vm *v1.VirtualMachineInstance) (*IsolationResult, error)

	// Whitelist allows specifying cgroup controller which should be considered to detect the cgroup slice
	// It returns a PodIsolationDetector to allow configuring the PodIsolationDetector via the builder pattern.
	Whitelist(controller []string) PodIsolationDetector
}

PodIsolationDetector helps detecting cgroups, namespaces and PIDs of Pods from outside of them. Different strategies may be applied to do that.

func NewSocketBasedIsolationDetector

func NewSocketBasedIsolationDetector(socketDir string) PodIsolationDetector

NewSocketBasedIsolationDetector takes socketDir and creates a socket based IsolationDetector It returns a PodIsolationDetector which detects pid, cgroups and namespaces of the socket owner.

Jump to

Keyboard shortcuts

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