Skip to content

fix: enable issue of endpointslices for k8s discovery#11654

Merged
Baoyuantop merged 9 commits into
apache:masterfrom
slayer321:fix-k8-endpointslices-discovery
Aug 15, 2025
Merged

fix: enable issue of endpointslices for k8s discovery#11654
Baoyuantop merged 9 commits into
apache:masterfrom
slayer321:fix-k8-endpointslices-discovery

Conversation

@slayer321

Copy link
Copy Markdown
Contributor

Description

use conf.watch_endpoint_slices to enable endpointslices whenever it is set to true. Fixed the test.

Fixes #11631

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working doc Documentation things labels Oct 15, 2024
@github-actions

github-actions Bot commented Jan 2, 2025

Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Jan 2, 2025
@github-actions

Copy link
Copy Markdown

This pull request/issue has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this Jan 31, 2025
@Baoyuantop Baoyuantop reopened this Jun 20, 2025
@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @slayer321, I reopened this pull request. Can you merge the master branch and re-execute this CI?

@github-actions github-actions Bot removed the stale label Jun 20, 2025
@slayer321
slayer321 force-pushed the fix-k8-endpointslices-discovery branch from ae7e592 to 41fde09 Compare June 20, 2025 11:01
@slayer321

Copy link
Copy Markdown
Contributor Author

Hey @Baoyuantop , I have rebase with master but I think to run CI it needs some approval.

@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @slayer321, can you fix the failed CI?

@slayer321
slayer321 force-pushed the fix-k8-endpointslices-discovery branch from 41fde09 to 9425059 Compare June 23, 2025 05:15
@slayer321

Copy link
Copy Markdown
Contributor Author

Hi @Baoyuantop , I have fixed CI changes and pushed it.

@Baoyuantop

Copy link
Copy Markdown
Contributor

There are some code lint errors.

@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @slayer321, there is a failed CI that needs to be fixed.

@slayer321

Copy link
Copy Markdown
Contributor Author

Hey @Baoyuantop , the linting error that I coming . I tried running it locally but it is showing skipped

╰─ ./reindex ../t/kubernetes/discovery/kubernetes3.t
reindex: ../t/kubernetes/discovery/kubernetes3.t:	skipped.

Also another CI build that is failing I'm not sure the reason for that. I thought of re running the CI.. but I see that I can't rerun it.

Comment thread t/kubernetes/discovery/kubernetes3.t Outdated
Comment thread t/kubernetes/discovery/kubernetes3.t Outdated
Comment thread t/kubernetes/discovery/kubernetes3.t
Comment thread docs/zh/latest/discovery/kubernetes.md Outdated
@Baoyuantop
Baoyuantop requested a review from membphis July 31, 2025 02:58

@membphis membphis 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

@slayer321

Copy link
Copy Markdown
Contributor Author

Hey @Baoyuantop , should we merge the PR .

@Baoyuantop

Copy link
Copy Markdown
Contributor

Hey @Baoyuantop , should we merge the PR .

I will remind other maintainers again to review it, one more approval is needed.

@AlinsRan AlinsRan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Other LGTM.

if nodes == nil then
nodes = core.table.new(0, #endpointslices * #addresses)
endpoint_buffer[port_name] = nodes
if type(endpointslices) == "table" then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why add this extra judgment? Is there any problem with the previous handling of endpointslices or {}?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @slayer321, can you explain this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it may be ngx.null

@Baoyuantop
Baoyuantop merged commit a9f184c into apache:master Aug 15, 2025
26 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in ⚡️ Apache APISIX Roadmap Aug 15, 2025
jizhuozhi pushed a commit to jizhuozhi/apisix that referenced this pull request Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working doc Documentation things size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug: Kubernetes discovery determines whether to enable endpointslice

5 participants