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

`oc set env` command changes apiVersion for route and deploymentconfig

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.13, 4.12, 4.14
    • oc
    • No
    • Workloads Sprint 254
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, `oc set env` erroneously changed the apiVersion of Route and DeploymentConfig objects, removing the group part (i.e `apps.openshift.io/v1` became `v1`), which caused the command to exit with "unable to recognize no matches for kind" errors. This version fixes the error so that `os set env` keeps the correct version in the Route and DeploymentConfig objects.
      Show
      Previously, `oc set env` erroneously changed the apiVersion of Route and DeploymentConfig objects, removing the group part (i.e `apps.openshift.io/v1` became `v1`), which caused the command to exit with "unable to recognize no matches for kind" errors. This version fixes the error so that `os set env` keeps the correct version in the Route and DeploymentConfig objects.
    • Bug Fix
    • In Progress

      Description of problem:

      The `oc set env` command changes apiVersion for route and deploymentconfig

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

      4.12, 4.13, 4.14

      How reproducible:

      100%

      Steps to Reproduce:

      With oc client 4.10
       
      $ oc410 set env -e FOO="BAR" -f process.json --local -o json
      {
          "kind": "Service",
          "apiVersion": "v1",
          "metadata": {
              "name": "test",
              "creationTimestamp": null,
              "labels": {
                  "app_name": "test",
                  "template": "immutable"
              }
          },
          "spec": {
              "ports": [
                  {
                      "name": "8080-tcp",
                      "protocol": "TCP",
                      "port": 8080,
                      "targetPort": 8080
                  }
              ],
              "selector": {
                  "app_name": "test",
                  "deploymentconfig": "test"
              },
              "type": "ClusterIP",
              "sessionAffinity": "None"
          },
          "status": {
              "loadBalancer": {}
          }
      }
      {
          "kind": "Route",
          "apiVersion": "route.openshift.io/v1",
          "metadata": {
              "name": "test",
              "creationTimestamp": null,
              "labels": {
                  "app_name": "test",
                  "template": "immutable"
              }
          },
      
      With oc client 4.12, 4.13 and 4.14
      
      $ oc41245 set env -e FOO="BAR" -f process.json --local -o json
      
      {
          "kind": "Service",
          "apiVersion": "v1",
          "metadata": {
              "name": "test",
              "creationTimestamp": null,
              "labels": {
                  "app_name": "test",
                  "template": "immutable"
              }
          },
          "spec": {
              "ports": [
                  {
                      "name": "8080-tcp",
                      "protocol": "TCP",
                      "port": 8080,
                      "targetPort": 8080
                  }
              ],
              "selector": {
                  "app_name": "test",
                  "deploymentconfig": "test"
              },
              "type": "ClusterIP",
              "sessionAffinity": "None"
          },
          "status": {
              "loadBalancer": {}
          }
      }
      {
          "kind": "Route",
          "apiVersion": "v1",
          "metadata": {
              "name": "test"
      
      .....
      .....
          "kind": "DeploymentConfig",
          "apiVersion": "v1",
      
      
      

      Actual results:

      The oc client version for 4.12, 4.13, 4.14 changes the apiVersion.

      Expected results:

      The apiVersion should not change the apiVersion for route and DeploymentConfig.

      Additional info:

          

            fmissi Flavian Missi
            rhn-support-dpateriy Divyam Pateriya
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: