Skip to content

feat: merge support for eep - #9638

Open
kkk777-7 wants to merge 4 commits into
envoyproxy:mainfrom
kkk777-7:feat-merge-eep
Open

feat: merge support for eep#9638
kkk777-7 wants to merge 4 commits into
envoyproxy:mainfrom
kkk777-7:feat-merge-eep

Conversation

@kkk777-7

@kkk777-7 kkk777-7 commented Aug 2, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Support mergeType in EEP.
This PR's scope contains only supporting mergeType similar to other policies.
Route policies merge Gateway or ListenerSet policies.

Which issue(s) this PR fixes:

Fixes #6733


PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: If this PR contains API changes (changes under /api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, but gen-check, lint, and coverage MUST pass.)
  • Tests added/updated: New/changed code is covered by appropriate tests. N/A if this PR does not contain code changes.
  • Docs: User-facing changes update the docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
  • Release notes: For any non-trivial change, added a release-note fragment under release-notes/current/<section>/<pr-number>-<slug>.md (see release-notes/current/README.md for sections and naming). N/A if this PR does not contain non-trivial changes.
  • Generated files committed: Ran make gen-check and committed the result if API/helm charts/modules changed.
  • Scope & compatibility: The PR is reasonably scoped (no unrelated changes) and preserves backward compatibility, or any breaking change is called out above and documented in release-notes/current/breaking_changes/.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

@netlify

netlify Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit d7b5439
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a6f0e20157b9800084501c4
😎 Deploy Preview https://deploy-preview-9638--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.54086% with 68 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.98%. Comparing base (b710dd4) to head (d7b5439).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/gatewayapi/envoyextensionpolicy.go 72.69% 56 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9638      +/-   ##
==========================================
- Coverage   76.04%   75.98%   -0.06%     
==========================================
  Files         259      259              
  Lines       43275    43473     +198     
==========================================
+ Hits        32907    33034     +127     
- Misses       8178     8236      +58     
- Partials     2190     2203      +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7

kkk777-7 commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a10fbccc56

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread test/e2e/tests/envoyextensionpolicy_merge.go Outdated
Comment thread api/v1alpha1/envoyextensionypolicy_types.go
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7

kkk777-7 commented Aug 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7b54392d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread api/v1alpha1/envoyextensionypolicy_types.go
@kkk777-7
kkk777-7 marked this pull request as ready for review August 2, 2026 10:07
@kkk777-7
kkk777-7 requested a review from a team as a code owner August 2, 2026 10:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7b54392d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

parentPolicy, parentScope = p, gatewayScope(gwNN)
}
} else {
ancestorRef = getAncestorRefForPolicy(gwNN, &listener.Name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep merge status on the same route ancestor

When a route parentRef omits sectionName, ancestorRefs above contains the Gateway ancestor without a section, but the merge branch reports merge successes and translation failures on a different listener-scoped ancestor synthesized from listener.Name here. In that common attach-to-Gateway scenario, the policy can end up with Accepted=True on the actual ancestor from SetAcceptedForPolicyAncestors while Merged or Accepted=False is recorded only under a separate listener ancestor, so users watching the route-policy ancestor miss whether the merge succeeded or failed; the merge path should update the same ancestor refs consistently.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This Issue has already existed in other policies.
so if we should fix this, I want to fix in follow-up PR.

@kkk777-7 kkk777-7 added this to the v1.9.0-rc.1 Release milestone Aug 2, 2026

@zhaohuabing zhaohuabing left a comment

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. Thanks!

@zhaohuabing
zhaohuabing requested a review from a team August 3, 2026 02:39
Comment on lines +48 to +58
// MergeType determines how this configuration is merged with existing EnvoyExtensionPolicy
// configurations targeting a parent resource. When set, this configuration will be merged
// into the closest parent EnvoyExtensionPolicy in the route's attachment hierarchy (for
// example, one targeting a Gateway, Gateway listener, ListenerSet, or ListenerSet
// listener).
// Currently, this field can only be set when targeting xRoute resources.
// If unset, no merging occurs, and only the most specific configuration takes effect.
//
// +kubebuilder:validation:XValidation:rule="self != 'Replace'",message="Replace is not a valid MergeType for EnvoyExtensionPolicy"
// +optional
MergeType *MergeType `json:"mergeType,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.

what will happen if there're multiple merge EEP target to same xRoute? only the first one will work?

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.

Support MergeType in EnvoyExtensionPolicy

3 participants