Skip to content

Add opt-in knob to enable EnvoyPatchPolicy#1632

Merged
arkodg merged 3 commits intoenvoyproxy:mainfrom
arkodg:opt-in-envoypatchpolicy
Jul 20, 2023
Merged

Add opt-in knob to enable EnvoyPatchPolicy#1632
arkodg merged 3 commits intoenvoyproxy:mainfrom
arkodg:opt-in-envoypatchpolicy

Conversation

@arkodg
Copy link
Copy Markdown
Contributor

@arkodg arkodg commented Jul 6, 2023

Fixes #1468

@arkodg arkodg requested a review from a team as a code owner July 6, 2023 23:11
Alice-Lilith
Alice-Lilith previously approved these changes Jul 6, 2023
Copy link
Copy Markdown
Member

@Alice-Lilith Alice-Lilith left a comment

Choose a reason for hiding this comment

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

Yeah I think opting-in explicitly to "experimental" features is fine

Fixes envoyproxy#1468

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 6, 2023

Codecov Report

Merging #1632 (b9ae07e) into main (773bdfb) will decrease coverage by 0.20%.
The diff coverage is 11.32%.

@@            Coverage Diff             @@
##             main    #1632      +/-   ##
==========================================
- Coverage   60.89%   60.69%   -0.20%     
==========================================
  Files          83       84       +1     
  Lines       12519    12592      +73     
==========================================
+ Hits         7623     7643      +20     
- Misses       4408     4455      +47     
- Partials      488      494       +6     
Impacted Files Coverage Δ
api/config/v1alpha1/envoygateway_types.go 100.00% <ø> (ø)
api/config/v1alpha1/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
internal/gatewayapi/runner/runner.go 26.00% <0.00%> (ø)
internal/provider/kubernetes/controller.go 49.36% <10.00%> (-1.77%) ⬇️
internal/envoygateway/config/config.go 84.61% <83.33%> (ø)

... and 6 files with indirect coverage changes

@arkodg arkodg requested a review from Alice-Lilith July 6, 2023 23:24
@zirain
Copy link
Copy Markdown
Member

zirain commented Jul 7, 2023

can EG reuse feautreGates like controller-runtime?

// +optional
ControllerName string `json:"controllerName,omitempty"`

// ExtensionAPIs defines the settings related to specific Gateway API Extensions
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this comment correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

any suggestions for improving it ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment (and the name ExtensionAPIs as well) looks vague to me. Did you intentionally make it this way because this API will also serve other purposes other just than disabling/enabling specific features?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah sorta, trying to use a high level noun that can encapsulate an entire class of settings, so chose ExtensionAPIs to signify all settings pertaining to it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

EnvoyPatchPolicy is not part of the Gateway API. That's why I feel confused when I saw the location of the ExtensionAPIs(it's part of the Gateway Structure) and the comment “ ExtensionAPIs defines the settings related to specific Gateway API Extensions implemented by Envoy Gateway”.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we will need to fix this before v0.5.0, since we want EnvoyPatchPolicy to be opt in

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@kflynn @AliceProxy and I discussed this issue in the community meeting today, and favor 3.
Although ExtentionAPIs is not the best name, we cannot come up with a better name at this point so prefer sticking to it for now,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we will need to fix this before v0.5.0, since we want EnvoyPatchPolicy to be opt in

@arkodg @AliceProxy is this a must-have in v0.5.0? As @zirain said, if no EnvoyPatchPolicies are created, it has no impact at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

chatted with @zhaohuabing a little more, and he shared his hesitation with

gateway:
  extensionAPIs:
    ...

where extensionAPIs are not part of the Gateway API, which is valid.

another option is to reuse the top level extension field, that is used by the extension service

extension:
  apis:
    enableEnvoyPatchPolicy: true
  controlPlane:
    hooks:
    service:

Copy link
Copy Markdown
Member

@zhaohuabing zhaohuabing Jul 19, 2023

Choose a reason for hiding this comment

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

It would be more confusing if there were two fields prefixed with "extension" at the top level.

Gateway can be the container of the settings of the whole EG, not just Gateway API. I suggest a minor change to the comment to address this:

Change

"Gateway defines the desired Gateway API configuration of Envoy Gateway."

To

"Gateway defines the desired API configuration of Envoy Gateway."

@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Jul 12, 2023

can EG reuse feautreGates like controller-runtime?

@zirain can you elaborate on this

@arkodg arkodg requested review from zhaohuabing and zirain July 18, 2023 22:21
Copy link
Copy Markdown
Member

@zhaohuabing zhaohuabing left a comment

Choose a reason for hiding this comment

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

LGTM.

I would feel more comfortable if the word "Gateway" is removed from the comment of the Gateway struct :-)

"Gateway defines the desired API configuration of Envoy Gateway."

Because it's a container of the settings of the whole Envoy Gateway API, not only limited to Gateway API.

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg force-pushed the opt-in-envoypatchpolicy branch from b2de913 to 464eec9 Compare July 19, 2023 17:55
@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Jul 19, 2023

hey @AliceProxy @kflynn @haq204 , in the latest commit I moved the extensionApis field to the top level, which forced me rename the extension field which was used for the extension manager control plane settings to extensionManager , this is a breaking change, but it keeps all the extension configuration at the same level, which might be better for long term, wdyt

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested a review from zhaohuabing July 20, 2023 00:53
Copy link
Copy Markdown
Member

@zhaohuabing zhaohuabing left a comment

Choose a reason for hiding this comment

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

LGTM

I'm ok with either way, slightly prefer placing the extensionApis at the top level.

Copy link
Copy Markdown
Member

@zirain zirain left a comment

Choose a reason for hiding this comment

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

lgtm, @AliceProxy ptal

//
// +optional
Extension *Extension `json:"extension,omitempty"`
ExtensionManager *ExtensionManager `json:"extensionManager,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm even though this is a breaking change for Envoy Gateway extensions. If possible we should draw extra attention to this in the release notes with a ⚠️ emoji or something.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will do, adding the release notes label to ensure we handle ^

@arkodg arkodg added the release-note Indicates a required release note label Jul 20, 2023
@arkodg arkodg merged commit 0366b5c into envoyproxy:main Jul 20, 2023
@arkodg arkodg deleted the opt-in-envoypatchpolicy branch July 20, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Indicates a required release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opt in / Opt Out of Extension APIs

4 participants