Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-17509

Successful deletion of namespace returns Namespace schema, not Status

    XMLWordPrintable

Details

    • No
    • False
    • Hide

      None

      Show
      None

    Description

      Description of problem:

      Whereas the spec says (showing only relevant items):

      "/api/v1/namespaces/{name}": {
        "delete": {
          "responses": {
            "200": {
              "description": "OK",
              "schema": {
                "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status"
              }
            }
          }
        }
      }

      What actually gets returned from 

      
      

      DELETE /api/v1/namespaces/{name}

       is not a Status object, rather a Namespace object (metadata omitted):

      {
        "kind": "Namespace",
        "apiVersion": "v1",
        "status": {
          "phase": "Terminating"
        },
        "spec": {
          "finalizers": [
            "kubernetes"
          ]
        },
        "metadata": {
          ...
        }
      } 

      This was detected by expecting a string `status` field (as in Status object) while getting an object instead (in Namespace object).

      Version-Release number of selected component (if applicable):

       

      v1

      How reproducible:

      Always

      Steps to Reproduce:

      1. POST /api/v1/namespaces
         WITH PAYLOAD '{"metadata": {"name": "my_ns"}, "apiVersion": "v1"}'
      2. DELETE /api/v1/namespaces/my_ns
      

      Actual results:

      Explained above.

      Expected results:

       

      Additional info:

       

      Attachments

        Activity

          People

            dgrisonn@redhat.com Damien Grisonnet
            antonioan Antonio Abu Nassar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: