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

Ignore spec.replicas for autoscaled MachineSets in ArgoCD sync #93

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

simu
Copy link
Member

@simu simu commented Jan 31, 2025

We need to ignore changes to spec.replica when diffing and syncing MachineSets which are managed by a MachineAutoscaler.

To do so we 1) dynamically configure spec.ignoreDifferences in the ArgoCD app to ignore spec.replicas of each MachineSet that's targeted by a MachineAutoscaler and 2) set ArgoCD sync option RespectIgnoreDifferences=true to ensure that we don't overwrite the machine autoscaler's value in spec.replicas if we're applying other changes.

Checklist

  • The PR has a meaningful title. It will be used to auto-generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Update the documentation.
  • Categorize the PR by adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.

@simu simu requested a review from a team as a code owner January 31, 2025 08:46
simu added 2 commits January 31, 2025 09:51
Template version: main (98d16f9)
We need to ignore changes to `spec.replica` when diffing *and* syncing
MachineSets which are managed by a `MachineAutoscaler`.

To do so we 1) dynamically configure `spec.ignoreDifferences` in the
ArgoCD app to ignore `spec.replicas` of each `MachineSet` that's
targeted by a `MachineAutoscaler` and 2) set ArgoCD sync option
`RespectIgnoreDifferences=true` to ensure that we don't overwrite the
machine autoscaler's value in `spec.replicas` if we're applying other
changes.
@simu simu force-pushed the fix/autoscaling-sync branch from a92cf7b to 51a65f8 Compare January 31, 2025 08:52
@simu simu added bug Something isn't working bump:patch labels Jan 31, 2025
Copy link

github-actions bot commented Jan 31, 2025

🚀 This PR has been released as v4.3.1

Triggering workflows Release

🛠️ Auto tagging enabled with label bump:patch

@simu
Copy link
Member Author

simu commented Jan 31, 2025

Also folding the template update from #92 into this PR

@simu simu changed the title Ignore spec.replicas for autoscaled MachineSets during ArgoCD sync Ignore spec.replicas for autoscaled MachineSets in ArgoCD sync Jan 31, 2025
@simu simu merged commit 0e12903 into master Jan 31, 2025
21 checks passed
@simu simu deleted the fix/autoscaling-sync branch January 31, 2025 09:05
@simu simu mentioned this pull request Jan 31, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bump:patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants