Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pending reason to GatewayClass, Gateway, Listener, and Routes #1453

Merged
merged 2 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions apis/v1alpha2/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const (
// Gateway has scheduled the Gateway to the underlying network
// infrastructure.
//
// Possible reasons for this condition to be true are:
// Possible reasons for this condition to be True are:
//
// * "Accepted"
//
Expand All @@ -209,6 +209,10 @@ const (
// * "NotReconciled"
// * "NoResources"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand All @@ -229,6 +233,9 @@ const (

// This reason is used with the "Accepted" condition when no controller has
// reconciled the Gateway.
GatewayReasonPending GatewayConditionReason = "Pending"
Copy link
Contributor

@mikemorris mikemorris Oct 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, but I think this should be updated to match the Listener documentation to note it should also be used with the "Ready" condition when the status is "Unknown", added as a task to #1454


// Deprecated: Use "Pending" instead.
GatewayReasonNotReconciled GatewayConditionReason = "NotReconciled"

// This reason is used with the "Accepted" condition when the
Expand Down Expand Up @@ -356,6 +363,10 @@ const (
// * "UnsupportedProtocol"
// * "UnsupportedAddress"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand Down Expand Up @@ -456,6 +467,10 @@ const (
// * "Invalid"
// * "Pending"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand All @@ -469,8 +484,8 @@ const (
// Listener is syntactically or semantically invalid.
ListenerReasonInvalid ListenerConditionReason = "Invalid"

// This reason is used with the "Ready" condition when the
// Listener is not yet not online and ready to accept client
// traffic.
// This reason is used with the "Accepted" and "Ready" conditions when the
// Listener is either not yet reconciled or not yet not online and ready to
// accept client traffic.
ListenerReasonPending ListenerConditionReason = "Pending"
)
8 changes: 7 additions & 1 deletion apis/v1alpha2/gatewayclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ const (
// Possible reasons for this condition to be False are:
//
// * "InvalidParameters"
// * "Waiting"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers should prefer to use the values of GatewayClassConditionReason
// for the corresponding Reason, where appropriate.
Expand All @@ -116,6 +119,9 @@ const (
// requested controller has not yet made a decision about whether
// to admit the GatewayClass. It is the default Reason on a new
// GatewayClass.
GatewayClassReasonPending GatewayClassConditionReason = "Pending"

// Deprecated: Use "Pending" instead.
GatewayClassReasonWaiting GatewayClassConditionReason = "Waiting"
)

Expand Down
8 changes: 8 additions & 0 deletions apis/v1alpha2/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ const (
// * "NoMatchingListenerHostname"
// * "UnsupportedValue"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand All @@ -93,6 +97,10 @@ const (
// is not recognized.
RouteReasonUnsupportedValue RouteConditionReason = "UnsupportedValue"

// This reason is used with the "Accepted" when a controller has not yet
// reconciled the route.
RouteReasonPending RouteConditionReason = "Pending"

// This condition indicates whether the controller was able to resolve all
// the object references for the Route.
//
Expand Down
23 changes: 19 additions & 4 deletions apis/v1beta1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ type GatewayStatus struct {
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:default={{type: "Accepted", status: "Unknown", reason:"NotReconciled", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
// +kubebuilder:default={{type: "Accepted", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Listeners provide status for each unique listener port defined in the Spec.
Expand Down Expand Up @@ -529,6 +529,10 @@ const (
// * "NotReconciled"
// * "NoResources"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand All @@ -549,6 +553,9 @@ const (

// This reason is used with the "Accepted" condition when no controller has
// reconciled the Gateway.
GatewayReasonPending GatewayConditionReason = "Pending"

// Deprecated: Use "Pending" instead.
GatewayReasonNotReconciled GatewayConditionReason = "NotReconciled"

// This reason is used with the "Accepted" condition when the
Expand Down Expand Up @@ -700,6 +707,10 @@ const (
// * "UnsupportedProtocol"
// * "UnsupportedAddress"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand Down Expand Up @@ -800,6 +811,10 @@ const (
// * "Invalid"
// * "Pending"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand All @@ -813,8 +828,8 @@ const (
// Listener is syntactically or semantically invalid.
ListenerReasonInvalid ListenerConditionReason = "Invalid"

// This reason is used with the "Ready" condition when the
// Listener is not yet not online and ready to accept client
// traffic.
// This reason is used with the "Accepted" and "Ready" conditions when the
// Listener is either not yet reconciled or not yet not online and ready to
// accept client traffic.
ListenerReasonPending ListenerConditionReason = "Pending"
)
10 changes: 8 additions & 2 deletions apis/v1beta1/gatewayclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ const (
// Possible reasons for this condition to be False are:
//
// * "InvalidParameters"
// * "Waiting"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers should prefer to use the values of GatewayClassConditionReason
// for the corresponding Reason, where appropriate.
Expand All @@ -172,6 +175,9 @@ const (
// requested controller has not yet made a decision about whether
// to admit the GatewayClass. It is the default Reason on a new
// GatewayClass.
GatewayClassReasonPending GatewayClassConditionReason = "Pending"

// Deprecated: Use "Pending" instead.
GatewayClassReasonWaiting GatewayClassConditionReason = "Waiting"
)

Expand All @@ -187,7 +193,7 @@ type GatewayClassStatus struct {
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:default={{type: "Accepted", status: "Unknown", message: "Waiting for controller", reason: "Waiting", lastTransitionTime: "1970-01-01T00:00:00Z"}}
// +kubebuilder:default={{type: "Accepted", status: "Unknown", message: "Waiting for controller", reason: "Pending", lastTransitionTime: "1970-01-01T00:00:00Z"}}
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

Expand Down
14 changes: 11 additions & 3 deletions apis/v1beta1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ const (
// * "NoMatchingListenerHostname"
// * "UnsupportedValue"
//
// Possible reasons for this condition to be Unknown are:
//
// * "Pending"
//
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
Expand All @@ -222,6 +226,10 @@ const (
// is not recognized.
RouteReasonUnsupportedValue RouteConditionReason = "UnsupportedValue"

// This reason is used with the "Accepted" when a controller has not yet
// reconciled the route.
RouteReasonPending RouteConditionReason = "Pending"

// This condition indicates whether the controller was able to resolve all
// the object references for the Route.
//
Expand Down Expand Up @@ -334,9 +342,9 @@ type RouteStatus struct {
// Hostname is the fully qualified domain name of a network host. This matches
// the RFC 1123 definition of a hostname with 2 notable exceptions:
//
// 1. IPs are not allowed.
// 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
// label must appear by itself as the first label.
// 1. IPs are not allowed.
// 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
// label must appear by itself as the first label.
//
// Hostname can be "precise" which is a domain name without the terminating
// dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/crd/standard/gateway.networking.k8s.io_gateways.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions config/crd/standard/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.