- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for stripUnusedFields (0.16 sec)
-
pkg/config/schema/kubeclient/common.go
_ = inf.SetTransform(opts.ObjectTransform) } else { _ = inf.SetTransform(stripUnusedFields) } if err := inf.SetWatchErrorHandler(informermetric.ErrorHandlerForCluster(opts.Cluster)); err != nil { log.Debugf("failed to set watch handler, informer may already be started: %v", err) } } // stripUnusedFields is the transform function for shared informers,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 8.1K bytes - Viewed (0) -
pkg/kube/util_test.go
Annotations: map[string]string{"c": "d"}, }, }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, _ := StripUnusedFields(tt.obj) if !reflect.DeepEqual(got, tt.want) { t.Errorf("StripUnusedFields: got %v, want %v", got, tt.want) } }) } } func TestSanitizeKubeConfig(t *testing.T) { cases := []struct { name string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 15 04:16:49 UTC 2024 - 10.8K bytes - Viewed (0) -
pkg/kube/util.go
return nil, errors.NewRequestEntityTooLargeError(fmt.Sprintf("limit is %d", MaxRequestBodyBytes)) } return data, nil } // StripUnusedFields is the transform function for shared informers, // it removes unused fields from objects before they are stored in the cache to save memory. func StripUnusedFields(obj any) (any, error) { t, ok := obj.(metav1.ObjectMetaAccessor) if !ok { // shouldn't happen return obj, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 05:10:23 UTC 2024 - 18.6K bytes - Viewed (0)