Skip to content

Commit 9ae5fc5

Browse files
authored
Merge pull request #8031 from killianmuldoon/pr-exvars-cluster-variable-definition
🌱 Add DefinitionFrom field to ClusterVariable
2 parents f426035 + ddf405c commit 9ae5fc5

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

api/v1beta1/cluster_types.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,19 @@ type MachineHealthCheckTopology struct {
234234
MachineHealthCheckClass `json:",inline"`
235235
}
236236

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

243+
// DefinitionFrom specifies where the definition of this Variable is from. DefinitionFrom is `inline` when the
244+
// definition is from the ClusterClass `.spec.variables` or the name of a patch defined in the ClusterClass
245+
// `.spec.patches` where the patch is external and provides external variables.
246+
// This field is mandatory if the variable has `DefinitionsConflict: true` in ClusterClass `status.variables[]`
247+
// +optional
248+
DefinitionFrom string `json:"definitionFrom,omitempty"`
249+
244250
// Value of the variable.
245251
// Note: the value will be validated against the schema of the corresponding ClusterClassVariable
246252
// from the ClusterClass.

api/v1beta1/zz_generated.openapi.go

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/cluster.x-k8s.io_clusters.yaml

Lines changed: 25 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)