Bug 1998207 - Helm upgrade on OpenShift 4.9 failing with schema errors
Summary: Helm upgrade on OpenShift 4.9 failing with schema errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.9.0
Assignee: Rohit Rai
QA Contact: spathak@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-26 15:19 UTC by Rohit Rai
Modified: 2021-10-18 17:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:49:21 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9897 0 None None None 2021-08-26 15:24:20 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:49:35 UTC

Description Rohit Rai 2021-08-26 15:19:49 UTC
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
Install wildfly chart using values file below
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.

Comment 5 spathak@redhat.com 2021-09-06 13:07:32 UTC
Verified on build version: 4.9.0-0.nightly-2021-09-05-204238
Browser: Google Chrome 89

Comment 8 errata-xmlrpc 2021-10-18 17:49:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759


Note You need to log in before you can comment on or make changes to this bug.