-
Notifications
You must be signed in to change notification settings - Fork 35
Enable StoragePool #151
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
Enable StoragePool #151
Conversation
|
Corresponding extension PR: |
pkg/api/v1alpha1/provider_spec.go
Outdated
| // StoragePool in which the new disk is created. | ||
| // You can provide this as a partial or full URL to the resource. For example | ||
| // https://www.googleapis.com/compute/v1/projects/project/zones/zone | ||
| StoragePool string `json:"storagePool,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.
For backward compatibility, shouldn't this field be optional, i.e. of type *string and use it only when it is set?
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.
The only place where we use this param is here.
And by default, AttachedDiskInitializeParams fields with empty or default values are omitted from API requests.
So unless we set it from outside it will be basically ignored.
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 know this is not real API resource, it is just used for parsing yaml documents which are usually coming from providerConfig somewhere in a shoot manifest. In this case, it could be safe to not use pointers, but generally it would be nice to follow some conventions like https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#new-field-in-existing-api-version.
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.
Adjusted the PR to use *string instead.
aaronfern
left a comment
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.
Hi @hebelsan
really sorry for the delayed review
In general seems fine, just one question, please address that
kubernetes/machine-class.yaml
Outdated
| # kmsKeyServiceAccount: "[email protected]" # email of service account (optional) | ||
| # provisionedIops: 3000 # IOPS that the disk can handle (optional) | ||
| # provisionedThroughput: 140 # throughput unit in MB per sec (optional) | ||
| # storagePool: zones/zone/storagePools/storagePool # StoragePool where the new disk is created (optional) |
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.
Are these values fair and sensible defaults?
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.
Not sure if I interpreted your comment exactly right, but I tweaked the storagePool field in the example to make it a bit clearer.
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.
Yes, this is clear enough now
Thank you!
aaronfern
left a comment
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.
Thanks for the PR!
/lgtm
What this PR does / why we need it:
This PR enables extensions to pass values for the storagePool field in the provider spec.
See also https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: