Skip to content

Commit

Permalink
Add DefinitionFrom field to ClusterVariable
Browse files Browse the repository at this point in the history
  • Loading branch information
killianmuldoon committed Feb 8, 2023
1 parent 1b61819 commit ddf405c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
12 changes: 9 additions & 3 deletions api/v1beta1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,19 @@ type MachineHealthCheckTopology struct {
MachineHealthCheckClass `json:",inline"`
}

// ClusterVariable can be used to customize the Cluster through
// patches. It must comply to the corresponding
// ClusterClassVariable defined in the ClusterClass.
// ClusterVariable can be used to customize the Cluster through patches. Each ClusterVariable is associated with a
// Variable definition in the ClusterClass `status` variables.
type ClusterVariable struct {
// Name of the variable.
Name string `json:"name"`

// DefinitionFrom specifies where the definition of this Variable is from. DefinitionFrom is `inline` when the
// definition is from the ClusterClass `.spec.variables` or the name of a patch defined in the ClusterClass
// `.spec.patches` where the patch is external and provides external variables.
// This field is mandatory if the variable has `DefinitionsConflict: true` in ClusterClass `status.variables[]`
// +optional
DefinitionFrom string `json:"definitionFrom,omitempty"`

// Value of the variable.
// Note: the value will be validated against the schema of the corresponding ClusterClassVariable
// from the ClusterClass.
Expand Down
9 changes: 8 additions & 1 deletion api/v1beta1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 25 additions & 5 deletions config/crd/bases/cluster.x-k8s.io_clusters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ddf405c

Please sign in to comment.