Bug 1781178

Summary: Helm 3.0.0+ does not work with OpenShift objects (e.g. BuildConfig, Route, ImageStream, etc)
Product: OpenShift Container Platform Reporter: Maciej Szulik <maszulik>
Component: openshift-apiserverAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, astepano, bmchugh, ckoep, erich, mfojtik, mtleilia, nagrawal, ncurry, scuppett, skrenger, sttts, xxia
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1773682 Environment:
Last Closed: 2020-01-23 11:18:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1773682    
Bug Blocks: 1811693    

Comment 3 Maciej Szulik 2019-12-11 12:50:40 UTC
This should not be qa, moving back, since https://github.com/openshift/openshift-apiserver/pull/57 is still open.

Comment 5 Xingxing Xia 2019-12-13 07:17:36 UTC
Prepare OAS resources that don't have fields like "status":
cat route-test.yaml
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: my
spec:
  port:
    targetPort: 8080
  to:
    kind: Service
    name: my

cat bc-test.yaml
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  labels:
    app: ruby-ex
  name: ruby-ex
spec:
  output:
    to:
      kind: ImageStreamTag
      name: ruby-ex:latest
  source:
    git:
      uri: https://github.com/sclorg/ruby-ex.git
    type: Git
  strategy:
    sourceStrategy:
      from:
        kind: ImageStreamTag
        name: ruby-25-centos7:latest
    type: Source

In old 4.3.0-0.nightly-2019-12-10-235659 env, try --validate:
oc create -f route-test.yaml --validate
error: error validating "route-test.yaml": error validating data: [ValidationError(Route.spec.to): missing required field "weight" in com.github.openshift.api.route.v1.RouteTargetReference, ValidationError(Route.spec): missing required field "host" in com.github.openshift.api.route.v1.RouteSpec, ValidationError(Route): missing required field "status" in com.github.openshift.api.route.v1.Route]; if you choose to ignore these errors, turn validation off with --validate=false

oc create -f bc-test.yaml --validate
error: error validating "bc-dc-is.yaml": error validating data: [ValidationError(BuildConfig.spec): missing required field "nodeSelector" in com.github.openshift.api.build.v1.BuildConfigSpec, ValidationError(BuildConfig): missing required field "status" in com.github.openshift.api.build.v1.BuildConfig]; if you choose to ignore these errors, turn validation off with --validate=false

In 4.3.0-0.nightly-2019-12-12-215723 env, try again, they can succeed.

Comment 6 Xingxing Xia 2019-12-13 07:24:02 UTC
However, in latest 4.3.0-0.nightly-2019-12-12-215723 env, imagestream with no "spec" still fails if --validate is used:
cat is-test.yaml
kind: List
metadata: {}
apiVersion: v1
items:
- apiVersion: image.openshift.io/v1
  kind: ImageStream
  metadata:
    labels:
      app: ruby-ex
    name: ruby-25-centos7
  spec:
    tags:
    - from:
        kind: DockerImage
        name: centos/ruby-25-centos7
      name: latest
- apiVersion: image.openshift.io/v1
  kind: ImageStream
  metadata:
    labels:
      app: ruby-ex
    name: ruby-ex

oc create -f is-test.yaml --validate
error: error validating "is-test.yaml": error validating data: ValidationError(ImageStream): missing required field "spec" in com.github.openshift.api.image.v1.ImageStream; if you choose to ignore these errors, turn validation off with --validate=false

Seems https://github.com/openshift/api/pull/539/files does not include imagestream.

Comment 7 Maciej Szulik 2019-12-13 09:14:22 UTC
https://github.com/openshift/api/pull/543 will fix in in master, I'll open 4.3 picks soon after.

Comment 9 Xingxing Xia 2019-12-16 05:34:18 UTC
Verified in 4.3.0-0.nightly-2019-12-13-180405 with above steps.

Comment 11 errata-xmlrpc 2020-01-23 11:18:16 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, 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/RHBA-2020:0062

Comment 12 Maciej Szulik 2020-04-06 12:29:55 UTC
*** Bug 1811694 has been marked as a duplicate of this bug. ***