variables

package
v0.99.99 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package variables calculates variables for patching.

Index

Constants

View Source
const (
	// BuiltinsName is the name of the builtin variable.
	BuiltinsName = "builtin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builtins

type Builtins struct {
	Cluster           *ClusterBuiltins           `json:"cluster,omitempty"`
	ControlPlane      *ControlPlaneBuiltins      `json:"controlPlane,omitempty"`
	MachineDeployment *MachineDeploymentBuiltins `json:"machineDeployment,omitempty"`
}

Builtins represents builtin variables exposed through patches.

type ClusterBuiltins

type ClusterBuiltins struct {
	// Name is the name of the cluster.
	Name string `json:"name,omitempty"`

	// Namespace is the namespace of the cluster.
	Namespace string `json:"namespace,omitempty"`

	// Topology represents the cluster topology variables.
	Topology *ClusterTopologyBuiltins `json:"topology,omitempty"`
}

ClusterBuiltins represents builtin cluster variables.

type ClusterTopologyBuiltins

type ClusterTopologyBuiltins struct {
	// Version is the Kubernetes version of the Cluster.
	// NOTE: Please note that this version might temporarily differ from the version
	// of the ControlPlane or workers while an upgrade process is being orchestrated.
	Version string `json:"version,omitempty"`

	// Class is the name of the ClusterClass of the Cluster.
	Class string `json:"class,omitempty"`
}

ClusterTopologyBuiltins represents builtin cluster topology variables.

type ControlPlaneBuiltins

type ControlPlaneBuiltins struct {
	// Version is the Kubernetes version of the ControlPlane object.
	// NOTE: Please note that this version is the version we are currently reconciling towards.
	// It can differ from the current version of the ControlPlane while an upgrade process is
	// being orchestrated.
	Version string `json:"version,omitempty"`

	// Replicas is the value of the replicas field of the ControlPlane object.
	Replicas *int64 `json:"replicas,omitempty"`
}

ControlPlaneBuiltins represents builtin ControlPlane variables. NOTE: These variables are only set for templates belonging to the ControlPlane object.

type MachineDeploymentBuiltins

type MachineDeploymentBuiltins struct {
	// Version is the Kubernetes version of the MachineDeployment,
	// to which the current template belongs to.
	// NOTE: Please note that this version is the version we are currently reconciling towards.
	// It can differ from the current version of the MachineDeployment machines while an upgrade process is
	// being orchestrated.
	Version string `json:"version,omitempty"`

	// Class is the class name of the MachineDeployment,
	// to which the current template belongs to.
	Class string `json:"class,omitempty"`

	// Name is the name of the MachineDeployment,
	// to which the current template belongs to.
	Name string `json:"name,omitempty"`

	// TopologyName is the topology name of the MachineDeployment,
	// to which the current template belongs to.
	TopologyName string `json:"topologyName,omitempty"`

	// Replicas is the value of the replicas field of the MachineDeployment,
	// to which the current template belongs to.
	Replicas *int64 `json:"replicas,omitempty"`
}

MachineDeploymentBuiltins represents builtin MachineDeployment variables. NOTE: These variables are only set for templates belonging to a MachineDeployment.

type VariableMap

type VariableMap map[string]apiextensionsv1.JSON

VariableMap is a name/value map of variables. Values are marshalled as JSON.

func ControlPlane

func ControlPlane(controlPlaneTopology *clusterv1.ControlPlaneTopology, controlPlane *unstructured.Unstructured) (VariableMap, error)

ControlPlane returns variables that apply to templates belonging to the ControlPlane.

func Global

func Global(clusterTopology *clusterv1.Topology, cluster *clusterv1.Cluster) (VariableMap, error)

Global returns variables that apply to all the templates, including user provided variables and builtin variables for the Cluster object.

func MachineDeployment

func MachineDeployment(mdTopology *clusterv1.MachineDeploymentTopology, md *clusterv1.MachineDeployment) (VariableMap, error)

MachineDeployment returns variables that apply to templates belonging to a MachineDeployment.

Jump to

Keyboard shortcuts

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