Skip to content
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

⚠️ Convert APIServerPort to uint16 #2174

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

mdbooth
Copy link
Contributor

@mdbooth mdbooth commented Sep 17, 2024

This problem was highlighted by the updated gosec linter brought in by #2173, which pointed out the unsafe conversion from int to int32. CAPI's control plane endpoint port is an int32. We were using int, which can be larger. We also weren't validating it.

APIServerPort is a TCP port, which is an unsigned 16 bit integer. We were
previously allowing it to be any integer.

This is a breaking change, but as any working configuration would have
to have a value which passes the new validation it should not break any
working configuration.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 17, 2024
Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 033532e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/66eab2571a7cf50008814467
😎 Deploy Preview https://deploy-preview-2174--kubernetes-sigs-cluster-api-openstack.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 site configuration.

@mdbooth mdbooth force-pushed the apiserverport branch 2 times, most recently from ed9e26f to b17b8fc Compare September 18, 2024 08:44
@mdbooth
Copy link
Contributor Author

mdbooth commented Sep 18, 2024

Lets merge #2175 first for tidiness

I decided to remove that commit from this PR anyway as I no longer need it for testing.

@mdbooth mdbooth marked this pull request as draft September 18, 2024 10:56
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2024
@mdbooth
Copy link
Contributor Author

mdbooth commented Sep 18, 2024

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 18, 2024
This is a TCP port, which is an unsigned 16 bit integer. We were
previously allowing it to be any integer.

This is a breaking change, but as any working configuration would have
to have a value which passes the new validation it should not break any
working configuration.
@mdbooth mdbooth marked this pull request as ready for review September 18, 2024 10:58
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 18, 2024
@EmilienM
Copy link
Contributor

/approve
feel free to merge it when you want

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EmilienM

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

The pull request process is described here

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 Sep 20, 2024
@jichenjc
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 20, 2024
@mdbooth
Copy link
Contributor Author

mdbooth commented Sep 27, 2024

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8522721 into kubernetes-sigs:main Sep 27, 2024
9 checks passed
@EmilienM EmilienM deleted the apiserverport branch October 8, 2024 15:00
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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants