entur / helm-charts

0 stars 3 forks source link

maxReplicas must be set to enable custom hpa #134

Closed elgbar closed 7 months ago

elgbar commented 11 months ago

When using a custom hpa spec, either .Values.deployment.maxReplicas or .Values.container.maxReplicas must be set to allow us to use .Values.hpa.spec.

maxReplicas is not used when using a custom hpa spec.

Suggestion for a solution

Check if .Values.hpa.spec is defined when deciding whether hpa should be created.

elgbar commented 10 months ago

@AlexanderBrevig Blir dette sett på?

elgbar commented 9 months ago

bump :)

AlexanderBrevig commented 9 months ago

Unable to reproduce, unless you want HPA in dev/tst?

The tests pass without setting maxReplicas. https://github.com/entur/helm-charts/blob/b1624aef0a3c31ae7895c2281951f393912a4470/charts/common/tests/hpa_test.yaml#L91-L108

Here's the current rule: https://github.com/entur/helm-charts/blob/b1624aef0a3c31ae7895c2281951f393912a4470/charts/common/templates/hpa.yaml#L9-L13

If you want to use custom HPA in dev or tst then that would match your report. I guess we could check for hpa.spec and enable if seen, but that would suddenly create some HPAs in dev and tst which may not be wanted.

Thoughts?

Glenn-Terjesen commented 7 months ago

fixing this today : @elgbar