- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for restoreObjectMeta (0.21 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/webhook_converter.go
} if e, a := in.GetUID(), out.GetUID(); e != a { return fmt.Errorf("must have the same UID: %v != %v", e, a) } return nil } // restoreObjectMeta deep-copies metadata from original into converted, while preserving labels and annotations from converted. func restoreObjectMeta(original, converted *unstructured.Unstructured) error { obj, found := converted.Object["metadata"] if !found {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 07 19:37:55 UTC 2023 - 20.6K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/webhook_converter_test.go
map[string]interface{}{"metadata": map[string]interface{}{}}, true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if err := restoreObjectMeta(&unstructured.Unstructured{Object: tt.original}, &unstructured.Unstructured{Object: tt.converted}); err == nil && tt.expectedError { t.Fatalf("expected error, but didn't get one") } else if err != nil && !tt.expectedError {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 13 15:27:39 UTC 2023 - 19.2K bytes - Viewed (0)