assisted

package
v0.0.0-...-75a2d0c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 23 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultStorageSpec

func GetDefaultStorageSpec(defaultStorageSize string) (corev1.PersistentVolumeClaimSpec, error)

GetDefaultStorageSpec returns a default PVC spec for the respective agentserviceconfig component's storage and a possible error.

func PullAgent

func PullAgent(apiClient *clients.Settings, name, nsname string) (*agentBuilder, error)

PullAgent pulls existing agent from cluster.

Types

type AgentAdditionalOptions

type AgentAdditionalOptions func(builder *agentBuilder) (*agentBuilder, error)

AgentAdditionalOptions additional options for agent object.

type AgentClusterInstallAdditionalOptions

type AgentClusterInstallAdditionalOptions func(builder *AgentClusterInstallBuilder) (*AgentClusterInstallBuilder, error)

AgentClusterInstallAdditionalOptions additional options for AgentClusterInstall object.

type AgentClusterInstallBuilder

type AgentClusterInstallBuilder struct {
	Definition *hiveextV1Beta1.AgentClusterInstall
	Object     *hiveextV1Beta1.AgentClusterInstall
	// contains filtered or unexported fields
}

AgentClusterInstallBuilder provides struct for the agentclusterinstall object containing connection to the cluster and the agentclusterinstall definitions.

func NewAgentClusterInstallBuilder

func NewAgentClusterInstallBuilder(
	apiClient *clients.Settings,
	name string,
	nsname string,
	clusterDeployment string,
	masterCount int,
	workerCount int,
	network hiveextV1Beta1.Networking) *AgentClusterInstallBuilder

NewAgentClusterInstallBuilder creates a new instance of AgentClusterInstallBuilder.

func PullAgentClusterInstall

func PullAgentClusterInstall(apiClient *clients.Settings, name, nsname string) (*AgentClusterInstallBuilder, error)

PullAgentClusterInstall pulls existing agentclusterinstall from cluster.

func (*AgentClusterInstallBuilder) Create

Create generates a agentclusterinstall on the cluster.

func (*AgentClusterInstallBuilder) Delete

func (builder *AgentClusterInstallBuilder) Delete() error

Delete removes an agentclusterinstall from the cluster.

func (*AgentClusterInstallBuilder) DeleteAndWait

func (builder *AgentClusterInstallBuilder) DeleteAndWait(timeout time.Duration) error

DeleteAndWait deletes an agentclusterinstall and waits until it is removed from the cluster.

func (*AgentClusterInstallBuilder) Exists

func (builder *AgentClusterInstallBuilder) Exists() bool

Exists checks if the defined agentclusterinstall has already been created.

func (*AgentClusterInstallBuilder) Get

Get fetches the defined agentclusterinstall from the cluster.

func (*AgentClusterInstallBuilder) GetEvents

func (builder *AgentClusterInstallBuilder) GetEvents(skipCertVerify bool) (models.EventList, error)

GetEvents returns events from the events URL of the AgentClusterInstall.

func (*AgentClusterInstallBuilder) Update

Update modifies an existing agentclusterinstall on the cluster.

func (*AgentClusterInstallBuilder) WaitForConditionMessage

func (builder *AgentClusterInstallBuilder) WaitForConditionMessage(
	conditionType v1.ClusterInstallConditionType, message string, timeout time.Duration) error

WaitForConditionMessage waits the specified timeout for the given condition to report the specified message.

func (*AgentClusterInstallBuilder) WaitForConditionReason

func (builder *AgentClusterInstallBuilder) WaitForConditionReason(
	conditionType v1.ClusterInstallConditionType, reason string, timeout time.Duration) error

WaitForConditionReason waits the specified timeout for the given condition to report the specified reason.

func (*AgentClusterInstallBuilder) WaitForConditionStatus

func (builder *AgentClusterInstallBuilder) WaitForConditionStatus(
	conditionType v1.ClusterInstallConditionType, status corev1.ConditionStatus, timeout time.Duration) error

WaitForConditionStatus waits the specified timeout for the given condition to report the specified status.

func (*AgentClusterInstallBuilder) WaitForState

func (builder *AgentClusterInstallBuilder) WaitForState(
	state string,
	timeout time.Duration) (*AgentClusterInstallBuilder, error)

WaitForState will wait the defined timeout for the agentclusterinstall to have the defined state.

func (*AgentClusterInstallBuilder) WaitForStateInfo

func (builder *AgentClusterInstallBuilder) WaitForStateInfo(
	stateInfo string,
	timeout time.Duration) (*AgentClusterInstallBuilder, error)

WaitForStateInfo will wait the defined timeout for stateInfo to match the defined stateInfo string.

func (*AgentClusterInstallBuilder) WithAPIVip

func (builder *AgentClusterInstallBuilder) WithAPIVip(apiVIP string) *AgentClusterInstallBuilder

WithAPIVip sets the apiVIP to use during multi-node installations.

func (*AgentClusterInstallBuilder) WithAdditionalAPIVip

func (builder *AgentClusterInstallBuilder) WithAdditionalAPIVip(apiVIP string) *AgentClusterInstallBuilder

WithAdditionalAPIVip appends apiVIP to the apiVIPs field for use during dual-stack installations.

func (*AgentClusterInstallBuilder) WithAdditionalClusterNetwork

func (builder *AgentClusterInstallBuilder) WithAdditionalClusterNetwork(
	cidr string,
	prefix int32) *AgentClusterInstallBuilder

WithAdditionalClusterNetwork appends additional cluster networks to be used by the cluster.

func (*AgentClusterInstallBuilder) WithAdditionalIngressVip

func (builder *AgentClusterInstallBuilder) WithAdditionalIngressVip(ingressVIP string) *AgentClusterInstallBuilder

WithAdditionalIngressVip appends ingressVIP to the ingressVIPs field for use during dual-stack installations.

func (*AgentClusterInstallBuilder) WithAdditionalServiceNetwork

func (builder *AgentClusterInstallBuilder) WithAdditionalServiceNetwork(cidr string) *AgentClusterInstallBuilder

WithAdditionalServiceNetwork appends additional service networks to be used by the cluster.

func (*AgentClusterInstallBuilder) WithControlPlaneAgents

func (builder *AgentClusterInstallBuilder) WithControlPlaneAgents(agentCount int) *AgentClusterInstallBuilder

WithControlPlaneAgents sets the number of masters to use for the installation.

func (*AgentClusterInstallBuilder) WithImageSet

func (builder *AgentClusterInstallBuilder) WithImageSet(imageSet string) *AgentClusterInstallBuilder

WithImageSet sets the clusterimageset to use for the installation.

func (*AgentClusterInstallBuilder) WithIngressVip

func (builder *AgentClusterInstallBuilder) WithIngressVip(ingressVIP string) *AgentClusterInstallBuilder

WithIngressVip sets the ingressVIP to use during multi-node installations.

func (*AgentClusterInstallBuilder) WithNetworkType

func (builder *AgentClusterInstallBuilder) WithNetworkType(netType string) *AgentClusterInstallBuilder

WithNetworkType sets the cluster networking type (Supported values: OpenShiftSDN, OVNKubernetes).

func (*AgentClusterInstallBuilder) WithOptions

WithOptions creates AgentClusterInstall with generic mutation options.

func (*AgentClusterInstallBuilder) WithPlatformType

WithPlatformType sets platformType field (Supported values: "", None, BareMetal, VSphere).

func (*AgentClusterInstallBuilder) WithSSHPublicKey

func (builder *AgentClusterInstallBuilder) WithSSHPublicKey(pubkey string) *AgentClusterInstallBuilder

WithSSHPublicKey is the ssh key that is allowed to access the nodes.

func (*AgentClusterInstallBuilder) WithUserManagedNetworking

func (builder *AgentClusterInstallBuilder) WithUserManagedNetworking(enabled bool) *AgentClusterInstallBuilder

WithUserManagedNetworking sets userManagedNetworking field.

func (*AgentClusterInstallBuilder) WithWorkerAgents

func (builder *AgentClusterInstallBuilder) WithWorkerAgents(agentCount int) *AgentClusterInstallBuilder

WithWorkerAgents sets the number of workers to use during the installation.

type AgentServiceConfigAdditionalOptions

type AgentServiceConfigAdditionalOptions func(builder *AgentServiceConfigBuilder) (*AgentServiceConfigBuilder, error)

AgentServiceConfigAdditionalOptions additional options for AgentServiceConfig object.

type AgentServiceConfigBuilder

type AgentServiceConfigBuilder struct {
	Definition *agentInstallV1Beta1.AgentServiceConfig
	Object     *agentInstallV1Beta1.AgentServiceConfig
	// contains filtered or unexported fields
}

AgentServiceConfigBuilder provides struct for the agentserviceconfig object containing connection to the cluster and the agentserviceconfig definition.

func NewAgentServiceConfigBuilder

func NewAgentServiceConfigBuilder(
	apiClient *clients.Settings,
	databaseStorageSpec,
	filesystemStorageSpec corev1.PersistentVolumeClaimSpec) *AgentServiceConfigBuilder

NewAgentServiceConfigBuilder creates a new instance of AgentServiceConfigBuilder.

func NewDefaultAgentServiceConfigBuilder

func NewDefaultAgentServiceConfigBuilder(apiClient *clients.Settings) *AgentServiceConfigBuilder

NewDefaultAgentServiceConfigBuilder creates a new instance of AgentServiceConfigBuilder with default storage specs already set.

func PullAgentServiceConfig

func PullAgentServiceConfig(apiClient *clients.Settings) (*AgentServiceConfigBuilder, error)

PullAgentServiceConfig loads the existing agentserviceconfig into AgentServiceConfigBuilder struct.

func (*AgentServiceConfigBuilder) Create

Create generates an agentserviceconfig on the cluster.

func (*AgentServiceConfigBuilder) Delete

func (builder *AgentServiceConfigBuilder) Delete() error

Delete removes an agentserviceconfig from the cluster.

func (*AgentServiceConfigBuilder) DeleteAndWait

func (builder *AgentServiceConfigBuilder) DeleteAndWait(timeout time.Duration) error

DeleteAndWait deletes an agentserviceconfig and waits until it is removed from the cluster.

func (*AgentServiceConfigBuilder) Exists

func (builder *AgentServiceConfigBuilder) Exists() bool

Exists checks if the defined agentserviceconfig has already been created.

func (*AgentServiceConfigBuilder) Get

Get fetches the defined agentserviceconfig from the cluster.

func (*AgentServiceConfigBuilder) Update

Update modifies an existing agentserviceconfig on the cluster.

func (*AgentServiceConfigBuilder) WaitUntilDeployed

func (builder *AgentServiceConfigBuilder) WaitUntilDeployed(timeout time.Duration) (*AgentServiceConfigBuilder, error)

WaitUntilDeployed waits the specified timeout for the agentserviceconfig to deploy.

func (*AgentServiceConfigBuilder) WithIPXEHTTPRoute

func (builder *AgentServiceConfigBuilder) WithIPXEHTTPRoute(route string) *AgentServiceConfigBuilder

WithIPXEHTTPRoute sets the IPXEHTTPRoute type to be used by the agentserviceconfig.

func (*AgentServiceConfigBuilder) WithImageStorage

func (builder *AgentServiceConfigBuilder) WithImageStorage(
	imageStorageSpec corev1.PersistentVolumeClaimSpec) *AgentServiceConfigBuilder

WithImageStorage sets the imageStorageSpec used by the agentserviceconfig.

func (*AgentServiceConfigBuilder) WithMirrorRegistryRef

func (builder *AgentServiceConfigBuilder) WithMirrorRegistryRef(configMapName string) *AgentServiceConfigBuilder

WithMirrorRegistryRef adds a configmap ref to the agentserviceconfig containing mirroring information.

func (*AgentServiceConfigBuilder) WithOSImage

WithOSImage appends an OSImage to the OSImages list used by the agentserviceconfig.

func (*AgentServiceConfigBuilder) WithOptions

WithOptions creates AgentServiceConfig with generic mutation options.

func (*AgentServiceConfigBuilder) WithUnauthenticatedRegistry

func (builder *AgentServiceConfigBuilder) WithUnauthenticatedRegistry(registry string) *AgentServiceConfigBuilder

WithUnauthenticatedRegistry appends an unauthenticated registry to the agentserviceconfig.

type InfraEnvAdditionalOptions

type InfraEnvAdditionalOptions func(builder *InfraEnvBuilder) (*InfraEnvBuilder, error)

InfraEnvAdditionalOptions additional options for InfraEnv object.

type InfraEnvBuilder

type InfraEnvBuilder struct {
	Definition *agentInstallV1Beta1.InfraEnv
	Object     *agentInstallV1Beta1.InfraEnv
	// contains filtered or unexported fields
}

InfraEnvBuilder provides struct for the infraenv object containing connection to the cluster and the infraenv definitions.

func NewInfraEnvBuilder

func NewInfraEnvBuilder(apiClient *clients.Settings, name, nsname, psName string) *InfraEnvBuilder

NewInfraEnvBuilder creates a new instance of InfraEnvBuilder.

func PullInfraEnvInstall

func PullInfraEnvInstall(apiClient *clients.Settings, name, nsname string) (*InfraEnvBuilder, error)

PullInfraEnvInstall pulls existing infraenv from cluster.

func (*InfraEnvBuilder) Create

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

Create generates a infraenv on the cluster.

func (*InfraEnvBuilder) Delete

func (builder *InfraEnvBuilder) Delete() error

Delete removes an infraenv from the cluster.

func (*InfraEnvBuilder) DeleteAndWait

func (builder *InfraEnvBuilder) DeleteAndWait(timeout time.Duration) error

DeleteAndWait deletes an InfraEnv and waits until it is removed from the cluster.

func (*InfraEnvBuilder) Exists

func (builder *InfraEnvBuilder) Exists() bool

Exists checks if the defined infraenv has already been created.

func (*InfraEnvBuilder) Get

Get fetches the defined infraenv from the cluster.

func (*InfraEnvBuilder) GetAgentByBMH

func (builder *InfraEnvBuilder) GetAgentByBMH(bmhName string) (*agentBuilder, error)

GetAgentByBMH returns an agentBuilder for the agent matching specified BMH belonging to the infraenv.

func (*InfraEnvBuilder) GetAgentByName

func (builder *InfraEnvBuilder) GetAgentByName(name string) (*agentBuilder, error)

GetAgentByName returns an agentBuilder for the agent matching specified name belonging to the infraenv.

func (*InfraEnvBuilder) GetAgentClusterInstallFromInfraEnv

func (builder *InfraEnvBuilder) GetAgentClusterInstallFromInfraEnv() (*hiveextV1Beta1.AgentClusterInstall, error)

GetAgentClusterInstallFromInfraEnv returns the AgentClusterInstall that is referenced by this InfraEnv.

func (*InfraEnvBuilder) GetAgentsByLabel

func (builder *InfraEnvBuilder) GetAgentsByLabel(key, value string) ([]*agentBuilder, error)

GetAgentsByLabel returns a slice of agentBuilders for agents matching specified label.

func (*InfraEnvBuilder) GetAgentsByRole

func (builder *InfraEnvBuilder) GetAgentsByRole(role string) ([]*agentBuilder, error)

GetAgentsByRole returns a slice of agentBuilders of agents matching specified role belonging to the infraenv.

func (*InfraEnvBuilder) GetAllAgents

func (builder *InfraEnvBuilder) GetAllAgents() ([]*agentBuilder, error)

GetAllAgents returns a slice of agentBuilders of all agents belonging to the infraenv.

func (*InfraEnvBuilder) GetRandomMasterAgent

func (builder *InfraEnvBuilder) GetRandomMasterAgent() (*agentBuilder, error)

GetRandomMasterAgent returns an agentBuilder of a random agent that has it's role set to master.

func (*InfraEnvBuilder) GetRandomWorkerAgent

func (builder *InfraEnvBuilder) GetRandomWorkerAgent() (*agentBuilder, error)

GetRandomWorkerAgent returns an agentBuilder of a random agent that has it's role set to worker.

func (*InfraEnvBuilder) Update

func (builder *InfraEnvBuilder) Update(force bool) (*InfraEnvBuilder, error)

Update modifies an existing infraenv on the cluster.

func (*InfraEnvBuilder) WaitForAgentsToRegister

func (builder *InfraEnvBuilder) WaitForAgentsToRegister(timeout time.Duration) ([]*agentBuilder, error)

WaitForAgentsToRegister waits the specified time for agents to register matching the provisioninRequirements of the related AgentClusterInstall.

func (*InfraEnvBuilder) WaitForDiscoveryISOCreation

func (builder *InfraEnvBuilder) WaitForDiscoveryISOCreation(timeout time.Duration) (*InfraEnvBuilder, error)

WaitForDiscoveryISOCreation waits the defined timeout for the discovery ISO to be generated.

func (*InfraEnvBuilder) WaitForMasterAgentCount

func (builder *InfraEnvBuilder) WaitForMasterAgentCount(count int, timeout time.Duration) ([]*agentBuilder, error)

WaitForMasterAgentCount waits the specified time for agents with the role master to register and match the specified count.

func (*InfraEnvBuilder) WaitForMasterAgents

func (builder *InfraEnvBuilder) WaitForMasterAgents(timeout time.Duration) ([]*agentBuilder, error)

WaitForMasterAgents waits the specified time for agents with the role master to register and match the ControlPlaneAgents count in ProvisionRequirements of the related AgentClusterInstall.

func (*InfraEnvBuilder) WaitForWorkerAgentCount

func (builder *InfraEnvBuilder) WaitForWorkerAgentCount(count int, timeout time.Duration) ([]*agentBuilder, error)

WaitForWorkerAgentCount waits the specified time for agents with the role worker to register and match the specified count.

func (*InfraEnvBuilder) WaitForWorkerAgents

func (builder *InfraEnvBuilder) WaitForWorkerAgents(timeout time.Duration) ([]*agentBuilder, error)

WaitForWorkerAgents waits the specified time for agents with the role worker to register and match the WorkerAgents count in ProvisionRequirements of the related AgentClusterInstall.

func (*InfraEnvBuilder) WithAdditionalNTPSource

func (builder *InfraEnvBuilder) WithAdditionalNTPSource(ntpSource string) *InfraEnvBuilder

WithAdditionalNTPSource adds additional servers as NTP sources for the spoke cluster.

func (*InfraEnvBuilder) WithAgentLabel

func (builder *InfraEnvBuilder) WithAgentLabel(key, value string) *InfraEnvBuilder

WithAgentLabel adds labels to be applied to agents that boot from the infraenv.

func (*InfraEnvBuilder) WithCPUType

func (builder *InfraEnvBuilder) WithCPUType(arch string) *InfraEnvBuilder

WithCPUType sets the cpu architecture for the discovery ISO.

func (*InfraEnvBuilder) WithClusterRef

func (builder *InfraEnvBuilder) WithClusterRef(name, nsname string) *InfraEnvBuilder

WithClusterRef sets the cluster reference to be used by the infraenv.

func (*InfraEnvBuilder) WithIPXEScriptType

func (builder *InfraEnvBuilder) WithIPXEScriptType(scriptType agentInstallV1Beta1.IPXEScriptType) *InfraEnvBuilder

WithIPXEScriptType modifies the IPXE script type generated by the infraenv.

func (*InfraEnvBuilder) WithIgnitionConfigOverride

func (builder *InfraEnvBuilder) WithIgnitionConfigOverride(override string) *InfraEnvBuilder

WithIgnitionConfigOverride includes the specified ignitionconfigoverride for discovery.

func (*InfraEnvBuilder) WithKernelArgument

func (builder *InfraEnvBuilder) WithKernelArgument(kernelArg agentInstallV1Beta1.KernelArgument) *InfraEnvBuilder

WithKernelArgument appends kernel configurations to be configured by the infraenv.

func (*InfraEnvBuilder) WithNmstateConfigLabelSelector

func (builder *InfraEnvBuilder) WithNmstateConfigLabelSelector(selector metav1.LabelSelector) *InfraEnvBuilder

WithNmstateConfigLabelSelector adds a selector for identifying nmstateconfigs that should be applied to this infraenv.

func (*InfraEnvBuilder) WithOptions

func (builder *InfraEnvBuilder) WithOptions(
	options ...InfraEnvAdditionalOptions) *InfraEnvBuilder

WithOptions creates InfraEnv with generic mutation options.

func (*InfraEnvBuilder) WithProxy

func (builder *InfraEnvBuilder) WithProxy(proxy agentInstallV1Beta1.Proxy) *InfraEnvBuilder

WithProxy includes a proxy configuration to be used by the infraenv.

func (*InfraEnvBuilder) WithSSHAuthorizedKey

func (builder *InfraEnvBuilder) WithSSHAuthorizedKey(sshAuthKey string) *InfraEnvBuilder

WithSSHAuthorizedKey sets the authorized ssh key for accessing the nodes during discovery.

type NmStateConfigBuilder

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

NmStateConfigBuilder provides struct for the NMStateConfig object containing connection to the cluster and the NMStateConfig definitions.

func ListNmStateConfigs

func ListNmStateConfigs(apiClient *clients.Settings, namespace string) ([]*NmStateConfigBuilder, error)

ListNmStateConfigs returns a NMStateConfig list in a given namespace.

func ListNmStateConfigsInAllNamespaces

func ListNmStateConfigsInAllNamespaces(apiClient *clients.Settings) ([]*NmStateConfigBuilder, error)

ListNmStateConfigsInAllNamespaces returns a cluster-wide NMStateConfig list.

func NewNmStateConfigBuilder

func NewNmStateConfigBuilder(apiClient *clients.Settings, name, namespace string) *NmStateConfigBuilder

NewNmStateConfigBuilder creates a new instance of NMStateConfig Builder.

func (*NmStateConfigBuilder) Create

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

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

func (*NmStateConfigBuilder) Delete

func (builder *NmStateConfigBuilder) Delete() error

Delete removes nmstateconfig object from a cluster.

func (*NmStateConfigBuilder) Exists

func (builder *NmStateConfigBuilder) Exists() bool

Exists checks whether the given NMStateConfig exists.

func (*NmStateConfigBuilder) Get

Get returns NMStateConfig object if found.

Jump to

Keyboard shortcuts

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