mirror of
https://github.com/rancher/types.git
synced 2025-09-18 07:52:41 +00:00
Embed crt status
This commit is contained in:
@@ -71,8 +71,8 @@ type MachineStatus struct {
|
||||
MachineDriverConfig string `json:"machineDriverConfig,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
|
||||
Token string `json:"token"`
|
||||
NodeTaints []v1.Taint `json:"nodeTaints,omitempty"`
|
||||
ExternalID string `json:"externalId,omitempty"`
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -119,6 +119,7 @@ type CustomConfig struct {
|
||||
type MachineSpec struct {
|
||||
NodeSpec v1.NodeSpec `json:"nodeSpec"`
|
||||
CustomConfig *CustomConfig `json:"customConfig"`
|
||||
Imported bool `json:"imported"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DisplayName string `json:"displayName"`
|
||||
RequestedHostname string `json:"requestedHostname,omitempty" norman:"type=dnsLabel,nullable,noupdate"`
|
||||
|
@@ -78,6 +78,9 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
From: "type",
|
||||
To: "eventType",
|
||||
}).
|
||||
AddMapperForType(&Version, v3.ClusterRegistrationToken{},
|
||||
&m.Embed{Field: "status"},
|
||||
).
|
||||
MustImportAndCustomize(&Version, v3.Cluster{}, func(schema *types.Schema) {
|
||||
schema.SubContext = "clusters"
|
||||
}).
|
||||
@@ -119,7 +122,6 @@ func machineTypes(schemas *types.Schemas) *types.Schemas {
|
||||
return schemas.
|
||||
AddMapperForType(&Version, v3.MachineSpec{}, &m.Embed{Field: "nodeSpec"}).
|
||||
AddMapperForType(&Version, v3.MachineStatus{},
|
||||
&m.Drop{Field: "token"},
|
||||
&m.Drop{Field: "rkeNode"},
|
||||
&m.Drop{Field: "machineTemplateSpec"},
|
||||
&m.Drop{Field: "machineDriverConfig"},
|
||||
|
Reference in New Issue
Block a user