Skip to content
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

Swap cpu and memory in HPA template #3773

Merged
merged 2 commits into from Apr 19, 2023
Merged

Conversation

coolbry95
Copy link
Contributor

@coolbry95 coolbry95 commented Apr 17, 2023

Proposed changes

There is a kubernetes issue where the cpu and memory get swapped at some point. This make Argocd think the manifest is always out of sync. Swap them here so that Argocd is happy.

#3769

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@coolbry95 coolbry95 requested a review from a team as a code owner April 17, 2023 16:56
@github-actions github-actions bot added the helm_chart Pull requests that update the Helm Chart label Apr 17, 2023
@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #3773 (88efb9d) into main (36ac2ef) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3773   +/-   ##
=======================================
  Coverage   52.38%   52.38%           
=======================================
  Files          59       59           
  Lines       16890    16890           
=======================================
  Hits         8848     8848           
  Misses       7747     7747           
  Partials      295      295           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lucacome lucacome changed the title swap cpu and memory in hpa Swap cpu and memory in HPA template Apr 18, 2023
@lucacome lucacome requested a review from a team April 18, 2023 23:44
@brianehlert brianehlert linked an issue Apr 19, 2023 that may be closed by this pull request
@brianehlert
Copy link
Collaborator

This fix follows prior art from here: kubernetes/kubernetes#74099
Further discussed here: argoproj/argo-cd#9145 (comment)
This fix is probably the lowest impact and has the effect of making ArgoCD content.

@brianehlert brianehlert added this to the v3.1.1 milestone Apr 19, 2023
@lucacome lucacome self-assigned this Apr 19, 2023
@lucacome lucacome merged commit a10f9da into nginxinc:main Apr 19, 2023
62 checks passed
lucacome pushed a commit that referenced this pull request Apr 19, 2023
lucacome pushed a commit that referenced this pull request May 3, 2023
lucacome added a commit that referenced this pull request May 3, 2023
Swap cpu and memory in HPA template (#3773)

(cherry picked from commit a10f9da)

Co-authored-by: Bryan Hendryx <coolbry95@users.noreply.github.com>
poblahblahblah added a commit to poblahblahblah/sumologic-kubernetes-collection that referenced this pull request Jun 7, 2023
This addresses an issue when using ArgoCD (and maybe other GitOps operators)
where Kubernetes reorders the objects under the spec.metrics key thus causing
Sync issues with ArgoCD.

Originally reported to the ArgoCD project here:
argoproj/argo-cd#1079

Originally reported to the Kubernetes project here:
kubernetes/kubernetes#74099

Other projects and companies have also addressed this by simply reordering
the metrics section:

* kubernetes/ingress-nginx#10043
* nginxinc/kubernetes-ingress#3773
* grafana/helm-charts#758
* open-telemetry/opentelemetry-helm-charts#103
* Nextdoor/k8s-charts#102

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
poblahblahblah added a commit to poblahblahblah/sumologic-kubernetes-collection that referenced this pull request Jun 12, 2023
This addresses an issue when using ArgoCD (and maybe other GitOps operators)
where Kubernetes reorders the objects under the spec.metrics key thus causing
Sync issues with ArgoCD.

Originally reported to the ArgoCD project here:
argoproj/argo-cd#1079

Originally reported to the Kubernetes project here:
kubernetes/kubernetes#74099

Other projects and companies have also addressed this by simply reordering
the metrics section:

* kubernetes/ingress-nginx#10043
* nginxinc/kubernetes-ingress#3773
* grafana/helm-charts#758
* open-telemetry/opentelemetry-helm-charts#103
* Nextdoor/k8s-charts#102

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
swiatekm-sumo pushed a commit to SumoLogic/sumologic-kubernetes-collection that referenced this pull request Jun 13, 2023
* Reordering HPA metrics to match HPA ordering

This addresses an issue when using ArgoCD (and maybe other GitOps operators)
where Kubernetes reorders the objects under the spec.metrics key thus causing
Sync issues with ArgoCD.

Originally reported to the ArgoCD project here:
argoproj/argo-cd#1079

Originally reported to the Kubernetes project here:
kubernetes/kubernetes#74099

Other projects and companies have also addressed this by simply reordering
the metrics section:

* kubernetes/ingress-nginx#10043
* nginxinc/kubernetes-ingress#3773
* grafana/helm-charts#758
* open-telemetry/opentelemetry-helm-charts#103
* Nextdoor/k8s-charts#102

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>

* add CHANGELOG entry

---------

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
helm_chart Pull requests that update the Helm Chart
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

Need backward support for autoscaling/v2beta2
4 participants