siteconfig

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: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CIBuilder

type CIBuilder struct {
	// ClusterInstance definition. Used to create a clusterinstance object.
	Definition *siteconfigv1alpha1.ClusterInstance
	// Created clusterinstance object.
	Object *siteconfigv1alpha1.ClusterInstance
	// contains filtered or unexported fields
}

CIBuilder provides struct for the ClusterInstance object.

func NewCIBuilder

func NewCIBuilder(apiClient *clients.Settings, name, nsname string) *CIBuilder

NewCIBuilder creates a new instance of CIBuilder.

func PullClusterInstance

func PullClusterInstance(apiClient *clients.Settings, name, nsname string) (*CIBuilder, error)

PullClusterInstance retrieves an existing ClusterInstance from the cluster.

func (*CIBuilder) Create

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

Create generates an ClusterInstance on the cluster.

func (*CIBuilder) Delete

func (builder *CIBuilder) Delete() error

Delete removes an ClusterInstance from the cluster.

func (*CIBuilder) Exists

func (builder *CIBuilder) Exists() bool

Exists checks if the defined ClusterInstance has already been created.

func (*CIBuilder) Get

Get fetches the defined ClusterInstance from the cluster.

func (*CIBuilder) Update

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

Update modifies an existing ClusterInstance on the cluster.

func (*CIBuilder) WaitForCondition

func (builder *CIBuilder) WaitForCondition(expected metav1.Condition, timeout time.Duration) (*CIBuilder, error)

WaitForCondition waits until the ClusterInstance has a condition that matches the expected, checking only the Type, Status, Reason, and Message fields. For the message field, it matches if the message contains the expected. Zero fields in the expected condition are ignored.

func (*CIBuilder) WithBaseDomain

func (builder *CIBuilder) WithBaseDomain(baseDomain string) *CIBuilder

WithBaseDomain sets the base domain for the clusterinstance.

func (*CIBuilder) WithCABundle

func (builder *CIBuilder) WithCABundle(caBundleConfigMapName string) *CIBuilder

WithCABundle sets a CA bundle via configmap name.

func (*CIBuilder) WithClusterImageSetRef

func (builder *CIBuilder) WithClusterImageSetRef(imageSet string) *CIBuilder

WithClusterImageSetRef sets the clusterimageset used for installation in the clusterinstance.

func (*CIBuilder) WithClusterName

func (builder *CIBuilder) WithClusterName(clusterName string) *CIBuilder

WithClusterName adds a cluster name to the clusterinstance.

func (*CIBuilder) WithClusterTemplateRef

func (builder *CIBuilder) WithClusterTemplateRef(clusterTemplateName, clusterTemplateNamespace string) *CIBuilder

WithClusterTemplateRef specifies the cluster template to use for the clusterinstance.

func (*CIBuilder) WithExtraLabels

func (builder *CIBuilder) WithExtraLabels(key string, labels map[string]string) *CIBuilder

WithExtraLabels applies extraLabels to ClusterInstance definition.

func (*CIBuilder) WithExtraManifests

func (builder *CIBuilder) WithExtraManifests(extraManifestsName string) *CIBuilder

WithExtraManifests includes manifests via configmap name.

func (*CIBuilder) WithMachineNetwork

func (builder *CIBuilder) WithMachineNetwork(machineNetwork string) *CIBuilder

WithMachineNetwork adds the machineNetwork belonging to the node(s) to the clusterinstance.

func (*CIBuilder) WithNode

func (builder *CIBuilder) WithNode(node *siteconfigv1alpha1.NodeSpec) *CIBuilder

WithNode adds the specified node spec to the clusterinstance.

func (*CIBuilder) WithProxy

func (builder *CIBuilder) WithProxy(proxy *aiv1beta1.Proxy) *CIBuilder

WithProxy adds the specified proxy to the clusterinstance.

func (*CIBuilder) WithPullSecretRef

func (builder *CIBuilder) WithPullSecretRef(secretRef string) *CIBuilder

WithPullSecretRef sets a reference to the pull-secret to be used by the clusterinstance.

func (*CIBuilder) WithSSHPubKey

func (builder *CIBuilder) WithSSHPubKey(sshPubKey string) *CIBuilder

WithSSHPubKey adds the provided public SSH key for accessing the nodes.

type NodeBuilder

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

NodeBuilder provides struct for the siteconfig NodeSpec object.

func NewNodeBuilder

func NewNodeBuilder(
	name,
	bmcAddress,
	bootMACAddress,
	bmcCredentialsName,
	templateName,
	templateNamespace string) *NodeBuilder

NewNodeBuilder creates a new instance of NodeBuilder.

func (*NodeBuilder) Generate

func (builder *NodeBuilder) Generate() (*siteconfigv1alpha1.NodeSpec, error)

Generate returns the NodeSpec struct from the NodeBuilder.

func (*NodeBuilder) WithAutomatedCleaningMode

func (builder *NodeBuilder) WithAutomatedCleaningMode(mode string) *NodeBuilder

WithAutomatedCleaningMode adds the automatedCleaningMode field to the node.

func (*NodeBuilder) WithNodeNetwork

func (builder *NodeBuilder) WithNodeNetwork(networkConfig *v1beta1.NMStateConfigSpec) *NodeBuilder

WithNodeNetwork adds a node network configuration to the node.

Jump to

Keyboard shortcuts

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