-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(argo-rollouts): Add hpa to handle controller scaling #2694
base: main
Are you sure you want to change the base?
feat(argo-rollouts): Add hpa to handle controller scaling #2694
Conversation
*sorry, it's still draft PR. 🙈 |
…proj#2679) * feat(argo-workflows): Allow adding additional ServiceAccounts to RoleBinding (argoproj#2676) remove unnecessary if statements Signed-off-by: Daniel Beilin <daniel.beilin@outlook.com> Co-authored-by: Aikawa <yu.croco@gmail.com> Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * feat(argo-cd): Support ability to set .Values.namespaceOverride Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * fix(argo-cd): typo Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * chore(deps): update actions/create-github-app-token action to v1.10.0 (argoproj#2677) Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * feat(argo-rollouts): Add podLabels at the controller & dashboard level (argoproj#2678) Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * feat(argo-cd): Support ability to set .Values.namespaceOverride Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * fix(argo-cd): typo Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * fix(argo-cd): autocorrection Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * fix(argo-cd): typos Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * fix(argo-cd): typos Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * removed auota Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> * Update Chart.yaml Signed-off-by: Andres Vara <46708607+andres-vara@users.noreply.github.com> --------- Signed-off-by: Daniel Beilin <daniel.beilin@outlook.com> Signed-off-by: Andres Vara Parsegov <andres.vara@chase.com> Signed-off-by: Andres Vara <46708607+andres-vara@users.noreply.github.com> Co-authored-by: Daniel Beilin <144586547+dbeilin@users.noreply.github.com> Co-authored-by: Aikawa <yu.croco@gmail.com> Co-authored-by: Andres Vara Parsegov <andres.vara@chase.com> Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Co-authored-by: mitchell amihod <mitchell@amihod.com> Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
…mage-updater to v0.13.0 (argoproj#2692) * chore(argocd-image-updater): Update dependency argoproj-labs/argocd-image-updater to v0.13.0 * feat(argocd-image-updater): update deployment as following upstream Signed-off-by: yu-croco <yu.croco@gmail.com> * fix(argocd-image-updater): correct doc Signed-off-by: yu-croco <yu.croco@gmail.com> * fix(argocd-image-updater): fix manifest Signed-off-by: yu-croco <yu.croco@gmail.com> * chore(argocd-image-updater): bump version Signed-off-by: yu-croco <yu.croco@gmail.com> --------- Signed-off-by: yu-croco <yu.croco@gmail.com> Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> Co-authored-by: yu-croco <yu.croco@gmail.com> Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
a78a80a
to
c07cf78
Compare
@@ -2,7 +2,7 @@ apiVersion: v2 | |||
appVersion: v1.6.6 | |||
description: A Helm chart for Argo Rollouts | |||
name: argo-rollouts | |||
version: 2.35.2 | |||
version: 2.36.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vitorscassiano According to semantic versioning, the next version after 2.35.2
would be 2.35.3
. Following the convention, the last part of the version (in this case, the "2") would be incremented to indicate a fix or patch, while keeping the previous parts unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the versioning guide described in this document link. If I understand correctly, these changes include new functionality for the controller, so we should update the minor version, right?
{{- if .Values.controller.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "argo-rollouts.fullname" . }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
app.kubernetes.io/component: {{ .Values.controller.component }} | ||
{{- include "argo-rollouts.labels" . | nindent 4 }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "argo-rollouts.fullname" . }} | ||
minReplicas: {{ .Values.controller.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- with .Values.controller.autoscaling.metrics }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- else }} | ||
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ . }} | ||
{{- end }} | ||
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .Values.controller.autoscaling.behavior }} | ||
behavior: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HorizontalPodAutoscaler (HPA) template looks well-structured and follows the conventions commonly seen in Kubernetes YAML
manifests. However, I can provide some suggestions for improvement:
Consistency in Label Indentation:
Ensure consistency in label indentation. Currently, you're using nindent 4
for some labels and not for others. It's better to maintain consistency for readability.
Conditional Checks:
It's good that you have conditional checks using if statements to enable or disable autoscaling based on configuration. This provides flexibility.
Validation of Configurations:
Verify that the values provided for minReplicas
and maxReplicas
are within acceptable ranges and that the autoscaling metrics
and behaviors are configured correctly for your application's requirements.
Overall, your template seems well-structured and should work effectively for configuring HorizontalPodAutoscaler
in Kubernetes environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated yaml are well-structured:
# Source: argo-rollouts/templates/controller/hpa.yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: release-name-argo-rollouts
namespace: "moonlight-pipeline"
labels:
app.kubernetes.io/component: rollouts-controller
helm.sh/chart: argo-rollouts-2.36.0
app.kubernetes.io/name: argo-rollouts
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "v1.6.6"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: argo-rollouts
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: release-name-argo-rollouts
minReplicas: 2
maxReplicas: 4
metrics:
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
Signed-off-by: vitor.cassiano <vitor.cassiano@picpay.com>
…o/argo-helm into feat/add-argo-rollouts-hpa
Hi @vitorscassiano , thank you for your PR. |
Signed-off-by: Vitor Cassiano <vitorvscassiano@gmail.com>
Add support to turn-on HPA on argo rollouts controller.
Checklist: