// WipeObjectMetaSystemFields erases fields that are managed by the system on ObjectMeta. func WipeObjectMetaSystemFields(meta metav1.Object) { … } // FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta. func FillObjectMetaSystemFields(meta metav1.Object) { … } // EnsureObjectNamespaceMatchesRequestNamespace returns an error if obj.Namespace and requestNamespace // are both populated and do not match. If either is unpopulated, it modifies obj as needed to ensure // obj.GetNamespace() == requestNamespace. func EnsureObjectNamespaceMatchesRequestNamespace(requestNamespace string, obj metav1.Object) error { … } // ExpectedNamespaceForScope returns the expected namespace for a resource, given the request namespace and resource scope. func ExpectedNamespaceForScope(requestNamespace string, namespaceScoped bool) string { … } // ExpectedNamespaceForResource returns the expected namespace for a resource, given the request namespace. func ExpectedNamespaceForResource(requestNamespace string, resource schema.GroupVersionResource) string { … }