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
    • False
    • Hide

      None

      Show
      None

      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:
            3 Start watching this issue

              Created:
              Updated: