We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
V1Container container = new V1Container(); V1ResourceRequirements redisResourceReq = new V1ResourceRequirements(); Map<String, Quantity> requestQuantity = new HashMap<>(); requestQuantity.put("memory", new Quantity("1Gi")); requestQuantity.put("cpu", new Quantity("0.5")); Map<String, Quantity> limitQuantity = new HashMap<>(); limitQuantity.put("memory", new Quantity("4Gi")); limitQuantity.put("cpu", new Quantity("2")); redisResourceReq.requests(requestQuantity); redisResourceReq.limits(limitQuantity); container.resources(redisResourceReq); System.out.println(Yaml.getSnakeYaml().dump(container));
resources: limits: memory: {} cpu: {} requests: memory: {} cpu: {}
resources: limits: memory: "1Gi" cpu: "0.5" requests: memory: "4Gi" cpu: "2"
As you can see , the Yaml util does't work as expected ! I have checked latest Yaml Util class This class also doesn't work well .
The text was updated successfully, but these errors were encountered:
adding something like RepresentQuantity to yaml CustomRepresnter will print values
resources: limits: memory: 4Gi cpu: '2' requests: memory: 1Gi cpu: 500m
but it seems, values are loosing original format because of QunatityFormatter will try to create a pr with this
Sorry, something went wrong.
@kondapally1989
I've slove this problem by create a CustomRepresnter ! But I wanna a common yaml dump util.
I created a failing test for this.
And a PR here #417.
Fixed by #417
No branches or pull requests
Basic Information
Reproduce Steps
As you can see , the Yaml util does't work as expected !
I have checked latest Yaml Util class
This class also doesn't work well .
The text was updated successfully, but these errors were encountered: