ElementTech / kube-reqsizer

A Kubernetes controller for automatically optimizing pod requests based on their continuous usage. VPA alternative that can work with HPA.
201 stars 10 forks source link

Not updating deployment resources requests #39

Open darkxeno opened 7 months ago

darkxeno commented 7 months ago

Even after having the following log lines:

1.7075074599651477e+09  INFO    controllers.Pod Sample Size and Minimum Time have been reached  {"pod": "staging/hermes-decoder-8cc5f5c4f-5z284"}
1.707507459965185e+09   INFO    controllers.Pod hermes-decoder Comparing CPU: 25m <> 50m    {"pod": "staging/hermes-decoder-8cc5f5c4f-5z284"}
1.7075074599651916e+09  INFO    controllers.Pod hermes-decoder Comparing Memory: 50Mi <> 150Mi  {"pod": "staging/hermes-decoder-8cc5f5c4f-5z284"}
1.7075074609485767e+09  INFO    controllers.Pod Pod Requests Will Change    {"pod": "staging/hermes-decoder-8cc5f5c4f-5z284"}
1.7075074365512218e+09  INFO    controllers.Pod Sample Size and Minimum Time have been reached  {"pod": "dev/vulcan-domains-stark-856df9cb4c-bcl4t"}
1.7075074365513973e+09  INFO    controllers.Pod vulcan-domains-stark Comparing CPU: 25m <> 70m  {"pod": "dev/vulcan-domains-stark-856df9cb4c-bcl4t"}
1.7075074365514233e+09  INFO    controllers.Pod vulcan-domains-stark Comparing Memory: 50Mi <> 150Mi    {"pod": "dev/vulcan-domains-stark-856df9cb4c-bcl4t"}
1.7075074375490775e+09  INFO    controllers.Pod Pod Requests Will Change    {"pod": "dev/vulcan-domains-stark-856df9cb4c-bcl4t"}

The related deployments are unchanged:

# hermes-decoder yaml redacted
        resources:
          limits:
            cpu: "1"
            memory: 2000Mi
          requests:
            cpu: 50m
            memory: 150Mi
# vulcan-domains-stark yaml redacted
        resources:
          limits:
            cpu: "2"
            memory: 600Mi
          requests:
            cpu: 70m
            memory: 150Mi

Any ideas why deployment resources are not updated?

ElementTech commented 5 months ago

I haven't looked into the code for a long time, but I think it changes individual pods and not the entire deployment. Can you look at manifests of individual pods?