[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

default resource requests are not being set on containers



Hello,

I have noticed a strange issue which seems to me should not work like that:

There is a LimitRange definition in a project, with the following contents:
(...)
spec:
  limits:
  - default:
      cpu: "2"
      memory: 1Gi
    defaultRequest:
      cpu: 20m
      memory: 64Mi
    max:
      cpu: "2"
      memory: 1Gi
    min:
      cpu: 20m
      memory: 64Mi
    type: Container

I know that this definition is actually being used by the controllers, because if I create a DC without defining a "resources" attribute under the container definition, the resulting pods have the resources attribute filled in properly:

(...oc export pod output:...)
    resources:
      limits:
        cpu: "2"
        memory: 1Gi
      requests:
        cpu: 20m
        memory: 64Mi
(...)

However, the problem is that when I set a "resources" attribute like this in the DC - without defining a resources.requests attribute:

(..oc export dc output:...)
        resources:
          limits:
            cpu: "1"
            memory: 512Mi
(...)

Then the resulting pod has the following under the "resources" attribute:

(...oc export pod output:....)
    resources:
      limits:
        cpu: "1"
        memory: 512Mi
      requests:
        cpu: "1"
        memory: 512Mi
(...)

Why is the request the same as the limit here? Shouldn't it be 20m / 64Mi as specified in the limit range? I am using origin-1.4.1.

Regards,
Miklos



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]