mirror of
https://github.com/rancher/types.git
synced 2025-09-01 21:32:10 +00:00
Move mappers
This commit is contained in:
17
mapper/workload.go
Normal file
17
mapper/workload.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package mapper
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
m "github.com/rancher/norman/types/mapper"
|
||||
)
|
||||
|
||||
func NewWorkloadTypeMapper() types.Mapper {
|
||||
return &types.Mappers{
|
||||
&m.Move{From: "labels", To: "workloadLabels"},
|
||||
&m.Move{From: "annotations", To: "workloadAnnotations"},
|
||||
&m.Move{From: "metadata/labels", To: "labels", NoDeleteFromField: true},
|
||||
&m.Move{From: "metadata/annotations", To: "annotations", NoDeleteFromField: true},
|
||||
&m.Drop{Field: "metadata"},
|
||||
&NamespaceIDMapper{},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user