1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-10 20:00:23 +00:00

Fix CRD Created At field (#723)

* Add Tokens and Kubeconfig fields to date mapping

* Fix missing cols in transform func for watch

* Mark CRDs as.. CRD

* Don't transform CRD's date field
This commit is contained in:
Tom Lebreux
2025-07-11 13:28:52 -04:00
committed by GitHub
parent 127d37391d
commit faa5ad63e9
11 changed files with 116 additions and 24 deletions

View File

@@ -152,6 +152,20 @@ func SetAPIResource(s *types.APISchema, resource v1.APIResource) {
SetNamespaced(s, resource.Namespaced)
}
func MarkCRD(s *types.APISchema) {
if s.Attributes == nil {
s.Attributes = map[string]interface{}{}
}
s.Attributes["crd"] = true
}
func IsCRD(s *types.APISchema) bool {
if crd, ok := s.Attributes["crd"]; ok {
return crd.(bool)
}
return false
}
func SetColumns(s *types.APISchema, columns interface{}) {
if s.Attributes == nil {
s.Attributes = map[string]interface{}{}