Known Issue - Kommander Project Quota Limit Range Not Accepting `mem` as a Correct Resource Type
Background
When setting quotas and limit ranges as described by the documentation [1], it is possible for the modification to fail when the `limitrange` key us set to `mem` rather than 'memory'.The logs (`kubectl -n describe federatedlimitrange kommander`) would show that it will error out on updating LimitRange:
Type Reason Age From Message ---- ------ ---- ---- ------- Normal UpdateInCluster 7s (x13 over 4d22h) federatedlimitrange-controller Updating LimitRange "maia-mapper-5t8wg-xk6pm/kommander" in cluster "dpk-management" Warning UpdateInClusterFailed 7s (x6 over 8m46s) federatedlimitrange-controller Failed to update LimitRange "maia-mapper-5t8wg-xk6pm/kommander" in cluster "dpk-management": LimitRange "kommander" is invalid: [spec.limits[0].max[mem]: Invalid value: "mem": must be a standard resource type or fully qualified, spec.limits[0].max[mem]: Invalid value: "mem": must be a standard resource for containers, spec.limits[0].min[mem]: Invalid value: "mem": must be a standard resource type or fully qualified, spec.limits[0].min[mem]: Invalid value: "mem": must be a standard resource for containers, spec.limits[0].default[mem]: Invalid value: "mem": must be a standard resource type or fully qualified, spec.limits[0].default[mem]: Invalid value: "mem": must be a standard resource for containers, spec.limits[0].defaultRequest[mem]: Invalid value: "mem": must be a standard resource type or fully qualified, spec.limits[0].defaultRequest[mem]: Invalid value: "mem": must be a standard resource for containers]
Workaround
If you are using an affected version (Kommander UI lower than 6..69.1), the way to update the values would be through the CLI as described in the documentation [1]. This would implicitly use `memory` than `mem` which should apply the values correctly.Solution
Kommander 1.3 ships with Kommander UI version 6.70.0 [2]. Upgrading to this version fixes the UI issue in setting memory values.Sources
[1] https://docs.d2iq.com/dkp/kommander/1.2/projects/project-quotas-limit-range/[2] https://docs.d2iq.com/dkp/kommander/1.3/release-notes/