kubeletconfig

package
v1.2.41 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: config.go

Generated by this command:

mockgen -source=config.go -package=kubeletconfig -destination=capability_checker_mock.go

Package kubeletconfig is a generated GoMock package.

Index

Constants

View Source
const (
	MinPodPidsLimit                = 4096
	MaxPodPidsLimit                = 16384
	MaxUnsafePodPidsLimit          = 3694303
	NameOption                     = "name"
	NameOptionDefaultValue         = ""
	NameOptionUsage                = "Name of the KubeletConfig (required for Hosted Control Plane clusters)"
	PodPidsLimitOption             = "pod-pids-limit"
	PodPidsLimitOptionUsage        = "Sets the requested pod_pids_limit for this KubeletConfig."
	PodPidsLimitOptionDefaultValue = 0
	InteractivePodPidsLimitPrompt  = "Pod Pids Limit?"
	InteractivePodPidsLimitHelp    = "Set the Pod Pids Limit field to a value between 4096 and %d"
	InteractiveNameHelpPrompt      = "Name?"
	InteractiveNameHelp            = "Name of the KubeletConfig"
	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 PrintKubeletConfigForClassic added in v1.2.40

func PrintKubeletConfigForClassic(config *cmv1.KubeletConfig) string

func PrintKubeletConfigForHcp added in v1.2.40

func PrintKubeletConfigForHcp(config *cmv1.KubeletConfig, nodePools []*cmv1.NodePool) string

func PrintKubeletConfigsForTabularOutput added in v1.2.40

func PrintKubeletConfigsForTabularOutput(configs []*cmv1.KubeletConfig) string

func PromptForName added in v1.2.40

func PromptForName(requestedName string, forceInteractive bool) (string, error)

func PromptToAcceptNodePoolNodeRecreate added in v1.2.40

func PromptToAcceptNodePoolNodeRecreate(r *rosa.Runtime) bool

func PromptUserToAcceptWorkerNodeReboot added in v1.2.40

func PromptUserToAcceptWorkerNodeReboot(operation KubeletOperation, r *rosa.Runtime) bool

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 KubeletConfigOptions added in v1.2.40

type KubeletConfigOptions struct {
	Name         string
	PodPidsLimit int
}

func NewKubeletConfigOptions added in v1.2.40

func NewKubeletConfigOptions() *KubeletConfigOptions

func (*KubeletConfigOptions) AddAllFlags added in v1.2.40

func (k *KubeletConfigOptions) AddAllFlags(cmd *cobra.Command)

func (*KubeletConfigOptions) AddNameFlag added in v1.2.40

func (k *KubeletConfigOptions) AddNameFlag(cmd *cobra.Command)

func (*KubeletConfigOptions) BindFromArgs added in v1.2.40

func (k *KubeletConfigOptions) BindFromArgs(args []string)

BindFromArgs allows the user to use positional args for the name. The --name flag will take precedence

func (*KubeletConfigOptions) ValidateForHypershift added in v1.2.40

func (k *KubeletConfigOptions) ValidateForHypershift() error

type KubeletOperation added in v1.2.40

type KubeletOperation string
const (
	OperationDelete KubeletOperation = "delete"
	OperationEdit   KubeletOperation = "edit"
	OperationCreate KubeletOperation = "create"
)

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 any) *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