Skip to content

helm chart: replicaCount should be unset by default #380

Open
@dex4er

Description

@dex4er

I would like to be able to disable a number of replicas and NOT set HPA at the same time because I use KEDA, which auto-creates HPAs.

Currently if HPA is not created then replica count is set always to 1 and this setting conflicts with KDEA autoscaler.

With Flux I install it as:

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: podinfo
spec:
  releaseName: podinfo
  chart:
    spec:
      chart: podinfo
      sourceRef:
        kind: HelmRepository
        name: podinfo
      reconcileStrategy: ChartVersion
  values:
    hpa:
      ## It disables static number of replicas for Deployment.
      ## However, we use KEDA then HPA is removed in a patch
      enabled: true
  postRenderers:
    - kustomize:
        patches:
          - patch: |-
              $patch: delete
              apiVersion: autoscaling/v2
              kind: HorizontalPodAutoscaler
              metadata:
                name: ANY
            target:
              kind: HorizontalPodAutoscaler

but it looks rather like a nice workaround for the initial problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions