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

provider: finalize EnvoyProxy referenced by a managed GatewayClass #1534

Merged
merged 11 commits into from
Sep 12, 2023

Conversation

cnvergence
Copy link
Member

@cnvergence cnvergence commented Jun 15, 2023

What type of PR is this?

Add support for envoy proxy finalizers managed by GatewayClass

Which issue(s) this PR fixes:

Fixes:

@cnvergence cnvergence changed the title Add/remove finalizers for envoy proxies provider: finalize EnvoyProxy referenced by a managed GatewayClass Jun 15, 2023
@cnvergence cnvergence force-pushed the envoy-proxy-finalizers branch 2 times, most recently from 4c8ff65 to 535b66a Compare June 15, 2023 15:54
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #1534 (7c25ea0) into main (bde72ab) will increase coverage by 0.11%.
The diff coverage is 56.52%.

❗ Current head 7c25ea0 differs from pull request most recent head 5fe8c4e. Consider uploading reports for the commit 5fe8c4e to get more accurate results

@@            Coverage Diff             @@
##             main    #1534      +/-   ##
==========================================
+ Coverage   65.08%   65.20%   +0.11%     
==========================================
  Files          86       86              
  Lines       12476    12518      +42     
==========================================
+ Hits         8120     8162      +42     
- Misses       3835     3837       +2     
+ Partials      521      519       -2     
Files Changed Coverage Δ
internal/provider/kubernetes/controller.go 48.52% <56.52%> (+1.01%) ⬆️

... and 4 files with indirect coverage changes

@cnvergence cnvergence force-pushed the envoy-proxy-finalizers branch 3 times, most recently from 49674be to 9d4cfa1 Compare June 18, 2023 19:30
@cnvergence cnvergence marked this pull request as ready for review June 19, 2023 08:21
@cnvergence cnvergence requested a review from a team as a code owner June 19, 2023 08:21
@cnvergence cnvergence force-pushed the envoy-proxy-finalizers branch from 5cd8828 to 75672f2 Compare June 21, 2023 12:54
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label Jul 21, 2023
@arkodg
Copy link
Contributor

arkodg commented Jul 21, 2023

sorry for the delay in review @cnvergence, added some comments, can you please rebase as well, thanks !

@github-actions github-actions bot removed the stale label Jul 21, 2023
@cnvergence cnvergence force-pushed the envoy-proxy-finalizers branch 3 times, most recently from 9d8523d to add74e8 Compare July 26, 2023 14:59
@arkodg arkodg modified the milestones: 0.6.0, 0.6.0-rc1 Jul 27, 2023
arkodg
arkodg previously approved these changes Jul 27, 2023
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for hanging in there !

@arkodg arkodg self-requested a review July 27, 2023 17:58
@arkodg
Copy link
Contributor

arkodg commented Jul 27, 2023

hey @cnvergence trying to understand if this flows has been validated

  • when a GatewayClass stops referencing a EnvoyProxy resource, but is not deleted, do we remove the EnvoyProxy finalizer ? imo we should

@cnvergence
Copy link
Member Author

@arkodg Yes, we should, but currently if GatewayClass stops referencing a EnvoyProxy, the EnvoyProxy resource will remain on the cluster.
I have opened up a follow-up issue for this during the work on this.

@arkodg
Copy link
Contributor

arkodg commented Jul 28, 2023

@cnvergence if we merge this PR, it feels like a regression for this case

  • user creates EnvoyProxy E-A
  • user attaches E-A to GatewayClass G-C, which in turn adds a finalizer on E-A
  • user clears E-A from G-C
  • since the finalizer is still on E-A, it cannot be deleted by user, which will have a negative impact on the user's experience

@cnvergence
Copy link
Member Author

@arkodg you've got the point there
We could rework processing ParamsRef so we would support this case as well.

Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
@cnvergence cnvergence force-pushed the envoy-proxy-finalizers branch from 7c25ea0 to 5fe8c4e Compare August 30, 2023 19:47
}
r.log.Error(err, "failed to process parametersRef for gatewayclass", "name", acceptedGC.Name)
return reconcile.Result{}, err
if err := r.processParamsRef(ctx, acceptedGC, resourceTree); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

if acceptedGC.Spec.ParametersRef != nil is removed from here, can we add it back ?

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like we can't, since this is the only code flow which can remove a finalizer from an unreferenced envoyproxy resource

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks @cnvergence !

@arkodg arkodg requested review from a team, zhaohuabing, qicz and Xunzhuo and removed request for a team September 12, 2023 19:24
@Alice-Lilith Alice-Lilith merged commit e158ef1 into envoyproxy:main Sep 12, 2023
@cnvergence cnvergence deleted the envoy-proxy-finalizers branch September 13, 2023 12:51
arkodg added a commit to arkodg/gateway that referenced this pull request Oct 18, 2023
…Class (envoyproxy#1534)"

This reverts commit e158ef1.

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
arkodg added a commit to arkodg/gateway that referenced this pull request Oct 18, 2023
…Class (envoyproxy#1534)"

This reverts commit e158ef1.

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
arkodg added a commit that referenced this pull request Oct 18, 2023
…Class(#1534) (#2000)

Revert "provider: finalize EnvoyProxy referenced by a managed GatewayClass (#1534)"

This reverts commit e158ef1.

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants