mirror of
https://github.com/rancher/types.git
synced 2025-07-10 12:03:04 +00:00
Make cluster name generated
This commit is contained in:
parent
fff1769c30
commit
eb54542307
@ -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"`
|
||||
|
@ -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{}).
|
||||
|
Loading…
Reference in New Issue
Block a user