-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add istioctl analyzer for envoyFilter patch operation #38294
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
Conversation
😊 Welcome @AndreaM12345! This is either your first contribution to the Istio istio repo, or it's been You can learn more about the Istio working groups, code of conduct, and contributing guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
apiVersion: release-notes/v2 | ||
kind: feature | ||
area: istioctl | ||
releaseNotes: |
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.
Can you format the release note similar to this one? There is a way to reference the GitHub Issue directly: https://github.com/istio/istio/blob/master/releasenotes/notes/24905.yaml
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.
issue:
- 37415
// the default priority for an envoyFilter is 0 | ||
if ef.Priority == 0 { | ||
for index, patch := range ef.ConfigPatches { | ||
if patch.Patch.Operation == network.EnvoyFilter_Patch_INSERT_BEFORE || patch.Patch.Operation == network.EnvoyFilter_Patch_INSERT_AFTER { |
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.
Why are you only checking for INSERT_BEFORE and INSERT_AFTER? The problem is more general, i.e., for any operation that is relative to another filter. MERGE, REMOVE, and REPLACE are the other ones where the order of evaluation is matters.
template: "This envoy filter does not have a priority and has a relative patch operation set which can cause the envoyFilter not to be applied. Using the INSERT_FIRST option or setting the priority may help in ensuring the envoyFilter is applied correctly" |
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.
Change:
Using the INSERT_FIRST option or setting the ...
to:
Using an absolute operation (e.g., INSERT_FIRST) or setting the ...
Please provide a description of this PR:
Fixes #37415
Checks an envoy filter patch operation to see if the envoy filter has a priority set or if its using a relative instead of absolute patch operation. It issues a warning if a relative patch operation (INSERT_BEFORE/INSERT_AFTER) is being used and no priority is being set.
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.