Documentation ¶
Overview ¶
Package topology provides helper functions to work with Cluster and ClusterClass topology features, such as variables.
Index ¶
- func ClusterClassVariable(clusterClass *clusterv1.ClusterClass, name string) *clusterv1.ClusterClassVariable
- func GetClusterClass(ctx context.Context, c client.Client, cluster *clusterv1.Cluster) (*clusterv1.ClusterClass, error)
- func GetMDVariable(cluster *clusterv1.Cluster, mdIndex int, name string, value interface{}) error
- func GetVariable(cluster *clusterv1.Cluster, name string, value interface{}) error
- func SetMDVariable(cluster *clusterv1.Cluster, mdIndex int, name string, value interface{}) error
- func SetVariable(cluster *clusterv1.Cluster, name string, value interface{}) error
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
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 ¶
GetVariable gets the value of the cluster variable. Pre-reqs: cluster.Spec.Topology != nil
func SetMDVariable ¶ added in v0.21.0
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
Types ¶
This section is empty.