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

Fixes empty fields generated in agent manifests #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agmimidi
Copy link

@agmimidi agmimidi commented Apr 6, 2022

The way the templating for the cluster-agent is defined now, will always create a tolerations, labels and nodeSelector fields regardless if these fields have values defined for them or not. These fields on the final manifest will just be empty.
labels: {} nodeSelector: {} tolerations: []

While this does not cause issues when the agent is deployed directly via Helm (e.g. via helm install) it does cause issues when deployed via ArgoCD. Argo will try and deploy the manifest (generated using helm template) with the empty fields included, but the final manifest on the cluster will omit this fields. As a result, Argo will identify a diff between the desired and applied manifest and try to apply it again. This results in a sync loop which drains resources from the argoCD deployment.

This pull request adds some if statements on the cluster-agent template, and omits these fields if they are undefined in the provided values file.

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.

1 participant