-
Notifications
You must be signed in to change notification settings - Fork 198
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
feat: Add ability to specify MTU when creating Network #1262
feat: Add ability to specify MTU when creating Network #1262
Conversation
Hi @tasdikrahman. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-gcp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
Thanks for the review @cpanato , let me know if you would like me to add any more changes on this PR before approval. Thank you. |
thanks /approve /assign @damdo |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, tasdikrahman 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 |
api/v1beta1/types.go
Outdated
// Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing through | ||
// this interconnect attachment. Only 1440 and 1500 are allowed. If not | ||
// specified, the value will default to 1440. | ||
// +optional | ||
Mtu int64 `json:"mtu,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add openAPI validation for this field only allowing the two values you are mentioning.
Also where are those values coming from? We might want to leave a message mentioning that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we could add a validation step in the validation code (e.g. webooks).
And a couple of unit test checking that is validated correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add openAPI validation for this field only allowing the two values you are mentioning.
Also where are those values coming from? We might want to leave a message mentioning that.
Hello there, I fixed the validation code to have the minimum and maximum values present. The values of minimum of 1300 and maximum of 8896 are taken from https://pkg.go.dev/google.golang.org/api/compute/v1#Network
Also we could add a validation step in the validation code (e.g. webooks).
And a couple of unit test checking that is validated correctly.
Will add some unit tests exercising this.
/hold |
…c is more than 8896 bytes or lesser than 1300 bytes
Thank you for implementing the requested changes @tasdikrahman |
What type of PR is this?
/kind feature
What this PR does / why we need it:
User can set
GCPCluster.Spec.Network.Mtu
for setting the MTU for the network being created. If nothing is passed the MTU will default to 1440 which is the default set here https://cloud.google.com/vpc/docs/mtuWhich issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1246
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: