Repository navigation
fix: resolve secondary workload HPA autoscaling and metadata labels (#6982) - #7056
Open
tushar-hub wants to merge 1 commit into
Open
tushar-hub wants to merge 1 commit into
tushar-hub wants to merge 1 commit into
Conversation
|
Bito Review Skipped - Source Branch Not Found |
tushar-hub
force-pushed
the
fix/secondary-workload-hpa-6982
branch
from
October 8, 2026 04:51
9b88640 to
5cb32d5
Compare
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently resolve the reported rendering, metadata, override, and schema gaps across all targeted chart versions.
0 open findings
What changed in this PR
Fixes secondary workload HPA rendering and GUI schema support across deployment chart versions 4.20–4.22.
Changes:
- Adds secondary HPA metadata, defaults, overrides, and fallback behavior.
- Supports secondary container-name overrides.
- Defines secondary workload autoscaling schemas.
| File | Description |
|---|---|
deployment-chart_4-20-0/values.yaml |
Adds secondary HPA defaults and container override. |
deployment-chart_4-20-0/templates/hpa.yaml |
Corrects secondary HPA rendering. |
deployment-chart_4-20-0/templates/deployment.yaml |
Applies secondary container name. |
deployment-chart_4-20-0/schema.json |
Adds secondary workload schema. |
deployment-chart_4-21-0/values.yaml |
Adds secondary HPA defaults. |
deployment-chart_4-21-0/templates/hpa.yaml |
Corrects secondary HPA rendering. |
deployment-chart_4-21-0/templates/deployment.yaml |
Applies secondary container name. |
deployment-chart_4-21-0/schema.json |
Adds secondary workload schema. |
deployment-chart_4-22-0/values.yaml |
Adds secondary HPA defaults. |
deployment-chart_4-22-0/templates/hpa.yaml |
Corrects secondary HPA rendering. |
deployment-chart_4-22-0/templates/deployment.yaml |
Applies secondary container name. |
deployment-chart_4-22-0/schema.json |
Adds secondary workload schema. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
When configuring secondary workloads with Horizontal Pod Autoscaler (HPA) enabled, the rendered secondary HPA resource was missing the standard Devtron metadata tracking labels (
appId,envId,app,chart,release, andappLabels), and had emptyminReplicasandmaxReplicasvalues when defaults were not explicitly duplicated undersecondaryWorkload.autoscaling. Furthermore,secondaryWorkloadand its nestedautoscalingconfigurations were absent fromschema.json, causing GUI schema validation errors and ambiguous workload tracking warnings in the cluster.This PR addresses this by:
appId,envId,app,chart,release,appLabels) to the secondary HPA resource intemplates/hpa.yaml, with proper inheritance for custom labels/annotations and support for dedicated overrides.minReplicas,maxReplicas,TargetCPUUtilizationPercentage, andTargetMemoryUtilizationPercentageso that enabling secondary workload autoscaling never renders invalid or empty spec fields.secondaryWorkload.containerNameoverride in bothtemplates/deployment.yamlandtemplates/hpa.yamlcontainer metrics.secondaryWorkloadand its fullautoscalingschema definition toschema.json.values.yamlfor clear documentation and predictability.Fixes #6982
How Has This Been Tested?
helm lintacross updated deployment charts (0 errors).helm templateunder multiple scenarios:MinReplicas,MaxReplicas, target CPU/memory)secondaryWorkload.containerName) reflected in deployment container and HPAcontainerResourcemetrictest_values.yamlend-to-end renderingschema.jsonsyntax with JSON schema parser.Checklist:
Does this PR introduce a user-facing change?