mco

package
v0.0.0-...-611367d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListMCPWaitToBeStableFor

func ListMCPWaitToBeStableFor(
	apiClient *clients.Settings, stableDuration, timeout time.Duration, options ...metav1.ListOptions) error

ListMCPWaitToBeStableFor waits for a given MachineConfigurationPool to be stable for a given period.

Types

type AdditionalOptions

type AdditionalOptions func(builder *KubeletConfigBuilder) (*KubeletConfigBuilder, error)

AdditionalOptions for kubeletconfig object.

type KubeletConfigBuilder

type KubeletConfigBuilder struct {
	// KubeletConfig definition. Used to create KubeletConfig object with minimum set of required elements.
	Definition *mcv1.KubeletConfig
	// Created KubeletConfig object on the cluster.
	Object *mcv1.KubeletConfig
	// contains filtered or unexported fields
}

KubeletConfigBuilder provides struct for KubeletConfig Object which contains connection to cluster and KubeletConfig definitions.

func NewKubeletConfigBuilder

func NewKubeletConfigBuilder(apiClient *clients.Settings, name string) *KubeletConfigBuilder

NewKubeletConfigBuilder provides struct for KubeletConfig object which contains connection to cluster and KubeletConfig definition.

func PullKubeletConfig

func PullKubeletConfig(apiClient *clients.Settings, name string) (*KubeletConfigBuilder, error)

PullKubeletConfig fetches existing kubeletconfig from cluster.

func (*KubeletConfigBuilder) Create

func (builder *KubeletConfigBuilder) Create() (*KubeletConfigBuilder, error)

Create generates a kubeletconfig in the cluster and stores the created object in struct.

func (*KubeletConfigBuilder) Delete

func (builder *KubeletConfigBuilder) Delete() error

Delete removes the kubeletconfig.

func (*KubeletConfigBuilder) Exists

func (builder *KubeletConfigBuilder) Exists() bool

Exists checks whether the given kubeletconfig exists.

func (*KubeletConfigBuilder) WithMCPoolSelector

func (builder *KubeletConfigBuilder) WithMCPoolSelector(key, value string) *KubeletConfigBuilder

WithMCPoolSelector redefines kubeletconfig definition with the given machineConfigPoolSelector field.

func (*KubeletConfigBuilder) WithOptions

func (builder *KubeletConfigBuilder) WithOptions(options ...AdditionalOptions) *KubeletConfigBuilder

WithOptions creates the kubeletconfig with generic mutation options.

func (*KubeletConfigBuilder) WithSystemReserved

func (builder *KubeletConfigBuilder) WithSystemReserved(cpu, memory string) *KubeletConfigBuilder

WithSystemReserved redefines kubeletconfig definition with the given systemreserved fields.

type MCAdditionalOptions

type MCAdditionalOptions func(builder *MCBuilder) (*MCBuilder, error)

MCAdditionalOptions for machineconfig object.

type MCBuilder

type MCBuilder struct {
	// MachineConfig definition. Used to create MachineConfig object with minimum set of required elements.
	Definition *mcv1.MachineConfig
	// Created MachineConfig object on the cluster.
	Object *mcv1.MachineConfig
	// contains filtered or unexported fields
}

MCBuilder provides struct for MachineConfig Object which contains connection to cluster and MachineConfig definitions.

func NewMCBuilder

func NewMCBuilder(apiClient *clients.Settings, name string) *MCBuilder

NewMCBuilder provides struct for MachineConfig object which contains connection to cluster and MachineConfig definition.

func PullMachineConfig

func PullMachineConfig(apiClient *clients.Settings, name string) (*MCBuilder, error)

PullMachineConfig fetches existing machineconfig from cluster.

func (*MCBuilder) Create

func (builder *MCBuilder) Create() (*MCBuilder, error)

Create generates a machineconfig in the cluster and stores the created object in struct.

func (*MCBuilder) Delete

func (builder *MCBuilder) Delete() error

Delete removes the machineconfig.

func (*MCBuilder) Exists

func (builder *MCBuilder) Exists() bool

Exists checks whether the given machineconfig exists.

func (*MCBuilder) Update

func (builder *MCBuilder) Update() (*MCBuilder, error)

Update renovates the existing machineconfig object with machineconfig definition in builder.

func (*MCBuilder) WithExtensions

func (builder *MCBuilder) WithExtensions(extensions []string) *MCBuilder

WithExtensions sets the specified Extensions to the MachineConfig.

func (*MCBuilder) WithFIPS

func (builder *MCBuilder) WithFIPS(fips bool) *MCBuilder

WithFIPS sets the specified FIPS value to the MachineConfig.

func (*MCBuilder) WithKernelArguments

func (builder *MCBuilder) WithKernelArguments(kernelArgs []string) *MCBuilder

WithKernelArguments sets the specified KernelArguments to the MachineConfig.

func (*MCBuilder) WithKernelType

func (builder *MCBuilder) WithKernelType(kernelType string) *MCBuilder

WithKernelType sets the specified kernelType to the MachineConfig.

func (*MCBuilder) WithLabel

func (builder *MCBuilder) WithLabel(key, value string) *MCBuilder

WithLabel redefines machineconfig definition with the given label.

func (*MCBuilder) WithOptions

func (builder *MCBuilder) WithOptions(options ...MCAdditionalOptions) *MCBuilder

WithOptions creates the machineconfig with generic mutation options.

type MCPAdditionalOptions

type MCPAdditionalOptions func(builder *MCPBuilder) (*MCPBuilder, error)

MCPAdditionalOptions additional options for mcp object.

type MCPBuilder

type MCPBuilder struct {
	// MachineConfigPool definition. Used to create MachineConfigPool object with minimum set of required elements.
	Definition *mcov1.MachineConfigPool
	// Created MachineConfigPool object on the cluster.
	Object *mcov1.MachineConfigPool
	// contains filtered or unexported fields
}

MCPBuilder provides struct for MachineConfigPool object which contains connection to cluster and MachineConfigPool definitions.

func ListMCP

func ListMCP(apiClient *clients.Settings, options ...metav1.ListOptions) ([]*MCPBuilder, error)

ListMCP returns a list of MachineConfigPoolBuilder.

func ListMCPByMachineConfigSelector

func ListMCPByMachineConfigSelector(
	apiClient *clients.Settings, mcpLabel string, options ...metav1.ListOptions) (*MCPBuilder, error)

ListMCPByMachineConfigSelector returns a list of MachineConfigurationPoolBuilders for given selector.

func NewMCPBuilder

func NewMCPBuilder(apiClient *clients.Settings, mcpName string) *MCPBuilder

NewMCPBuilder method creates new instance of builder.

func Pull

func Pull(apiClient *clients.Settings, name string) (*MCPBuilder, error)

Pull pulls existing machineconfigpool from cluster.

func (*MCPBuilder) Create

func (builder *MCPBuilder) Create() (*MCPBuilder, error)

Create makes a MachineConfigPool in cluster and stores the created object in struct.

func (*MCPBuilder) Delete

func (builder *MCPBuilder) Delete() error

Delete removes a MachineConfigPool object from a cluster.

func (*MCPBuilder) Exists

func (builder *MCPBuilder) Exists() bool

Exists checks whether the given MachineConfigPool exists.

func (*MCPBuilder) IsInCondition

func (builder *MCPBuilder) IsInCondition(mcpConditionType mcov1.MachineConfigPoolConditionType) bool

IsInCondition parses MachineConfigPool conditions. Returns true if given MachineConfigPool is in given condition, otherwise false.

func (*MCPBuilder) WaitForUpdate

func (builder *MCPBuilder) WaitForUpdate(timeout time.Duration) error

WaitForUpdate waits for a MachineConfigPool to be updating and then updated.

func (*MCPBuilder) WaitToBeInCondition

func (builder *MCPBuilder) WaitToBeInCondition(
	conditionType mcov1.MachineConfigPoolConditionType,
	conditionStatus corev1.ConditionStatus,
	timeout time.Duration,
) error

WaitToBeInCondition waits for a specific time duration until the MachineConfigPool will have a specified condition type with the expected status.

func (*MCPBuilder) WaitToBeStableFor

func (builder *MCPBuilder) WaitToBeStableFor(stableDuration time.Duration, timeout time.Duration) error

WaitToBeStableFor waits on MachineConfigPool to stable for a time duration or until timeout.

func (*MCPBuilder) WithMcSelector

func (builder *MCPBuilder) WithMcSelector(mcSelector map[string]string) *MCPBuilder

WithMcSelector defines the machineConfigSelector in the machine config pool.

func (*MCPBuilder) WithOptions

func (builder *MCPBuilder) WithOptions(options ...MCPAdditionalOptions) *MCPBuilder

WithOptions creates mcp with generic mutation options.

Jump to

Keyboard shortcuts

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