-
Notifications
You must be signed in to change notification settings - Fork 587
fix error when updating invalid gateway status #7415
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -386,6 +386,7 @@ func (t *Translator) GetRelevantGateways(resources *resource.Resources) ( | |||
| gCtx := &GatewayContext{ | ||||
| Gateway: gateway, | ||||
| } | ||||
| gCtx.attachEnvoyProxy(resources, envoyproxyMap) | ||||
|
|
||||
| // Gateways that are not accepted by the controller because they reference an invalid EnvoyProxy. | ||||
| if status.GatewayNotAccepted(gCtx.Gateway) { | ||||
|
|
@@ -394,7 +395,6 @@ func (t *Translator) GetRelevantGateways(resources *resource.Resources) ( | |||
| continue | ||||
| } | ||||
|
|
||||
| gCtx.ResetListeners(resources, envoyproxyMap) | ||||
| if ep := gCtx.envoyProxy; ep != nil { | ||||
| key := utils.NamespacedName(ep) | ||||
| if err, exits := envoyproxyValidationErrorMap[key]; exits { | ||||
|
|
@@ -406,6 +406,8 @@ func (t *Translator) GetRelevantGateways(resources *resource.Resources) ( | |||
| } | ||||
| } | ||||
|
|
||||
| // we cannot do this early, otherwise there's an error when updating status. | ||||
| gCtx.ResetListeners(resources, envoyproxyMap) | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. due to the logic change, can we delete gateway/internal/gatewayapi/contexts.go Line 48 in 9935819
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if required by L398 to make sure envoyproxy is not alway nil.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I read wrong line, deleted. |
||||
| acceptedGateways = append(acceptedGateways, gCtx) | ||||
| } | ||||
| return | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this's a required field.