Closed
Description
My system is built based on Kubernetes v1.9, client-java-parent-1.0.0-beta3
Unexpected exception occurred when loading yaml file which contains 'storage: 1Gi'. The root cause was that Quality class did not have a constructor to take a single string parameter. I was able to resolve the problem by adding the following code snippet. Let me provide a patch and request a PR.
A code snippet into Quantity.java
public Quantity(final String value) {
final Quantity quantity = fromString(value);
this.number = quantity.getNumber();
this.format = quantity.getFormat();
}
A code snippet for YAML file loading.
try {
V1beta2StatefulSet body = yaml.loadAs(new FileReader(filePath), V1beta2StatefulSet.class);
An example of StatefulSet for YAML file.
...
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
storageClassName: managed-nfs-storage
Metadata
Metadata
Assignees
Labels
No labels