feat: Use wellknownports for etcd and add cilium etcd ports - #18035
Conversation
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.
|
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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
|
/override pull-kops-e2e-k8s-aws-amazonvpc |
|
@hakman: Overrode contexts on behalf of hakman: pull-kops-e2e-k8s-aws-amazonvpc DetailsIn response to this:
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. |
|
|
Thanks @apeabody, appreciate it. Seems something is broken on the GH side, but tests will pass eventually. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This commit refactors the codebase to utilize constants from the
wellknownportspackage for etcd client and peer ports, replacing hardcoded values. This improves maintainability and clarity.Specifically, the following changes were made:
pkg/wellknownports/wellknownports.gofor:EtcdMainClientPort(4001)EtcdEventsClientPort(4002)EtcdCiliumClientPort(4003) PRE-EXISTINGEtcdMainPeerPort(2380)EtcdEventsPeerPort(2381)EtcdCiliumPeerPort(2382)pkg/model/components/etcdmanager/model.goto use these new constants.wellknownportsconstants in:pkg/model/awsmodel/firewall.gopkg/model/azuremodel/network.gopkg/model/components/apiserver.gopkg/model/openstackmodel/firewall.godocs/contributing/ports.mdand sorted the table by port number.This change ensures consistent port management and makes it easier to track port usage across the kOps project.