Sitelet https://github.com/kubernetes/kops/pull/18035
Skip to content

feat: Use wellknownports for etcd and add cilium etcd ports - #18035

Merged
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
apeabody:etcdports
Mar 5, 2026
Merged

k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
apeabody:etcdports

Conversation

@apeabody

@apeabody apeabody commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

This commit refactors the codebase to utilize constants from the wellknownports package for etcd client and peer ports, replacing hardcoded values. This improves maintainability and clarity.

Specifically, the following changes were made:

  • Added new constants to pkg/wellknownports/wellknownports.go for:
    • EtcdMainClientPort (4001)
    • EtcdEventsClientPort (4002)
    • EtcdCiliumClientPort (4003) PRE-EXISTING
    • EtcdMainPeerPort (2380)
    • EtcdEventsPeerPort (2381)
    • EtcdCiliumPeerPort (2382)
  • Updated pkg/model/components/etcdmanager/model.go to use these new constants.
  • Replaced hardcoded etcd port numbers with references to the wellknownports constants in:
    • pkg/model/awsmodel/firewall.go
    • pkg/model/azuremodel/network.go
    • pkg/model/components/apiserver.go
    • pkg/model/openstackmodel/firewall.go
  • Added the new cilium etcd ports to docs/contributing/ports.md and sorted the table by port number.

This change ensures consistent port management and makes it easier to track port usage across the kOps project.

This commit refactors the codebase to utilize constants from the `wellknownports` package for etcd client and peer ports, replacing hardcoded values. This improves maintainability and clarity.

Specifically, the following changes were made:

-   Added new constants to `pkg/wellknownports/wellknownports.go` for:
    -   `EtcdMainClientPort` (4001)
    -   `EtcdEventsClientPort` (4002)
    -   `EtcdCiliumClientPort` (4003)
    -   `EtcdMainPeerPort` (2380)
    -   `EtcdEventsPeerPort` (2381)
    -   `EtcdCiliumPeerPort` (2382)
-   Updated `pkg/model/components/etcdmanager/model.go` to use these new constants.
-   Replaced hardcoded etcd port numbers with references to the `wellknownports` constants in:
    -   `pkg/model/awsmodel/firewall.go`
    -   `pkg/model/azuremodel/network.go`
    -   `pkg/model/components/apiserver.go`
    -   `pkg/model/openstackmodel/firewall.go`
-   Added the new cilium etcd ports to `docs/contributing/ports.md` and sorted the table by port number.

This change ensures consistent port management and makes it easier to track port usage across the kOps project.
@k8s-ci-robot
k8s-ci-robot requested a review from hakman March 5, 2026 00:43
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 5, 2026
@k8s-ci-robot
k8s-ci-robot requested a review from olemarkus March 5, 2026 00:43
@k8s-ci-robot k8s-ci-robot added area/documentation area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/openstack Issues or PRs related to openstack provider size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 5, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @apeabody. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 5, 2026
@hakman

hakman commented Mar 5, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 5, 2026
@hakman
hakman requested review from justinsb and removed request for olemarkus March 5, 2026 06:48
@hakman

hakman commented Mar 5, 2026

Copy link
Copy Markdown
Member

/override pull-kops-e2e-k8s-aws-amazonvpc

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@hakman: Overrode contexts on behalf of hakman: pull-kops-e2e-k8s-aws-amazonvpc

Details

In response to this:

/override pull-kops-e2e-k8s-aws-amazonvpc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@apeabody

apeabody commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @hakman & @justinsb!

@hakman

hakman commented Mar 5, 2026

Copy link
Copy Markdown
Member

Thanks @apeabody, appreciate it. Seems something is broken on the GH side, but tests will pass eventually.
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2026
@k8s-ci-robot
k8s-ci-robot merged commit ffc7f4c into kubernetes:master Mar 5, 2026
26 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.36 milestone Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants