Skip to content

Make replicaCount optional (skip rendering when null)#7744

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

Make replicaCount optional (skip rendering when null)#7744
code-asher merged 1 commit into
coder:mainfrom
egvimo:feature/chart

Conversation

@egvimo

@egvimo egvimo commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

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.

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

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
@egvimo
egvimo deleted the feature/chart branch April 17, 2026 20:14
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