Skip to content

Make replicaCount optional (skip rendering when null)#7744

Open
egvimo wants to merge 1 commit intocoder:mainfrom
egvimo:feature/chart
Open

Make replicaCount optional (skip rendering when null)#7744
egvimo wants to merge 1 commit intocoder:mainfrom
egvimo:feature/chart

Conversation

@egvimo
Copy link
Copy Markdown
Contributor

@egvimo egvimo commented Apr 6, 2026

Currently, replicas is always rendered in the Deployment manifest based on .Values.replicaCount, which defaults to 1.

This makes it impossible to delegate replica management to other mechanisms (e.g., HPA, KEDA) by unsetting the value.

This change allows:

  • Using HorizontalPodAutoscaler without conflicting static replica settings
  • Explicitly disabling fixed replica counts

Backward Compatibility

  • No change for existing users unless they explicitly set replicaCount: null
  • Default behavior (1) remains unchanged by values.yaml

Notes

We intentionally avoid a simple if .Values.replicaCount check to ensure 0 remains a valid value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant