LimitRange spec for cpu expected string #2119
-
|
Hi! Consider the following yaml spec: # Memory default limit range
apiVersion: v1
kind: LimitRange
metadata:
name: mem-cpu-limit-range
namespace: argocd
spec:
limits:
- default:
memory: 256Mi
cpu: 1 ### set as integer
defaultRequest:
memory: 256Mi
cpu: 0.5 ### set as float
max:
memory: 2Gi
cpu: "18"
min:
memory: 128Mi
cpu: "100m"
type: ContainerIf I run either I wonder why would it not accept what is deemed by |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
It is very likely |
Beta Was this translation helpful? Give feedback.
-
|
If i remember correctly, this bug was fixed in Kubernetes API, so you either upgrade to Kubernetes v1.22 or change your YAMLs to use strings e.g. |
Beta Was this translation helpful? Give feedback.
If i remember correctly, this bug was fixed in Kubernetes API, so you either upgrade to Kubernetes v1.22 or change your YAMLs to use strings e.g.
cpu: "1".