-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
API change for volume topology aware dynamic provisioning #63233
Conversation
pkg/apis/storage/util/util.go
Outdated
@@ -27,4 +27,10 @@ func DropDisabledAlphaFields(class *storage.StorageClass) { | |||
if !utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) { | |||
class.VolumeBindingMode = nil | |||
} | |||
if !utilfeature.DefaultFeatureGate.Enabled(features.DynamicProvisioningScheduling) { | |||
if class.Status != nil { |
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.
why are we not setting class.Status
to nil?
pkg/apis/storage/util/util_test.go
Outdated
if class.AllowedTopologies != nil { | ||
t.Errorf("AllowedTopology field didn't get dropped: %+v", class.AllowedTopologies) | ||
} | ||
if class.Status.Capacity != nil { |
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.
Shouldn't we check if class.Status
is nil?
} | ||
|
||
func printCapacityInStorageClass(w PrefixWriter, capacity *storage.StorageClassCapacity) { | ||
w.Write(LEVEL_0, "Capacity:\t") |
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.
Is this the best practice? Capacity: <none>
even when capacity is nil? (asking since this is just a alpha feature, it should not even show up if it is not set right?)
newClass.AllowVolumeExpansion = oldClass.AllowVolumeExpansion | ||
newClass.VolumeBindingMode = oldClass.VolumeBindingMode | ||
newClass.AllowedTopologies = oldClass.AllowedTopologies | ||
|
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.
We don't set Status
right?
@lichuqiang can you add WIP to the title since the api design is still being discussed? |
Sorry, it's my fault. @dims, as @msau42 implied, the API design is still under discussion, really appreciate if you can move to kubernetes/community#1857 for API design discussion together :) |
no worries. i just had some free time :) |
Updated according to latest update in proposal. |
/lgtm |
@thockin Can you take a look at the change? |
pkg/apis/storage/types.go
Outdated
// Restrict the node topologies where volumes can be dynamically provisioned. | ||
// Each volume plugin defines its own supported topology specifications. | ||
// This field is alpha-level and is only honored by servers that enable | ||
// the DynamicProvisioningScheduling feature. |
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.
Document default behavior if empty
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.
done
API LGTM. Small comment change requested. Will approve now, please fix before or after merge |
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lichuqiang, msau42, thockin 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 |
/priority important-soon |
/kind feature |
[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process @jsafrane @lichuqiang @msau42 @thockin Pull Request Labels
|
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Volume topology aware dynamic provisioning: work based on new API **What this PR does / why we need it**: The PR has been split to 3 parts: Part1: kubernetes#63232 for basic scheduler and PV controller plumbing Part2: kubernetes#63233 for API change and the PR itself includes work based on the API change: - Dynamic provisioning allowed topologies scheduler work - Update provisioning interface to be aware of selected node and topology **Which issue(s) this PR fixes** Feature: kubernetes/enhancements#561 Design: kubernetes/community#2168 **Special notes for your reviewer**: /sig storage /sig scheduling /assign @msau42 @jsafrane @saad-ali @bsalamat @kubernetes/sig-storage-pr-reviews @kubernetes/sig-scheduling-pr-reviews **Release note**: ```release-note Volume topology aware dynamic provisioning ```
What this PR does / why we need it:
Split PR #63193 for better review
part 2: API change
Previous: #63232
Next: #63193
Which issue(s) this PR fixes
Feature: kubernetes/enhancements#561
Design: kubernetes/community#2168
Special notes for your reviewer:
/sig storage
/sig scheduling
/assign @msau42 @jsafrane @thockin
Release note: