-
Notifications
You must be signed in to change notification settings - Fork 231
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
Add note for storage class used on PVC grid #1200
Conversation
I think I'd prefer it as another table column. Easier to see at a glance. |
I think the question boils down to how often we expect people to be using storage classes vs not. |
app/views/storage.html
Outdated
@@ -55,7 +55,9 @@ | |||
</tbody> | |||
<tbody ng-if="(pvcs | hashSize) > 0"> | |||
<tr ng-repeat="pvc in pvcs | orderObjectsByDate : true"> | |||
<td data-title="Name"><a ng-href="{{pvc | navigateResourceURL}}">{{pvc.metadata.name}}</a></td> | |||
<td data-title="Name"><a ng-href="{{pvc | navigateResourceURL}}">{{pvc.metadata.name}}</a> | |||
<span ng-if="pvc | annotation : 'volume.beta.kubernetes.io/storage-class'" class="text-muted"> using storage class {{pvc | annotation : 'volume.beta.kubernetes.io/storage-class'}}</span> |
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.
If we expect the beta
to eventually drop from the annotation name or storage class to ever be added as another API field, it's probably worth adding a storageClass
filter. Then we can change it in one place (and fall back to looking for this annotation if needed). Something like we do for the description annotation.
.filter('storageClass', function(annotationFilter) {
return function(pvc) {
return annotationFilter(pvc, 'volume.beta.kubernetes.io/storage-class');
};
})
Then here in the view
<span ng-if="pvc | storageClass" class="text-muted"> using storage class {{pvc | storageClass}}</span>
This also makes the markup more concise.
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 agree, this will make things much nicer and be easier to update in the futures. Changes added.
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 like that!
@spadgett @erinboyd @jwforres I think whether to add a column or not will come down to how much people use the storage classes. Ideally, we would like them to be quickly adopted and every new claim is associated with a storage class. But time will tell. Let's leave it as is and we can very easily tweak it in the future. |
I'm OK with the PR as-is if we want to merge, unless @erinboyd you'd rather see this change |
@spadgett LGTM |
thanks @zherman0 [merge] |
Evaluated for origin web console merge up to 5a52ce0 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1005/) (Base Commit: 4eaf288) |
We have a request to show which provisioner was used to create a claim. I have added a muted note next to the PVC name when a storage class was assigned.