variables

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterVariablesToVariablesMap

func ClusterVariablesToVariablesMap(
	variables []v1beta1.ClusterVariable,
) map[string]apiextensionsv1.JSON

ClusterVariablesToVariablesMap converts a list of ClusterVariables to a map of JSON (name is the map key). See: https://github.com/kubernetes-sigs/cluster-api/blob/v1.5.1/internal/controllers/topology/cluster/patches/variables/variables.go#L445

func ConvertAPIExtensionsToJSONSchemaProps added in v0.8.0

func ConvertAPIExtensionsToJSONSchemaProps(
	schema *apiextensionsv1.JSONSchemaProps, fldPath *field.Path,
) (*clusterv1.JSONSchemaProps, field.ErrorList)

ConvertAPIExtensionsToJSONSchemaProps converts a apiextensions.JSONSchemaProp to clusterv1.JSONSchemaProps.

func Get

func Get[T any](
	variables map[string]apiextensionsv1.JSON,
	name string,
	fields ...string,
) (value T, err error)

Get finds and parses variable to given type.

func IsNotFoundError added in v0.8.0

func IsNotFoundError(err error) bool

func MustSchemaFromCRDYAML added in v0.8.0

func MustSchemaFromCRDYAML(yaml []byte) clusterv1.VariableSchema

func SchemaFromCRDYAML added in v0.8.0

func SchemaFromCRDYAML(yaml []byte) (clusterv1.VariableSchema, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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