Skip to content
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
4 changes: 2 additions & 2 deletions internal/gatewayapi/status/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func SetGatewayListenerStatusCondition(gateway *gwapiv1.Gateway, listenerStatusI

const (
messageAddressNotAssigned = "No addresses have been assigned to the Gateway"
messageFmtTooManyAddresses = "Too many addresses (%d) have been assigned to the Gateway, the maximum number of addresses is 16"
messageFmtTooManyAddresses = "Too many addresses (%d) have been assigned to the Gateway; only the first 16 are included in the status."
messageNoResources = "Envoy replicas unavailable"
messageFmtProgrammed = "Address assigned to the Gateway, %d/%d envoy replicas available"
)
Expand All @@ -166,7 +166,7 @@ func updateGatewayProgrammedCondition(gw *gwapiv1.Gateway, envoyObj client.Objec

if len(gw.Status.Addresses) > 16 {
gw.Status.Conditions = MergeConditions(gw.Status.Conditions,
newCondition(string(gwapiv1.GatewayConditionProgrammed), metav1.ConditionFalse, string(gwapiv1.GatewayReasonInvalid),
newCondition(string(gwapiv1.GatewayConditionProgrammed), metav1.ConditionTrue, string(gwapiv1.GatewayReasonProgrammed),
fmt.Sprintf(messageFmtTooManyAddresses, len(gw.Status.Addresses)), gw.Generation))

// Truncate the addresses to 16
Expand Down
6 changes: 3 additions & 3 deletions internal/gatewayapi/status/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,14 @@ func TestUpdateGatewayProgrammedCondition(t *testing.T) {
},
},
{
name: "not ready gateway with too many addresses",
name: "ready gateway with too many addresses",
serviceAddressNum: 17,
deploymentStatus: appsv1.DeploymentStatus{AvailableReplicas: 1},
expectCondition: []metav1.Condition{
{
Type: string(gwapiv1.GatewayConditionProgrammed),
Status: metav1.ConditionFalse,
Reason: string(gwapiv1.GatewayReasonInvalid),
Status: metav1.ConditionTrue,
Reason: string(gwapiv1.GatewayReasonProgrammed),
Message: fmt.Sprintf(messageFmtTooManyAddresses, 17),
},
},
Expand Down