Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-6225

Helm upgrade on OpenShift 4.9 failing with schema errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • openshift-4.9
    • openshift-4.9
    • UI
    • ODC Sprint 206, ODC Sprint 207
    • Moderate

      Description of problem:

      In 4.8 when we upgrade a helm release without changing the version we get back the values file that was sent during install. Then we could change a parameter like replicas and send the update. However with latest version of 4.9 I see a problem while getting back the values file installed. In addition to the initial values sent during install I get a new section we empty objects. For example:

      I sent this env vars:

      env: 
        - name: ARTIFACT_DIR
          value: microprofile-config/target
      

      But then get back these:

      env: 
          - valueFrom: 
              configMapKeyRef: {}
              fieldRef: {}
              resourceFieldRef: {}
              secretKeyRef: {}
            name: ARTIFACT_DIR
      

      The error I get is this:

      Failed to upgrade helm release: values don't meet the specifications of the schema(s) in the following chart(s):
      wildfly: 
      - build.env.0.valueFrom.fieldRef: fieldPath is required
      - build.env.0.valueFrom.resourceFieldRef: resource is required
      - build.env.0.valueFrom.secretKeyRef: key is required
      - build.env.0.valueFrom.configMapKeyRef: key is required
      - build.env.1.valueFrom.fieldRef: fieldPath is required
      - build.env.1.valueFrom.resourceFieldRef: resource is required
      - build.env.1.valueFrom.secretKeyRef: key is required
      - build.env.1.valueFrom.configMapKeyRef: key is required
      - build.env.2.valueFrom.fieldRef: fieldPath is required
      - build.env.2.valueFrom.resourceFieldRef: resource is required
      - build.env.2.valueFrom.secretKeyRef: key is required
      - build.env.2.valueFrom.configMapKeyRef: key is required
      - deploy.env.0.valueFrom.configMapKeyRef: key is required
      - deploy.env.0.valueFrom.fieldRef: fieldPath is required
      - deploy.env.0.valueFrom.resourceFieldRef: resource is required
      - deploy.env.0.valueFrom.secretKeyRef: key is required
      

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. Install wildfly chart using values file below
      2. Upgrade the release and change replicas from 2 to 1

      Values File:

      build: 
        uri: https://github.com/wildfly/quickstart.git
        ref: 23.0.0.Final
        mode: bootable-jar
        env: 
        - name: ARTIFACT_DIR
          value: microprofile-config/target
        - name: MAVEN_ARGS_APPEND
          # Use the bootable-jar-openshift profile to ensure that the application
          # can be deployed on OpenShift but disable JKube as the image will be 
          # built and deployed by this chart.
          value: -am -pl microprofile-config -Pbootable-jar-openshift -Djkube.skip=true
        - name: MAVEN_OPTS
          value: '-XX:MetaspaceSize=251m -XX:MaxMetaspaceSize=256m'
      deploy: 
        replicas: 2
        env: 
        - name: CONFIG_PROP
          value: Hello from OpenShift
      

      Actual results:

      Error as indicated in description

      Expected results:

      Deployment replicas updated

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      4.9.0-0.nightly-2021-08-02-044755

      Additional info:

      To workaround user can remove all the valueFrom section through out the values file and it will work like in 4.8.

              rorai Rohit Rai
              dperaza@redhat.com David Peraza
              Sanket Pathak Sanket Pathak
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: