feat(volumes): Expose the provisioner associated to a volume (#4030)

* feat(volumes): Expose the provisioner associated to a volume

* feat(volumes): fix import and add default value to provisioner
pull/4050/head
Maxime Bajeux 2020-07-15 00:55:29 +02:00 committed by GitHub
parent 3c34fbd8f2
commit f71abb5669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 0 deletions

View File

@ -342,6 +342,7 @@ type (
KubernetesStorageClassConfig struct {
Name string `json:"Name"`
AccessModes []string `json:"AccessModes"`
Provisioner string `json:"Provisioner"`
}
// LDAPGroupSearchSettings represents settings used to search for groups in a LDAP server

View File

@ -7,6 +7,7 @@ class KubernetesStorageClassConverter {
static apiToStorageClass(data) {
const res = new KubernetesStorageClass();
res.Name = data.metadata.name;
res.Provisioner = data.provisioner;
return res;
}
}

View File

@ -24,6 +24,7 @@ export function KubernetesStorageClassAccessPolicies() {
const _KubernetesStorageClass = Object.freeze({
Name: '',
AccessModes: [],
Provisioner: '',
});
export class KubernetesStorageClass {

View File

@ -41,6 +41,7 @@ class KubernetesConfigureController {
const res = new KubernetesStorageClass();
res.Name = item.Name;
res.AccessModes = _.map(item.AccessModes, 'Name');
res.Provisioner = item.Provisioner;
return res;
}
}),

View File

@ -37,6 +37,10 @@
<td>Storage</td>
<td>{{ ctrl.volume.PersistentVolumeClaim.StorageClass.Name }}</td>
</tr>
<tr>
<td>Provisioner</td>
<td>{{ ctrl.volume.PersistentVolumeClaim.StorageClass.Provisioner ? ctrl.volume.PersistentVolumeClaim.StorageClass.Provisioner : '-' }}</td>
</tr>
<tr>
<td>Size</td>
<td>{{ ctrl.volume.PersistentVolumeClaim.Storage }}</td>