Skip to content

Commit

Permalink
api: Set default status for HTTPProxy resources (#4133)
Browse files Browse the repository at this point in the history
When a new HTTPProxy is created, if Contour isn't yet running or
functioning properly, then no status is set on the resource.

This sets a default status of "NotReconciled/Waiting for controller"
on any new resource until an instance of Contour accecpts the
resource and updates the status.

Fixes #4132
  • Loading branch information
stevesloka authored Oct 25, 2021
1 parent 9799e70 commit 31a5c6a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis/projectcontour/v1/httpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ type HTTPProxy struct {
Spec HTTPProxySpec `json:"spec"`
// Status is a container for computed information about the HTTPProxy.
// +optional
// +kubebuilder:default={currentStatus: "NotReconciled", description:"Waiting for controller"}
Status HTTPProxyStatus `json:"status,omitempty"`
}

Expand Down
7 changes: 7 additions & 0 deletions changelogs/unreleased/4133-stevesloka-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Default status on HTTPProxy resources

When a new HTTPProxy is created, if Contour isn't yet running or
functioning properly, then no status is set on the resource.
Defaults of "NotReconciled/Waiting for controller" are now applied
to any new object until an instance of Contour accepts the
object and updates the status.
3 changes: 3 additions & 0 deletions examples/contour/01-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3899,6 +3899,9 @@ spec:
type: object
type: object
status:
default:
currentStatus: NotReconciled
description: Waiting for controller
description: Status is a container for computed information about the
HTTPProxy.
properties:
Expand Down
3 changes: 3 additions & 0 deletions examples/render/contour-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4095,6 +4095,9 @@ spec:
type: object
type: object
status:
default:
currentStatus: NotReconciled
description: Waiting for controller
description: Status is a container for computed information about the
HTTPProxy.
properties:
Expand Down
3 changes: 3 additions & 0 deletions examples/render/contour.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4092,6 +4092,9 @@ spec:
type: object
type: object
status:
default:
currentStatus: NotReconciled
description: Waiting for controller
description: Status is a container for computed information about the
HTTPProxy.
properties:
Expand Down

0 comments on commit 31a5c6a

Please sign in to comment.