Skip to content

Commit

Permalink
Bug 1661086 - Don't set empty storage class description annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
spadgett committed Dec 20, 2018
1 parent 7c05657 commit 72adc75
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/public/components/storage-class-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,20 +543,20 @@ export class StorageClassForm_ extends React.Component<StorageClassFormProps, St
loading: true,
});

const type = this.state.newStorageClass.type;
const { description, type, reclaim } = this.state.newStorageClass;
const dataParameters = this.getFormParams();

const annotations = description ? { description } : {};
const data : StorageClass = {
metadata: {
name: this.state.newStorageClass.name,
annotations: {description: this.state.newStorageClass.description},
annotations,
},
provisioner: this.storageTypes[type].provisioner,
parameters: dataParameters,
};

if (this.state.newStorageClass.reclaim) {
data.reclaimPolicy = this.state.newStorageClass.reclaim;
if (reclaim) {
data.reclaimPolicy = reclaim;
}

const volumeBindingMode = _.get(this.storageTypes[type], 'volumeBindingMode', null);
Expand Down

0 comments on commit 72adc75

Please sign in to comment.