Skip to content

Commit

Permalink
Merge pull request #1447 from mikemorris/gateway-condition-accepted
Browse files Browse the repository at this point in the history
add GatewayConditionAccepted and GatewayReasonAccepted
  • Loading branch information
k8s-ci-robot authored Oct 11, 2022
2 parents f533a1e + f5b54aa commit 295356b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 24 deletions.
17 changes: 13 additions & 4 deletions apis/v1alpha2/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const (
//
// Possible reasons for this condition to be true are:
//
// * "Scheduled"
// * "Accepted"
//
// Possible reasons for this condition to be False are:
//
Expand All @@ -212,17 +212,26 @@ const (
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
GatewayConditionAccepted GatewayConditionType = "Accepted"

// Deprecated: use "Accepted" instead.
GatewayConditionScheduled GatewayConditionType = "Scheduled"

// This reason is used with the "Accepted" condition when the condition is
// True.
GatewayReasonAccepted GatewayConditionReason = "Accepted"

// This reason is used with the "Scheduled" condition when the condition is
// true.
// True.
//
// Deprecated: use the "Accepted" condition with reason "Accepted" instead.
GatewayReasonScheduled GatewayConditionReason = "Scheduled"

// This reason is used with the "Scheduled" condition when no controller has
// This reason is used with the "Accepted" condition when no controller has
// reconciled the Gateway.
GatewayReasonNotReconciled GatewayConditionReason = "NotReconciled"

// This reason is used with the "Scheduled" condition when the
// This reason is used with the "Accepted" condition when the
// Gateway is not scheduled because insufficient infrastructure
// resources are available.
GatewayReasonNoResources GatewayConditionReason = "NoResources"
Expand Down
25 changes: 17 additions & 8 deletions apis/v1beta1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Gateway struct {

// Status defines the current state of Gateway.
//
// +kubebuilder:default={conditions: {{type: "Scheduled", status: "Unknown", reason:"NotReconciled", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}}
// +kubebuilder:default={conditions: {{type: "Accepted", status: "Unknown", reason:"NotReconciled", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}}
Status GatewayStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -487,14 +487,14 @@ type GatewayStatus struct {
//
// Known condition types are:
//
// * "Scheduled"
// * "Accepted"
// * "Ready"
//
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=8
// +kubebuilder:default={{type: "Scheduled", status: "Unknown", reason:"NotReconciled", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
// +kubebuilder:default={{type: "Accepted", status: "Unknown", reason:"NotReconciled", 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 All @@ -520,9 +520,9 @@ 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:
//
// * "Scheduled"
// * "Accepted"
//
// Possible reasons for this condition to be False are:
//
Expand All @@ -532,17 +532,26 @@ const (
// Controllers may raise this condition with other reasons,
// but should prefer to use the reasons listed above to improve
// interoperability.
GatewayConditionAccepted GatewayConditionType = "Accepted"

// Deprecated: use "Accepted" instead.
GatewayConditionScheduled GatewayConditionType = "Scheduled"

// This reason is used with the "Accepted" condition when the condition is
// True.
GatewayReasonAccepted GatewayConditionReason = "Accepted"

// This reason is used with the "Scheduled" condition when the condition is
// true.
// True.
//
// Deprecated: use the "Accepted" condition with reason "Accepted" instead.
GatewayReasonScheduled GatewayConditionReason = "Scheduled"

// This reason is used with the "Scheduled" condition when no controller has
// This reason is used with the "Accepted" condition when no controller has
// reconciled the Gateway.
GatewayReasonNotReconciled GatewayConditionReason = "NotReconciled"

// This reason is used with the "Scheduled" condition when the
// This reason is used with the "Accepted" condition when the
// Gateway is not scheduled because insufficient infrastructure
// resources are available.
GatewayReasonNoResources GatewayConditionReason = "NoResources"
Expand Down
12 changes: 6 additions & 6 deletions config/crd/experimental/gateway.networking.k8s.io_gateways.yaml

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

12 changes: 6 additions & 6 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.

0 comments on commit 295356b

Please sign in to comment.