redhat-cop / rhel-edge-automation-arch

RHEL for Edge Automation Deployment Architecture
Apache License 2.0
44 stars 33 forks source link

Fix/serviceaccount imagepullsecret drift #169

Closed jordigilh closed 2 years ago

jordigilh commented 2 years ago

Fixes an issue with ServiceAccounts caused by the drift in the manifest spec's imagePullSecret and secrets fields that triggers a recurring sync in argoCD.

From the application point of view, it is in constant out-of-sync status while it attempts to synchronize. image image

With this change, ArgoCD will ignore the pullImageSecret and secrets difference. image

@sabre1041 @nasx please review. I needed only imagePullSecrets, but I thought adding secrets might be also worth it since it can also be a cause of out-of-sync in other cases. Let me know if you want me to narrow it to only imagePullSecrets.

There is another way to approach this, and that's to define this specifically to an Application manifest, rather than globally in ArgoCD, just by adding this snippet of code to the Application manifest:

  ignoreDifferences:
    - jsonPointers:
        - /imagePullSecrets
        - /secrets
      kind: ServiceAccount

Let me know which one you prefer.

sabre1041 commented 2 years ago

@jordigilh I have incorporated this into the bootstrap values so we may be able to close this issue