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: Done-Errata
    • Icon: Normal Normal
    • None
    • 4.13, 4.12, 4.14
    • oc
    • No
    • Workloads Sprint 254
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the `oc set env` command wrongly changed the apiVersion of Route and DeploymentConfig objects, removing the group part. For example, `apps.openshift.io/v1` became `v1`. This caused the command to exit with "unable to recognize no matches for kind" errors. With this release, the error is fixed so that the `os set env` command keeps the correct version in the Route and DeploymentConfig objects. (link:https://issues.redhat.com/browse/OCPBUGS-32108[*OCPBUGS-32108*])
      Show
      * Previously, the `oc set env` command wrongly changed the apiVersion of Route and DeploymentConfig objects, removing the group part. For example, `apps.openshift.io/v1` became `v1`. This caused the command to exit with "unable to recognize no matches for kind" errors. With this release, the error is fixed so that the `os set env` command keeps the correct version in the Route and DeploymentConfig objects. (link: https://issues.redhat.com/browse/OCPBUGS-32108 [* OCPBUGS-32108 *])
    • Bug Fix
    • Done

      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:
                Resolved: