mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Merge pull request #95012 from nodo/add-namespace-to-post-based-namespace-creation
Make the creation of namespace using POST and PATCH consistent
This commit is contained in:
@@ -218,8 +218,8 @@ func (h *holder) reset(t *testing.T) {
|
||||
}
|
||||
}
|
||||
func (h *holder) expect(gvr schema.GroupVersionResource, gvk, optionsGVK schema.GroupVersionKind, operation v1beta1.Operation, name, namespace string, object, oldObject, options bool) {
|
||||
// Special-case namespaces, since the object name shows up in request attributes for update/delete requests
|
||||
if len(namespace) == 0 && gvk.Group == "" && gvk.Version == "v1" && gvk.Kind == "Namespace" && operation != v1beta1.Create {
|
||||
// Special-case namespaces, since the object name shows up in request attributes
|
||||
if len(namespace) == 0 && gvk.Group == "" && gvk.Version == "v1" && gvk.Kind == "Namespace" {
|
||||
namespace = name
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user