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

remove(deployment): the 'replicas' field from the helm template if not used by user #142

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

alexis974
Copy link
Contributor

What does this MR do?

Remove the 'replicas' field from the helm template if set to null by user.

Why was this MR needed?

If you are using Keda to auto-scale your runner, it will modify the 'spec.replicas' of the deployment. That will cause a drift from the manifest known to ArgoCD. Therefore ArgoCD resync the resource. But then Keda retry to update it, and so on.....

By modifing the deployment template, we ensure that the replicas field is not present in the helm template if set to null by the user, and therefore not watch by ArgoCD. Note that by default, Kubernetes will set de 'spec.replicas' field to 1 if not present.

What's the best way to test this MR?

Do three helm template:

  • One with replicaCount to 1
  • One with replicaCount to 0
  • One with replicaCount to null

@alexis974
Copy link
Contributor Author

Could you take a look @juanpicado ?

@alexis974 alexis974 changed the title fix(deployment): conflict between ArgoCD and Keda remove(deployment): the 'replicas' field from the helm template if not used by user Mar 5, 2024
@alexis974
Copy link
Contributor Author

Hello @juanpicado , sorry about the failed check. I bumped the chart version.

@juanpicado
Copy link
Member

juanpicado commented Mar 5, 2024

There is an error to address , feel free to check it out them I'll merge fast as possible.

@alexis974
Copy link
Contributor Author

Hi @juanpicado, sorry for the long delay.
Could you trigger the workflow again ?

@alexis974
Copy link
Contributor Author

I updated the documentation. I seems that you need to re-trigger the workflow @juanpicado . Sorry for that :/

@juanpicado juanpicado merged commit 7665112 into verdaccio:master Mar 19, 2024
1 check passed
@juanpicado
Copy link
Member

Thanks :)

@alexis974 alexis974 deleted the fix/keda-argocd-conflict branch March 19, 2024 12:38
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.

None yet

2 participants