topology

package
v0.25.0-dev Latest Latest
Warning

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

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

Documentation

Overview

Package topology provides helper functions to work with Cluster and ClusterClass topology features, such as variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterClassVariable

func ClusterClassVariable(clusterClass *clusterv1.ClusterClass, name string) *clusterv1.ClusterClassVariable

ClusterClassVariable finds a ClusterClass variable by name.

func GetClusterClass added in v0.21.0

func GetClusterClass(ctx context.Context, c client.Client, cluster *clusterv1.Cluster) (*clusterv1.ClusterClass, error)

GetClusterClass gets ClusterClass for the cluster. Returns nil if the cluster is not classy. Pre-reqs: cluster != nil

func GetMDVariable added in v0.21.0

func GetMDVariable(cluster *clusterv1.Cluster, mdIndex int, name string, value interface{}) error

GetMDVariable gets the value of the variable, possibly overridden for the given machineDeployment. Pre-reqs: cluster.Spec.Topology != nil && cluster.Spec.Topology.Workers != nil

func GetVariable

func GetVariable(cluster *clusterv1.Cluster, name string, value interface{}) error

GetVariable gets the value of the cluster variable. Pre-reqs: cluster.Spec.Topology != nil

func SetMDVariable added in v0.21.0

func SetMDVariable(cluster *clusterv1.Cluster, mdIndex int, name string, value interface{}) error

SetMDVariable sets the variable for the given machineDeployment, overriding it if necessary, to the given value. Pre-reqs: cluster.Spec.Topology != nil && cluster.Spec.Topology.Workers != nil

func SetVariable

func SetVariable(cluster *clusterv1.Cluster, name string, value interface{}) error

SetVariable sets the cluster variable, to the given value. Pre-reqs: cluster.Spec.Topology != nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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