Skip to content

Conversation

@qpetraroia
Copy link
Collaborator

@qpetraroia qpetraroia commented Jul 11, 2025

Summary

This PR makes the replica count configurable across all deployment templates (Helm, Kustomize, and Manifests) instead of using hardcoded values.

Changes

  • Add REPLICACOUNT variable to all deployment template draft.yaml files with proper kind: "replicaCount" validation
  • Set default value to 1 replica (configurable by users, disabled prompting for seamless experience)
  • Replace hardcoded replicas: 2 with {{ .Config.GetVariableValue "REPLICACOUNT" }} in deployment templates
  • Update all test fixtures to use replicas: 1 to match the new default value
  • Ensure consistency across all three deployment template types (Helm, Kustomize, Manifests)

Benefits

  • Users can now customize replica count when generating deployments without template modification
  • Consistent behavior across all deployment template types
  • Follows the same pattern as other configurable variables in the project
  • Maintains backward compatibility while providing flexibility
  • Default of 1 replica is more appropriate for development/testing scenarios

Usage

Users can override the replica count when generating deployments:

# Use default (1 replica)
draft create deployment

# Specify custom replica count
draft create deployment --variable REPLICACOUNT=3

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Refactor

How Has This Been Tested?

Provide instructions so we can reproduce, and list any relevant details for your test configuration. Please mention if this is a breaking change which will impact consuming tool(s).

  • Unit Test:
  • E2E Test:
  • Other Test:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- Add REPLICACOUNT variable to helm, kustomize, and manifest deployment templates
- Set default value to 1 replica for all deployment types
- Replace hardcoded replica values with template variables
- Update all test fixtures to reflect new default replica count
- Ensure consistency across deployment template types
@qpetraroia qpetraroia force-pushed the feat/configurable-replica-count-clean branch from 04c20e0 to 4d04448 Compare July 11, 2025 23:06
Copy link
Member

@bosesuneha bosesuneha left a comment

Choose a reason for hiding this comment

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

lgtm

@bosesuneha bosesuneha merged commit 730bc95 into Azure:main Jul 15, 2025
145 checks passed
@bosesuneha bosesuneha mentioned this pull request Jul 21, 2025
16 tasks
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.

3 participants