Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IsolationResult ¶
type IsolationResult struct {
// contains filtered or unexported fields
}
func NewIsolationResult ¶
func NewIsolationResult(pid int, slice string, controller []string) *IsolationResult
func (*IsolationResult) Controller ¶
func (r *IsolationResult) Controller() []string
func (*IsolationResult) Pid ¶
func (r *IsolationResult) Pid() int
func (*IsolationResult) PidNS ¶
func (r *IsolationResult) PidNS() string
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 (_m *MockPodIsolationDetector) Detect(vm *v1.VirtualMachine) (*IsolationResult, error)
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.VirtualMachine) (*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.
Click to show internal directories.
Click to hide internal directories.