diff --git a/apis/management.cattle.io/v3/cluster_types.go b/apis/management.cattle.io/v3/cluster_types.go index 5bc558fb..5f1fe240 100644 --- a/apis/management.cattle.io/v3/cluster_types.go +++ b/apis/management.cattle.io/v3/cluster_types.go @@ -43,6 +43,7 @@ type Cluster struct { type ClusterSpec struct { Nodes []MachineConfig `json:"nodes"` + DisplayName string `json:"displayName"` Description string `json:"description"` Internal bool `json:"internal" norman:"nocreate,noupdate"` GoogleKubernetesEngineConfig *GoogleKubernetesEngineConfig `json:"googleKubernetesEngineConfig,omitempty"` diff --git a/apis/management.cattle.io/v3/schema/schema.go b/apis/management.cattle.io/v3/schema/schema.go index d90d7dfc..87d315af 100644 --- a/apis/management.cattle.io/v3/schema/schema.go +++ b/apis/management.cattle.io/v3/schema/schema.go @@ -50,6 +50,7 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas { return schemas. AddMapperForType(&Version, v3.Cluster{}, &m.Embed{Field: "status"}, + m.DisplayName{}, ). AddMapperForType(&Version, v3.ClusterStatus{}, m.Drop{Field: "appliedSpec"}, @@ -162,6 +163,8 @@ func machineTypes(schemas *types.Schemas) *types.Schemas { &m.Drop{Field: "machineDriverConfig"}, &m.Embed{Field: "nodeStatus"}, &m.SliceMerge{From: []string{"conditions", "nodeConditions"}, To: "conditions"}). + AddMapperForType(&Version, v3.MachineConfig{}, + &m.Drop{Field: "clusterName"}). AddMapperForType(&Version, v3.Machine{}, &m.Embed{Field: "status"}, m.DisplayName{}).