kubeletconfig

package
v1.2.35-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package kubeletconfig is a generated GoMock package.

Index

Constants

View Source
const (
	MinPodPidsLimit                = 4096
	MaxPodPidsLimit                = 16384
	MaxUnsafePodPidsLimit          = 3694303
	PodPidsLimitOption             = "pod-pids-limit"
	PodPidsLimitOptionUsage        = "Sets the requested pod_pids_limit for your custom KubeletConfig."
	PodPidsLimitOptionDefaultValue = 0
	InteractivePodPidsLimitPrompt  = "Pod Pids Limit?"
	InteractivePodPidsLimitHelp    = "Set the Pod Pids Limit field to a value between 4096 and %d"
	ByPassPidsLimitCapability      = "capability.organization.bypass_pids_limits"
)

Variables

This section is empty.

Functions

func GetInteractiveInput

func GetInteractiveInput(maxPidsLimit int, kubeletConfig *v1.KubeletConfig) interactive.Input

func GetInteractiveMaxPidsLimitHelp

func GetInteractiveMaxPidsLimitHelp(maxPidsLimit int) string

func GetMaxPidsLimit

func GetMaxPidsLimit(client CapabilityChecker) (int, error)

GetMaxPidsLimit - returns the maximum pids limit for the current organization the maximum is varied depending on whether the current organizaton has the capability.organization.bypass_pids_limit capability

func ValidateOrPromptForRequestedPidsLimit

func ValidateOrPromptForRequestedPidsLimit(
	requestedPids int,
	clusterKey string,
	kubeletConfig *v1.KubeletConfig,
	r *rosa.Runtime) (int, error)

ValidateOrPromptForRequestedPidsLimit validates user provided limits or prompts via interactive mode if the user hasn't specified any limit on the command line.

Types

type CapabilityChecker

type CapabilityChecker interface {
	IsCapabilityEnabled(capability string) (bool, error)
}

type MockCapabilityChecker

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

MockCapabilityChecker is a mock of CapabilityChecker interface.

func NewMockCapabilityChecker

func NewMockCapabilityChecker(ctrl *gomock.Controller) *MockCapabilityChecker

NewMockCapabilityChecker creates a new mock instance.

func (*MockCapabilityChecker) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCapabilityChecker) IsCapabilityEnabled

func (m *MockCapabilityChecker) IsCapabilityEnabled(capability string) (bool, error)

IsCapabilityEnabled mocks base method.

type MockCapabilityCheckerMockRecorder

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

MockCapabilityCheckerMockRecorder is the mock recorder for MockCapabilityChecker.

func (*MockCapabilityCheckerMockRecorder) IsCapabilityEnabled

func (mr *MockCapabilityCheckerMockRecorder) IsCapabilityEnabled(capability interface{}) *gomock.Call

IsCapabilityEnabled indicates an expected call of IsCapabilityEnabled.

Jump to

Keyboard shortcuts

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