Bug 1805884 - ValidationError(Route): missing required field "status" in com.github.openshift.api.route.v1.Route
Summary: ValidationError(Route): missing required field "status" in com.github.openshi...
Keywords:
Status: CLOSED DUPLICATE of bug 1773682
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-apiserver
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Stefan Schimanski
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-21 17:03 UTC by Ryan Howe
Modified: 2023-09-07 22:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-24 11:39:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


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