Bug 1805884

Summary: ValidationError(Route): missing required field "status" in com.github.openshift.api.route.v1.Route
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: openshift-apiserverAssignee: Stefan Schimanski <sttts>
Status: CLOSED DUPLICATE QA Contact: Xingxing Xia <xxia>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, maszulik, mfojtik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-24 11:39:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ryan Howe 2020-02-21 17:03:57 UTC
Description of problem:

Status should not be required when creating route object. 

Based on standard Kubernetes conventions [1,2], users should not be required to specify the status when creating a route.
  [1] https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#object-spec-and-status
  [2] https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

Version-Release number of selected component (if applicable):
3.x and 4.x

How reproducible:
100%

Steps to Reproduce:
1.
# oc create --validate=true -f /tmp/route.yaml
error: error validating "/tmp/route.yaml": error validating data: 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


Actual results:

Error when validate=true 

error: error validating "/tmp/route.yaml": error validating data: 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


Expected results:

status to not be required when validating object. 


```
status:
  ingress:
  - conditions:
    - status: "True"
      type: Admitted
```

Additional info:

```
# cat /tmp/route.yaml 
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: testroute
  namespace: openshift-console
spec:
  host: testroute.apps.rhoweocp42.ocp4.rhowe.com
  port:
    targetPort: http
  tls:
    insecureEdgeTerminationPolicy: Redirect
    termination: edge
  to:
    kind: Service
    name: downloads
    weight: 10
```


# oc explain route | grep required
   spec	<Object> -required-
   status	<Object> -required-

Comment 1 Maciej Szulik 2020-02-24 11:39:26 UTC

*** This bug has been marked as a duplicate of bug 1773682 ***