Skip to content

Make replicaCount optional (skip rendering when null)#7744

Merged
code-asher merged 1 commit intocoder:mainfrom
egvimo:feature/chart
Apr 17, 2026
Merged

Make replicaCount optional (skip rendering when null)#7744
code-asher merged 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.

Copy link
Copy Markdown
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the super delayed review, and thank you!

@code-asher code-asher merged commit cc8ac4f into coder:main Apr 17, 2026
9 of 10 checks passed
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.

2 participants