builder

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package builder implements builder and CRDs for creating API objects for testing. +kubebuilder:object:generate=true

Index

Constants

This section is empty.

Variables

View Source
var (
	// BootstrapGroupVersion is group version used for bootstrap objects.
	BootstrapGroupVersion = schema.GroupVersion{Group: "bootstrap.cluster.x-k8s.io", Version: "v1beta1"}

	// GenericBootstrapConfigKind is the Kind for the GenericBootstrapConfig.
	GenericBootstrapConfigKind = "GenericBootstrapConfig"
	// GenericBootstrapConfigCRD is a generic bootstrap CRD.
	GenericBootstrapConfigCRD = untypedCRD(BootstrapGroupVersion.WithKind(GenericBootstrapConfigKind))

	// GenericBootstrapConfigTemplateKind is the Kind for the GenericBootstrapConfigTemplate.
	GenericBootstrapConfigTemplateKind = "GenericBootstrapConfigTemplate"
	// GenericBootstrapConfigTemplateCRD is a generic bootstrap template CRD.
	GenericBootstrapConfigTemplateCRD = untypedCRD(BootstrapGroupVersion.WithKind(GenericBootstrapConfigTemplateKind))

	// TestBootstrapConfigTemplateKind is the kind for the TestBootstrapConfigTemplate type.
	TestBootstrapConfigTemplateKind = "TestBootstrapConfigTemplate"
	// TestBootstrapConfigTemplateCRD is a test bootstrap config template CRD.
	TestBootstrapConfigTemplateCRD = testBootstrapConfigTemplateCRD(BootstrapGroupVersion.WithKind(TestBootstrapConfigTemplateKind))

	// TestBootstrapConfigKind is the kind for the TestBootstrapConfig type.
	TestBootstrapConfigKind = "TestBootstrapConfig"
	// TestBootstrapConfigCRD is a test bootstrap config CRD.
	TestBootstrapConfigCRD = testBootstrapConfigCRD(BootstrapGroupVersion.WithKind(TestBootstrapConfigKind))
)
View Source
var (
	// ControlPlaneGroupVersion is group version used for control plane objects.
	ControlPlaneGroupVersion = schema.GroupVersion{Group: "controlplane.cluster.x-k8s.io", Version: "v1beta1"}

	// GenericControlPlaneKind is the Kind for the GenericControlPlane.
	GenericControlPlaneKind = "GenericControlPlane"
	// GenericControlPlaneCRD is a generic control plane CRD.
	GenericControlPlaneCRD = untypedCRD(ControlPlaneGroupVersion.WithKind(GenericControlPlaneKind))

	// GenericControlPlaneTemplateKind is the Kind for the GenericControlPlaneTemplate.
	GenericControlPlaneTemplateKind = "GenericControlPlaneTemplate"
	// GenericControlPlaneTemplateCRD is a generic control plane template CRD.
	GenericControlPlaneTemplateCRD = untypedCRD(ControlPlaneGroupVersion.WithKind(GenericControlPlaneTemplateKind))

	// TestControlPlaneTemplateKind is the Kind for the TestControlPlaneTemplate.
	TestControlPlaneTemplateKind = "TestControlPlaneTemplate"
	// TestControlPlaneTemplateCRD is a test control plane template CRD.
	TestControlPlaneTemplateCRD = testControlPlaneTemplateCRD(ControlPlaneGroupVersion.WithKind(TestControlPlaneTemplateKind))

	// TestControlPlaneKind is the Kind for the TestControlPlane.
	TestControlPlaneKind = "TestControlPlane"
	// TestControlPlaneCRD is a test control plane CRD.
	TestControlPlaneCRD = testControlPlaneCRD(ControlPlaneGroupVersion.WithKind(TestControlPlaneKind))
)
View Source
var (
	// InfrastructureGroupVersion is group version used for infrastructure objects.
	InfrastructureGroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"}

	// GenericInfrastructureMachineKind is the Kind for the GenericInfrastructureMachine.
	GenericInfrastructureMachineKind = "GenericInfrastructureMachine"
	// GenericInfrastructureMachineCRD is a generic infrastructure machine CRD.
	GenericInfrastructureMachineCRD = untypedCRD(InfrastructureGroupVersion.WithKind(GenericInfrastructureMachineKind))

	// GenericInfrastructureMachineTemplateKind is the Kind for the GenericInfrastructureMachineTemplate.
	GenericInfrastructureMachineTemplateKind = "GenericInfrastructureMachineTemplate"
	// GenericInfrastructureMachineTemplateCRD is a generic infrastructure machine template CRD.
	GenericInfrastructureMachineTemplateCRD = untypedCRD(InfrastructureGroupVersion.WithKind(GenericInfrastructureMachineTemplateKind))

	// GenericInfrastructureClusterKind is the kind for the GenericInfrastructureCluster type.
	GenericInfrastructureClusterKind = "GenericInfrastructureCluster"
	// GenericInfrastructureClusterCRD is a generic infrastructure machine CRD.
	GenericInfrastructureClusterCRD = untypedCRD(InfrastructureGroupVersion.WithKind(GenericInfrastructureClusterKind))

	// GenericInfrastructureClusterTemplateKind is the kind for the GenericInfrastructureClusterTemplate type.
	GenericInfrastructureClusterTemplateKind = "GenericInfrastructureClusterTemplate"
	// GenericInfrastructureClusterTemplateCRD is a generic infrastructure machine template CRD.
	GenericInfrastructureClusterTemplateCRD = untypedCRD(InfrastructureGroupVersion.WithKind(GenericInfrastructureClusterTemplateKind))

	// TestInfrastructureClusterTemplateKind is the kind for the TestInfrastructureClusterTemplate type.
	TestInfrastructureClusterTemplateKind = "TestInfrastructureClusterTemplate"
	// TestInfrastructureClusterTemplateCRD is a test infrastructure machine template CRD.
	TestInfrastructureClusterTemplateCRD = testInfrastructureClusterTemplateCRD(InfrastructureGroupVersion.WithKind(TestInfrastructureClusterTemplateKind))

	// TestInfrastructureClusterKind is the kind for the TestInfrastructureCluster type.
	TestInfrastructureClusterKind = "TestInfrastructureCluster"
	// TestInfrastructureClusterCRD is a test infrastructure machine CRD.
	TestInfrastructureClusterCRD = testInfrastructureClusterCRD(InfrastructureGroupVersion.WithKind(TestInfrastructureClusterKind))

	// TestInfrastructureMachineTemplateKind is the kind for the TestInfrastructureMachineTemplate type.
	TestInfrastructureMachineTemplateKind = "TestInfrastructureMachineTemplate"
	// TestInfrastructureMachineTemplateCRD is a test infrastructure machine template CRD.
	TestInfrastructureMachineTemplateCRD = testInfrastructureMachineTemplateCRD(InfrastructureGroupVersion.WithKind(TestInfrastructureMachineTemplateKind))

	// TestInfrastructureMachineKind is the kind for the TestInfrastructureMachine type.
	TestInfrastructureMachineKind = "TestInfrastructureMachine"
	// TestInfrastructureMachineCRD is a test infrastructure machine CRD.
	TestInfrastructureMachineCRD = testInfrastructureMachineCRD(InfrastructureGroupVersion.WithKind(TestInfrastructureMachineKind))
)
View Source
var (
	// RemediationGroupVersion is group version used for remediation objects.
	RemediationGroupVersion = schema.GroupVersion{Group: "remediation.external.io", Version: "v1beta1"}

	// GenericRemediationCRD is a generic infrastructure remediation CRD.
	GenericRemediationCRD = untypedCRD(RemediationGroupVersion.WithKind("GenericExternalRemediation"))

	// GenericRemediationTemplateCRD is a generic infrastructure remediation template CRD.
	GenericRemediationTemplateCRD = untypedCRD(RemediationGroupVersion.WithKind("GenericExternalRemediationTemplate"))
)

Functions

This section is empty.

Types

type BootstrapTemplateBuilder

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

BootstrapTemplateBuilder holds the variables needed to build a generic BootstrapTemplate.

func BootstrapTemplate

func BootstrapTemplate(namespace, name string) *BootstrapTemplateBuilder

BootstrapTemplate creates a BootstrapTemplateBuilder with the given name and namespace.

func (*BootstrapTemplateBuilder) Build

Build creates a new Unstructured object with the information passed to the BootstrapTemplateBuilder.

func (*BootstrapTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapTemplateBuilder.

func (*BootstrapTemplateBuilder) DeepCopyInto added in v1.2.0

func (in *BootstrapTemplateBuilder) DeepCopyInto(out *BootstrapTemplateBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BootstrapTemplateBuilder) WithSpecFields

func (b *BootstrapTemplateBuilder) WithSpecFields(fields map[string]interface{}) *BootstrapTemplateBuilder

WithSpecFields will add fields of any type to the object spec. It takes an argument, fields, which is of the form path: object.

type ClusterBuilder

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

ClusterBuilder holds the variables and objects required to build a clusterv1.Cluster.

func Cluster

func Cluster(namespace, name string) *ClusterBuilder

Cluster returns a ClusterBuilder with the given name and namespace.

func (*ClusterBuilder) Build

func (c *ClusterBuilder) Build() *clusterv1.Cluster

Build returns a Cluster with the attributes added to the ClusterBuilder.

func (*ClusterBuilder) DeepCopy added in v1.2.0

func (in *ClusterBuilder) DeepCopy() *ClusterBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBuilder.

func (*ClusterBuilder) DeepCopyInto added in v1.2.0

func (in *ClusterBuilder) DeepCopyInto(out *ClusterBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterBuilder) WithAnnotations added in v1.2.0

func (c *ClusterBuilder) WithAnnotations(annotations map[string]string) *ClusterBuilder

WithAnnotations sets the annotations for the ClusterBuilder.

func (*ClusterBuilder) WithClusterNetwork added in v1.3.0

func (c *ClusterBuilder) WithClusterNetwork(clusterNetwork *clusterv1.ClusterNetwork) *ClusterBuilder

WithClusterNetwork sets the ClusterNetwork for the ClusterBuilder.

func (*ClusterBuilder) WithControlPlane

func (c *ClusterBuilder) WithControlPlane(t *unstructured.Unstructured) *ClusterBuilder

WithControlPlane adds the passed ControlPlane to the ClusterBuilder.

func (*ClusterBuilder) WithInfrastructureCluster

func (c *ClusterBuilder) WithInfrastructureCluster(t *unstructured.Unstructured) *ClusterBuilder

WithInfrastructureCluster adds the passed InfrastructureCluster to the ClusterBuilder.

func (*ClusterBuilder) WithLabels

func (c *ClusterBuilder) WithLabels(labels map[string]string) *ClusterBuilder

WithLabels sets the labels for the ClusterBuilder.

func (*ClusterBuilder) WithTopology

func (c *ClusterBuilder) WithTopology(topology *clusterv1.Topology) *ClusterBuilder

WithTopology adds the passed Topology object to the ClusterBuilder.

type ClusterClassBuilder

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

ClusterClassBuilder holds the variables and objects required to build a clusterv1.ClusterClass.

func ClusterClass

func ClusterClass(namespace, name string) *ClusterClassBuilder

ClusterClass returns a ClusterClassBuilder with the given name and namespace.

func (*ClusterClassBuilder) Build

Build takes the objects and variables in the ClusterClass builder and uses them to create a ClusterClass object.

func (*ClusterClassBuilder) DeepCopy added in v1.2.0

func (in *ClusterClassBuilder) DeepCopy() *ClusterClassBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterClassBuilder.

func (*ClusterClassBuilder) DeepCopyInto added in v1.2.0

func (in *ClusterClassBuilder) DeepCopyInto(out *ClusterClassBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterClassBuilder) WithControlPlaneInfrastructureMachineTemplate

func (c *ClusterClassBuilder) WithControlPlaneInfrastructureMachineTemplate(t *unstructured.Unstructured) *ClusterClassBuilder

WithControlPlaneInfrastructureMachineTemplate adds the ControlPlane's InfrastructureMachineTemplate to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithControlPlaneMachineHealthCheck

func (c *ClusterClassBuilder) WithControlPlaneMachineHealthCheck(mhc *clusterv1.MachineHealthCheckClass) *ClusterClassBuilder

WithControlPlaneMachineHealthCheck adds a MachineHealthCheck for the ControlPlane to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithControlPlaneMetadata

func (c *ClusterClassBuilder) WithControlPlaneMetadata(labels, annotations map[string]string) *ClusterClassBuilder

WithControlPlaneMetadata adds the given labels and annotations for use with the ControlPlane to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithControlPlaneNodeDeletionTimeout added in v1.3.0

func (c *ClusterClassBuilder) WithControlPlaneNodeDeletionTimeout(t *metav1.Duration) *ClusterClassBuilder

WithControlPlaneNodeDeletionTimeout adds a NodeDeletionTimeout for the ControlPlane to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithControlPlaneNodeDrainTimeout added in v1.3.0

func (c *ClusterClassBuilder) WithControlPlaneNodeDrainTimeout(t *metav1.Duration) *ClusterClassBuilder

WithControlPlaneNodeDrainTimeout adds a NodeDrainTimeout for the ControlPlane to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithControlPlaneNodeVolumeDetachTimeout added in v1.3.0

func (c *ClusterClassBuilder) WithControlPlaneNodeVolumeDetachTimeout(t *metav1.Duration) *ClusterClassBuilder

WithControlPlaneNodeVolumeDetachTimeout adds a NodeVolumeDetachTimeout for the ControlPlane to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithControlPlaneTemplate

func (c *ClusterClassBuilder) WithControlPlaneTemplate(t *unstructured.Unstructured) *ClusterClassBuilder

WithControlPlaneTemplate adds the passed ControlPlaneTemplate to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithInfrastructureClusterTemplate

func (c *ClusterClassBuilder) WithInfrastructureClusterTemplate(t *unstructured.Unstructured) *ClusterClassBuilder

WithInfrastructureClusterTemplate adds the passed InfrastructureClusterTemplate to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithPatches

WithPatches adds the patches to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithStatusVariables added in v1.4.0

WithStatusVariables adds the ClusterClassStatusVariables to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithVariables

WithVariables adds the Variables to the ClusterClassBuilder.

func (*ClusterClassBuilder) WithWorkerMachineDeploymentClasses

func (c *ClusterClassBuilder) WithWorkerMachineDeploymentClasses(mdcs ...clusterv1.MachineDeploymentClass) *ClusterClassBuilder

WithWorkerMachineDeploymentClasses adds the variables and objects needed to create MachineDeploymentTemplates for a ClusterClassBuilder.

type ClusterTopologyBuilder

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

ClusterTopologyBuilder contains the fields needed to build a testable ClusterTopology.

func ClusterTopology

func ClusterTopology() *ClusterTopologyBuilder

ClusterTopology returns a ClusterTopologyBuilder.

func (*ClusterTopologyBuilder) Build

Build returns a testable cluster Topology object with any values passed to the builder.

func (*ClusterTopologyBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTopologyBuilder.

func (*ClusterTopologyBuilder) DeepCopyInto added in v1.2.0

func (in *ClusterTopologyBuilder) DeepCopyInto(out *ClusterTopologyBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterTopologyBuilder) WithClass

WithClass adds the passed ClusterClass name to the ClusterTopologyBuilder.

func (*ClusterTopologyBuilder) WithControlPlaneMachineHealthCheck added in v1.3.0

func (c *ClusterTopologyBuilder) WithControlPlaneMachineHealthCheck(mhc *clusterv1.MachineHealthCheckTopology) *ClusterTopologyBuilder

WithControlPlaneMachineHealthCheck adds MachineHealthCheckTopology used as the MachineHealthCheck value.

func (*ClusterTopologyBuilder) WithControlPlaneReplicas

func (c *ClusterTopologyBuilder) WithControlPlaneReplicas(replicas int32) *ClusterTopologyBuilder

WithControlPlaneReplicas adds the passed replicas value to the ClusterTopologyBuilder.

func (*ClusterTopologyBuilder) WithMachineDeployment

WithMachineDeployment passes the full MachineDeploymentTopology and adds it to an existing list in the ClusterTopologyBuilder.

func (*ClusterTopologyBuilder) WithVariables

WithVariables adds the passed variables to the ClusterTopologyBuilder.

func (*ClusterTopologyBuilder) WithVersion

func (c *ClusterTopologyBuilder) WithVersion(version string) *ClusterTopologyBuilder

WithVersion adds the passed version to the ClusterTopologyBuilder.

type ControlPlaneBuilder

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

ControlPlaneBuilder holds the variables and objects needed to build a generic object for cluster.spec.controlPlaneRef.

func ControlPlane

func ControlPlane(namespace, name string) *ControlPlaneBuilder

ControlPlane returns a ControlPlaneBuilder with the given name and Namespace.

func TestControlPlane added in v1.2.0

func TestControlPlane(namespace, name string) *ControlPlaneBuilder

TestControlPlane returns a TestControlPlaneBuilder with the given name and Namespace.

func (*ControlPlaneBuilder) Build

Build generates an Unstructured object from the information passed to the ControlPlaneBuilder.

func (*ControlPlaneBuilder) DeepCopy added in v1.2.0

func (in *ControlPlaneBuilder) DeepCopy() *ControlPlaneBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneBuilder.

func (*ControlPlaneBuilder) DeepCopyInto added in v1.2.0

func (in *ControlPlaneBuilder) DeepCopyInto(out *ControlPlaneBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ControlPlaneBuilder) WithInfrastructureMachineTemplate

func (c *ControlPlaneBuilder) WithInfrastructureMachineTemplate(t *unstructured.Unstructured) *ControlPlaneBuilder

WithInfrastructureMachineTemplate adds the given unstructured object to the ControlPlaneBuilder as its InfrastructureMachineTemplate.

func (*ControlPlaneBuilder) WithReplicas

func (c *ControlPlaneBuilder) WithReplicas(replicas int64) *ControlPlaneBuilder

WithReplicas sets the number of replicas for the ControlPlaneBuilder.

func (*ControlPlaneBuilder) WithSpecFields

func (c *ControlPlaneBuilder) WithSpecFields(fields map[string]interface{}) *ControlPlaneBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

func (*ControlPlaneBuilder) WithStatusFields

func (c *ControlPlaneBuilder) WithStatusFields(fields map[string]interface{}) *ControlPlaneBuilder

WithStatusFields sets a map of status fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the status field.

Note: all the paths should start with "status."

Example map: map[string]interface{}{
    "status.version": "v1.2.3",
}.

func (*ControlPlaneBuilder) WithVersion

func (c *ControlPlaneBuilder) WithVersion(version string) *ControlPlaneBuilder

WithVersion adds the passed version to the ControlPlaneBuilder.

type ControlPlaneTemplateBuilder

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

ControlPlaneTemplateBuilder holds the variables and objects needed to build a generic ControlPlane template.

func ControlPlaneTemplate

func ControlPlaneTemplate(namespace, name string) *ControlPlaneTemplateBuilder

ControlPlaneTemplate creates a NewControlPlaneTemplate builder with the given name and namespace.

func (*ControlPlaneTemplateBuilder) Build

Build creates an Unstructured object from the variables passed to the ControlPlaneTemplateBuilder.

func (*ControlPlaneTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneTemplateBuilder.

func (*ControlPlaneTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ControlPlaneTemplateBuilder) WithInfrastructureMachineTemplate

func (c *ControlPlaneTemplateBuilder) WithInfrastructureMachineTemplate(t *unstructured.Unstructured) *ControlPlaneTemplateBuilder

WithInfrastructureMachineTemplate adds the given Unstructured object to the ControlPlaneTemplateBuilder as its InfrastructureMachineTemplate.

func (*ControlPlaneTemplateBuilder) WithSpecFields

func (c *ControlPlaneTemplateBuilder) WithSpecFields(fields map[string]interface{}) *ControlPlaneTemplateBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type InfrastructureClusterBuilder

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

InfrastructureClusterBuilder holds the variables and objects needed to build a generic InfrastructureCluster.

func InfrastructureCluster

func InfrastructureCluster(namespace, name string) *InfrastructureClusterBuilder

InfrastructureCluster returns and InfrastructureClusterBuilder with the given name and namespace.

func (*InfrastructureClusterBuilder) Build

Build returns an Unstructured object with the information passed to the InfrastructureClusterBuilder.

func (*InfrastructureClusterBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureClusterBuilder.

func (*InfrastructureClusterBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InfrastructureClusterBuilder) WithSpecFields

func (i *InfrastructureClusterBuilder) WithSpecFields(fields map[string]interface{}) *InfrastructureClusterBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type InfrastructureClusterTemplateBuilder

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

InfrastructureClusterTemplateBuilder holds the variables needed to build a generic InfrastructureClusterTemplate.

func InfrastructureClusterTemplate

func InfrastructureClusterTemplate(namespace, name string) *InfrastructureClusterTemplateBuilder

InfrastructureClusterTemplate returns an InfrastructureClusterTemplateBuilder with the given name and namespace.

func (*InfrastructureClusterTemplateBuilder) Build

Build creates a new Unstructured object with the variables passed to the InfrastructureClusterTemplateBuilder.

func (*InfrastructureClusterTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureClusterTemplateBuilder.

func (*InfrastructureClusterTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InfrastructureClusterTemplateBuilder) WithSpecFields

func (i *InfrastructureClusterTemplateBuilder) WithSpecFields(fields map[string]interface{}) *InfrastructureClusterTemplateBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type InfrastructureMachineTemplateBuilder

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

InfrastructureMachineTemplateBuilder holds the variables and objects needed to build an InfrastructureMachineTemplate.

func InfrastructureMachineTemplate

func InfrastructureMachineTemplate(namespace, name string) *InfrastructureMachineTemplateBuilder

InfrastructureMachineTemplate creates an InfrastructureMachineTemplateBuilder with the given name and namespace.

func (*InfrastructureMachineTemplateBuilder) Build

Build takes the objects and variables in the InfrastructureMachineTemplateBuilder and generates an unstructured object.

func (*InfrastructureMachineTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureMachineTemplateBuilder.

func (*InfrastructureMachineTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*InfrastructureMachineTemplateBuilder) WithSpecFields

func (i *InfrastructureMachineTemplateBuilder) WithSpecFields(fields map[string]interface{}) *InfrastructureMachineTemplateBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type MachineBuilder added in v1.2.0

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

MachineBuilder holds the variables required to build a Machine.

func Machine added in v1.2.0

func Machine(namespace, name string) *MachineBuilder

Machine returns a MachineBuilder.

func (*MachineBuilder) Build added in v1.2.0

func (m *MachineBuilder) Build() *clusterv1.Machine

Build produces a Machine object from the information passed to the MachineBuilder.

func (*MachineBuilder) DeepCopy added in v1.2.0

func (in *MachineBuilder) DeepCopy() *MachineBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineBuilder.

func (*MachineBuilder) DeepCopyInto added in v1.2.0

func (in *MachineBuilder) DeepCopyInto(out *MachineBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachineBuilder) WithBootstrapTemplate added in v1.2.0

func (m *MachineBuilder) WithBootstrapTemplate(bootstrap *unstructured.Unstructured) *MachineBuilder

WithBootstrapTemplate adds a bootstrap template to the MachineBuilder.

func (*MachineBuilder) WithClusterName added in v1.2.0

func (m *MachineBuilder) WithClusterName(clusterName string) *MachineBuilder

WithClusterName adds a clusterName to the MachineBuilder.

func (*MachineBuilder) WithLabels added in v1.2.0

func (m *MachineBuilder) WithLabels(labels map[string]string) *MachineBuilder

WithLabels adds the given labels to the MachineSetBuilder.

func (*MachineBuilder) WithVersion added in v1.2.0

func (m *MachineBuilder) WithVersion(version string) *MachineBuilder

WithVersion adds a version to the MachineBuilder.

type MachineDeploymentBuilder

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

MachineDeploymentBuilder holds the variables and objects needed to build a generic MachineDeployment.

func MachineDeployment

func MachineDeployment(namespace, name string) *MachineDeploymentBuilder

MachineDeployment creates a MachineDeploymentBuilder with the given name and namespace.

func (*MachineDeploymentBuilder) Build

Build creates a new MachineDeployment with the variables and objects passed to the MachineDeploymentBuilder.

func (*MachineDeploymentBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentBuilder.

func (*MachineDeploymentBuilder) DeepCopyInto added in v1.2.0

func (in *MachineDeploymentBuilder) DeepCopyInto(out *MachineDeploymentBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachineDeploymentBuilder) WithBootstrapTemplate

WithBootstrapTemplate adds the passed Unstructured object to the MachineDeploymentBuilder as a bootstrapTemplate.

func (*MachineDeploymentBuilder) WithClusterName added in v1.2.0

func (m *MachineDeploymentBuilder) WithClusterName(name string) *MachineDeploymentBuilder

WithClusterName adds the clusterName to the MachineDeploymentBuilder.

func (*MachineDeploymentBuilder) WithDefaulter added in v1.2.0

func (m *MachineDeploymentBuilder) WithDefaulter(defaulter bool) *MachineDeploymentBuilder

WithDefaulter runs the Default function on the MachineDeploymentClassBuilder object.

func (*MachineDeploymentBuilder) WithGeneration

func (m *MachineDeploymentBuilder) WithGeneration(generation int64) *MachineDeploymentBuilder

WithGeneration sets the passed value on the machine deployments object metadata.

func (*MachineDeploymentBuilder) WithInfrastructureTemplate

func (m *MachineDeploymentBuilder) WithInfrastructureTemplate(ref *unstructured.Unstructured) *MachineDeploymentBuilder

WithInfrastructureTemplate adds the passed unstructured object to the MachineDeployment builder as an infrastructureMachineTemplate.

func (*MachineDeploymentBuilder) WithLabels

WithLabels adds the given labels to the MachineDeploymentBuilder.

func (*MachineDeploymentBuilder) WithReplicas

func (m *MachineDeploymentBuilder) WithReplicas(replicas int32) *MachineDeploymentBuilder

WithReplicas sets the number of replicas for the MachineDeploymentClassBuilder.

func (*MachineDeploymentBuilder) WithSelector added in v1.4.2

WithSelector adds the passed selector to the MachineDeployment as the selector.

func (*MachineDeploymentBuilder) WithStatus

WithStatus sets the passed status object as the status of the machine deployment object.

func (*MachineDeploymentBuilder) WithVersion

func (m *MachineDeploymentBuilder) WithVersion(version string) *MachineDeploymentBuilder

WithVersion sets the passed version on the machine deployment spec.

type MachineDeploymentClassBuilder

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

MachineDeploymentClassBuilder holds the variables and objects required to build a clusterv1.MachineDeploymentClass.

func MachineDeploymentClass

func MachineDeploymentClass(class string) *MachineDeploymentClassBuilder

MachineDeploymentClass returns a MachineDeploymentClassBuilder with the given name and namespace.

func (*MachineDeploymentClassBuilder) Build

Build creates a full MachineDeploymentClass object with the variables passed to the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachineDeploymentClassBuilder) WithAnnotations

func (m *MachineDeploymentClassBuilder) WithAnnotations(annotations map[string]string) *MachineDeploymentClassBuilder

WithAnnotations sets the annotations for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithBootstrapTemplate

WithBootstrapTemplate registers the passed Unstructured object as the BootstrapTemplate for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithFailureDomain added in v1.3.0

WithFailureDomain sets the FailureDomain for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithInfrastructureTemplate

WithInfrastructureTemplate registers the passed Unstructured object as the InfrastructureMachineTemplate for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithLabels

WithLabels sets the labels for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithMachineHealthCheckClass

WithMachineHealthCheckClass sets the MachineHealthCheckClass for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithMinReadySeconds added in v1.3.0

WithMinReadySeconds sets the MinReadySeconds for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithNodeDeletionTimeout added in v1.3.0

WithNodeDeletionTimeout sets the NodeDeletionTimeout for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithNodeDrainTimeout added in v1.3.0

WithNodeDrainTimeout sets the NodeDrainTimeout for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithNodeVolumeDetachTimeout added in v1.3.0

func (m *MachineDeploymentClassBuilder) WithNodeVolumeDetachTimeout(t *metav1.Duration) *MachineDeploymentClassBuilder

WithNodeVolumeDetachTimeout sets the NodeVolumeDetachTimeout for the MachineDeploymentClassBuilder.

func (*MachineDeploymentClassBuilder) WithStrategy added in v1.3.0

WithStrategy sets the Strategy for the MachineDeploymentClassBuilder.

type MachineDeploymentTopologyBuilder

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

MachineDeploymentTopologyBuilder holds the values needed to create a testable MachineDeploymentTopology.

func MachineDeploymentTopology

func MachineDeploymentTopology(name string) *MachineDeploymentTopologyBuilder

MachineDeploymentTopology returns a builder used to create a testable MachineDeploymentTopology.

func (*MachineDeploymentTopologyBuilder) Build

Build returns a testable MachineDeploymentTopology with any values passed to the builder.

func (*MachineDeploymentTopologyBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineDeploymentTopologyBuilder.

func (*MachineDeploymentTopologyBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachineDeploymentTopologyBuilder) WithClass

WithClass adds a class string used as the MachineDeploymentTopology class.

func (*MachineDeploymentTopologyBuilder) WithMachineHealthCheck added in v1.3.0

WithMachineHealthCheck adds MachineHealthCheckTopology used as the MachineHealthCheck value.

func (*MachineDeploymentTopologyBuilder) WithReplicas

WithReplicas adds a replicas value used as the MachineDeploymentTopology replicas value.

func (*MachineDeploymentTopologyBuilder) WithVariables

WithVariables adds variables used as the MachineDeploymentTopology variables value.

type MachineHealthCheckBuilder

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

MachineHealthCheckBuilder holds fields for creating a MachineHealthCheck.

func MachineHealthCheck

func MachineHealthCheck(namespace, name string) *MachineHealthCheckBuilder

MachineHealthCheck returns a MachineHealthCheckBuilder with the given name and namespace.

func (*MachineHealthCheckBuilder) Build

Build returns a MachineHealthCheck with the supplied details.

func (*MachineHealthCheckBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckBuilder.

func (*MachineHealthCheckBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachineHealthCheckBuilder) WithClusterName

func (m *MachineHealthCheckBuilder) WithClusterName(clusterName string) *MachineHealthCheckBuilder

WithClusterName adds a cluster name for the MachineHealthCheck.

func (*MachineHealthCheckBuilder) WithDefaulter added in v1.2.0

func (m *MachineHealthCheckBuilder) WithDefaulter(defaulter bool) *MachineHealthCheckBuilder

WithDefaulter runs the Default function on the MachineHealthCheck object.

func (*MachineHealthCheckBuilder) WithMaxUnhealthy

func (m *MachineHealthCheckBuilder) WithMaxUnhealthy(maxUnhealthy *intstr.IntOrString) *MachineHealthCheckBuilder

WithMaxUnhealthy adds a MaxUnhealthyValue for the MachineHealthCheck.

func (*MachineHealthCheckBuilder) WithOwnerReferences

func (m *MachineHealthCheckBuilder) WithOwnerReferences(ownerRefs []metav1.OwnerReference) *MachineHealthCheckBuilder

WithOwnerReferences adds ownerreferences for the MachineHealthCheck.

func (*MachineHealthCheckBuilder) WithSelector

WithSelector adds the selector used to target machines for the MachineHealthCheck.

func (*MachineHealthCheckBuilder) WithUnhealthyConditions

func (m *MachineHealthCheckBuilder) WithUnhealthyConditions(conditions []clusterv1.UnhealthyCondition) *MachineHealthCheckBuilder

WithUnhealthyConditions adds the spec used to build the parameters of the MachineHealthCheck.

type MachinePoolBuilder added in v1.2.0

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

MachinePoolBuilder holds the variables and objects needed to build a generic MachinePool.

func MachinePool added in v1.2.0

func MachinePool(namespace, name string) *MachinePoolBuilder

MachinePool creates a MachinePoolBuilder with the given name and namespace.

func (*MachinePoolBuilder) Build added in v1.2.0

func (m *MachinePoolBuilder) Build() *expv1.MachinePool

Build creates a new MachinePool with the variables and objects passed to the MachinePoolBuilder.

func (*MachinePoolBuilder) DeepCopy added in v1.2.0

func (in *MachinePoolBuilder) DeepCopy() *MachinePoolBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachinePoolBuilder.

func (*MachinePoolBuilder) DeepCopyInto added in v1.2.0

func (in *MachinePoolBuilder) DeepCopyInto(out *MachinePoolBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachinePoolBuilder) WithBootstrapTemplate added in v1.2.0

func (m *MachinePoolBuilder) WithBootstrapTemplate(ref *unstructured.Unstructured) *MachinePoolBuilder

WithBootstrapTemplate adds the passed Unstructured object to the MachinePoolBuilder as a bootstrapTemplate.

func (*MachinePoolBuilder) WithClusterName added in v1.2.0

func (m *MachinePoolBuilder) WithClusterName(clusterName string) *MachinePoolBuilder

WithClusterName sets the passed clusterName on the MachinePool spec.

func (*MachinePoolBuilder) WithInfrastructureTemplate added in v1.2.0

func (m *MachinePoolBuilder) WithInfrastructureTemplate(ref *unstructured.Unstructured) *MachinePoolBuilder

WithInfrastructureTemplate adds the passed unstructured object to the MachinePool builder as an infrastructureMachineTemplate.

func (*MachinePoolBuilder) WithLabels added in v1.2.0

func (m *MachinePoolBuilder) WithLabels(labels map[string]string) *MachinePoolBuilder

WithLabels adds the given labels to the MachinePoolBuilder.

func (*MachinePoolBuilder) WithReplicas added in v1.2.0

func (m *MachinePoolBuilder) WithReplicas(replicas int32) *MachinePoolBuilder

WithReplicas sets the number of replicas for the MachinePoolBuilder.

func (*MachinePoolBuilder) WithStatus added in v1.2.0

WithStatus sets the passed status object as the status of the MachinePool object.

func (*MachinePoolBuilder) WithVersion added in v1.2.0

func (m *MachinePoolBuilder) WithVersion(version string) *MachinePoolBuilder

WithVersion sets the passed version on the MachinePool spec.

type MachineSetBuilder

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

MachineSetBuilder holds the variables and objects needed to build a MachineSet.

func MachineSet

func MachineSet(namespace, name string) *MachineSetBuilder

MachineSet creates a MachineSetBuilder with the given name and namespace.

func (*MachineSetBuilder) Build

Build creates a new MachineSet with the variables and objects passed to the MachineSetBuilder.

func (*MachineSetBuilder) DeepCopy added in v1.2.0

func (in *MachineSetBuilder) DeepCopy() *MachineSetBuilder

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetBuilder.

func (*MachineSetBuilder) DeepCopyInto added in v1.2.0

func (in *MachineSetBuilder) DeepCopyInto(out *MachineSetBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MachineSetBuilder) WithBootstrapTemplate

func (m *MachineSetBuilder) WithBootstrapTemplate(ref *unstructured.Unstructured) *MachineSetBuilder

WithBootstrapTemplate adds the passed Unstructured object to the MachineSetBuilder as a bootstrapTemplate.

func (*MachineSetBuilder) WithClusterName added in v1.2.6

func (m *MachineSetBuilder) WithClusterName(name string) *MachineSetBuilder

WithClusterName sets the number of replicas for the MachineSetBuilder.

func (*MachineSetBuilder) WithInfrastructureTemplate

func (m *MachineSetBuilder) WithInfrastructureTemplate(ref *unstructured.Unstructured) *MachineSetBuilder

WithInfrastructureTemplate adds the passed unstructured object to the MachineSetBuilder as an infrastructureMachineTemplate.

func (*MachineSetBuilder) WithLabels

func (m *MachineSetBuilder) WithLabels(labels map[string]string) *MachineSetBuilder

WithLabels adds the given labels to the MachineSetBuilder.

func (*MachineSetBuilder) WithOwnerReferences added in v1.2.6

func (m *MachineSetBuilder) WithOwnerReferences(ownerRefs []metav1.OwnerReference) *MachineSetBuilder

WithOwnerReferences adds ownerReferences for the MachineSetBuilder.

func (*MachineSetBuilder) WithReplicas

func (m *MachineSetBuilder) WithReplicas(replicas *int32) *MachineSetBuilder

WithReplicas sets the number of replicas for the MachineSetBuilder.

type TestBootstrapTemplateBuilder added in v1.2.0

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

TestBootstrapTemplateBuilder holds the variables needed to build a generic TestBootstrapTemplate.

func TestBootstrapTemplate added in v1.2.0

func TestBootstrapTemplate(namespace, name string) *TestBootstrapTemplateBuilder

TestBootstrapTemplate creates a TestBootstrapTemplateBuilder with the given name and namespace.

func (*TestBootstrapTemplateBuilder) Build added in v1.2.0

Build creates a new Unstructured object with the information passed to the BootstrapTemplateBuilder.

func (*TestBootstrapTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestBootstrapTemplateBuilder.

func (*TestBootstrapTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestBootstrapTemplateBuilder) WithSpecFields added in v1.2.0

func (b *TestBootstrapTemplateBuilder) WithSpecFields(fields map[string]interface{}) *TestBootstrapTemplateBuilder

WithSpecFields will add fields of any type to the object spec. It takes an argument, fields, which is of the form path: object. NOTE: The path should correspond to a field defined in the CRD.

type TestControlPlaneBuilder added in v1.2.0

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

TestControlPlaneBuilder holds the variables and objects needed to build a generic object for cluster.spec.controlPlaneRef.

func (*TestControlPlaneBuilder) Build added in v1.2.0

Build generates an Unstructured object from the information passed to the TestControlPlaneBuilder.

func (*TestControlPlaneBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestControlPlaneBuilder.

func (*TestControlPlaneBuilder) DeepCopyInto added in v1.2.0

func (in *TestControlPlaneBuilder) DeepCopyInto(out *TestControlPlaneBuilder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestControlPlaneBuilder) WithInfrastructureMachineTemplate added in v1.2.0

func (c *TestControlPlaneBuilder) WithInfrastructureMachineTemplate(t *unstructured.Unstructured) *TestControlPlaneBuilder

WithInfrastructureMachineTemplate adds the given unstructured object to the TestControlPlaneBuilder as its InfrastructureMachineTemplate.

func (*TestControlPlaneBuilder) WithReplicas added in v1.2.0

func (c *TestControlPlaneBuilder) WithReplicas(replicas int64) *TestControlPlaneBuilder

WithReplicas sets the number of replicas for the TestControlPlaneBuilder.

func (*TestControlPlaneBuilder) WithSpecFields added in v1.2.0

func (c *TestControlPlaneBuilder) WithSpecFields(fields map[string]interface{}) *TestControlPlaneBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

func (*TestControlPlaneBuilder) WithStatusFields added in v1.2.0

func (c *TestControlPlaneBuilder) WithStatusFields(fields map[string]interface{}) *TestControlPlaneBuilder

WithStatusFields sets a map of status fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the status field.

Note: all the paths should start with "status."

Example map: map[string]interface{}{
    "status.version": "v1.2.3",
}.

func (*TestControlPlaneBuilder) WithVersion added in v1.2.0

func (c *TestControlPlaneBuilder) WithVersion(version string) *TestControlPlaneBuilder

WithVersion adds the passed version to the TestControlPlaneBuilder.

type TestControlPlaneTemplateBuilder added in v1.2.0

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

TestControlPlaneTemplateBuilder holds the variables and objects needed to build a generic ControlPlane template.

func TestControlPlaneTemplate added in v1.2.0

func TestControlPlaneTemplate(namespace, name string) *TestControlPlaneTemplateBuilder

TestControlPlaneTemplate creates a NewControlPlaneTemplate builder with the given name and namespace.

func (*TestControlPlaneTemplateBuilder) Build added in v1.2.0

Build creates an Unstructured object from the variables passed to the ControlPlaneTemplateBuilder.

func (*TestControlPlaneTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestControlPlaneTemplateBuilder.

func (*TestControlPlaneTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestControlPlaneTemplateBuilder) WithInfrastructureMachineTemplate added in v1.2.0

WithInfrastructureMachineTemplate adds the given Unstructured object to the ControlPlaneTemplateBuilder as its InfrastructureMachineTemplate.

func (*TestControlPlaneTemplateBuilder) WithSpecFields added in v1.2.0

func (c *TestControlPlaneTemplateBuilder) WithSpecFields(fields map[string]interface{}) *TestControlPlaneTemplateBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."; the path should correspond to a field defined in the CRD.

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type TestInfrastructureClusterBuilder added in v1.2.0

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

TestInfrastructureClusterBuilder holds the variables and objects needed to build a generic TestInfrastructureCluster.

func TestInfrastructureCluster added in v1.2.0

func TestInfrastructureCluster(namespace, name string) *TestInfrastructureClusterBuilder

TestInfrastructureCluster returns and TestInfrastructureClusterBuilder with the given name and namespace.

func (*TestInfrastructureClusterBuilder) Build added in v1.2.0

Build returns an Unstructured object with the information passed to the InfrastructureClusterBuilder.

func (*TestInfrastructureClusterBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestInfrastructureClusterBuilder.

func (*TestInfrastructureClusterBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestInfrastructureClusterBuilder) WithSpecFields added in v1.2.0

func (i *TestInfrastructureClusterBuilder) WithSpecFields(fields map[string]interface{}) *TestInfrastructureClusterBuilder

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."; the path should correspond to a field defined in the CRD.

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type TestInfrastructureClusterTemplateBuilder added in v1.2.0

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

TestInfrastructureClusterTemplateBuilder holds the variables needed to build a generic TestInfrastructureClusterTemplate.

func TestInfrastructureClusterTemplate added in v1.2.0

func TestInfrastructureClusterTemplate(namespace, name string) *TestInfrastructureClusterTemplateBuilder

TestInfrastructureClusterTemplate returns an TestInfrastructureClusterTemplateBuilder with the given name and namespace.

func (*TestInfrastructureClusterTemplateBuilder) Build added in v1.2.0

Build creates a new Unstructured object with the variables passed to the InfrastructureClusterTemplateBuilder.

func (*TestInfrastructureClusterTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestInfrastructureClusterTemplateBuilder.

func (*TestInfrastructureClusterTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestInfrastructureClusterTemplateBuilder) WithSpecFields added in v1.2.0

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."; the path should correspond to a field defined in the CRD.

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

type TestInfrastructureMachineTemplateBuilder added in v1.2.0

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

TestInfrastructureMachineTemplateBuilder holds the variables and objects needed to build an TestInfrastructureMachineTemplate.

func TestInfrastructureMachineTemplate added in v1.2.0

func TestInfrastructureMachineTemplate(namespace, name string) *TestInfrastructureMachineTemplateBuilder

TestInfrastructureMachineTemplate creates an TestInfrastructureMachineTemplateBuilder with the given name and namespace.

func (*TestInfrastructureMachineTemplateBuilder) Build added in v1.2.0

Build takes the objects and variables in the InfrastructureMachineTemplateBuilder and generates an unstructured object.

func (*TestInfrastructureMachineTemplateBuilder) DeepCopy added in v1.2.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestInfrastructureMachineTemplateBuilder.

func (*TestInfrastructureMachineTemplateBuilder) DeepCopyInto added in v1.2.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TestInfrastructureMachineTemplateBuilder) WithSpecFields added in v1.2.0

WithSpecFields sets a map of spec fields on the unstructured object. The keys in the map represent the path and the value corresponds to the value of the spec field.

Note: all the paths should start with "spec."; the path should correspond to a field defined in the CRD.

Example map: map[string]interface{}{
    "spec.version": "v1.2.3",
}.

Jump to

Keyboard shortcuts

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