diff --git a/apis/management.cattle.io/v3/authn_types.go b/apis/management.cattle.io/v3/authn_types.go index 859f79f7..01bd0019 100644 --- a/apis/management.cattle.io/v3/authn_types.go +++ b/apis/management.cattle.io/v3/authn_types.go @@ -37,7 +37,7 @@ type GroupMember struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - GroupName string `json:"groupName,omitempty" norman:"type=reference[/v3/schemas/group]"` + GroupName string `json:"groupName,omitempty" norman:"type=reference[group]"` ExternalID string `json:"externalId,omitempty"` } @@ -57,9 +57,6 @@ type Identity struct { //LoginInput structure defines all properties that can be sent by client to create a token type LoginInput struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - TTLMillis string `json:"ttl,omitempty"` IdentityRefreshTTLMillis string `json:"identityRefreshTTL,omitempty"` Description string `json:"description,omitempty"` @@ -70,17 +67,11 @@ type LoginInput struct { //LocalCredential stores the local auth creds type LocalCredential struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Username string `json:"username"` Password string `json:"password"` } //GithubCredential stores the github auth creds type GithubCredential struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Code string `json:"code"` } diff --git a/apis/management.cattle.io/v3/cluster_types.go b/apis/management.cattle.io/v3/cluster_types.go index 2e7739ec..d87dda36 100644 --- a/apis/management.cattle.io/v3/cluster_types.go +++ b/apis/management.cattle.io/v3/cluster_types.go @@ -130,7 +130,7 @@ type AzureKubernetesServiceConfig struct { type ClusterEvent struct { v1.Event - ClusterName string + ClusterName string `json:"clusterName" norman:"type=reference[cluster]"` } type ClusterRegistrationToken struct { diff --git a/apis/management.cattle.io/v3/schema/schema.go b/apis/management.cattle.io/v3/schema/schema.go index da48024b..ccae0a17 100644 --- a/apis/management.cattle.io/v3/schema/schema.go +++ b/apis/management.cattle.io/v3/schema/schema.go @@ -14,6 +14,9 @@ var ( Version: "v3", Group: "management.cattle.io", Path: "/v3", + SubContexts: map[string]bool{ + "clusters": true, + }, } Schemas = factory.Schemas(&Version). @@ -71,7 +74,13 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas { AddMapperForType(&Version, v3.ClusterStatus{}, m.Drop{"appliedSpec"}, ). - MustImport(&Version, v3.Cluster{}). + AddMapperForType(&Version, v3.ClusterEvent{}, &m.Move{ + From: "type", + To: "eventType", + }). + MustImportAndCustomize(&Version, v3.Cluster{}, func(schema *types.Schema) { + schema.SubContext = "clusters" + }). MustImport(&Version, v3.ClusterEvent{}). MustImport(&Version, v3.ClusterRegistrationToken{}) } diff --git a/apis/project.cattle.io/v3/schema/schema.go b/apis/project.cattle.io/v3/schema/schema.go index 09b32e22..29e312ac 100644 --- a/apis/project.cattle.io/v3/schema/schema.go +++ b/apis/project.cattle.io/v3/schema/schema.go @@ -233,6 +233,7 @@ func podTypes(schemas *types.Schemas) *types.Schemas { ). AddMapperForType(&Version, v1.ContainerPort{}, m.Drop{Field: "name"}, + m.Move{From: "hostIP", To: "hostIp"}, ). AddMapperForType(&Version, v1.VolumeMount{}, m.Enum{