-
Notifications
You must be signed in to change notification settings - Fork 219
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
TridentConfigurator
CRD has persistent diff
#915
Comments
Seeing the same with my argo deployment of trident-operator. I suspect k8s considers priority 0 as redundant and mutates it out. Current workaround with ArgoCD is to utilize the |
We've just bumped into this as well. In case someone finds it useful, here's our change to Application/trident to address this: --- all.yaml 2024-08-06 10:11:43.216415082 +0200
+++ all.new.yaml 2024-08-06 10:09:10.890141528 +0200
@@ -855,22 +855,29 @@
helm:
valueFiles:
- values.yaml
- values.eu-dev.yaml
destination:
server: "https://kubernetes.default.svc"
namespace: trident
+ ignoreDifferences:
+ - group: apiextensions.k8s.io
+ jqPathExpressions:
+ - .spec.versions[]? | .additionalPrinterColumns[]? | .priority
+ kind: CustomResourceDefinition
+ name: tridentconfigurators.trident.netapp.io
syncPolicy:
automated:
selfHeal: true
prune: true
syncOptions:
- CreateNamespace=true
+ - RespectIgnoreDifferences=true
retry:
limit: 10000000
backoff:
# the amount to back off. Default unit is seconds,
# but could also be a duration (e.g. "2m", "1h")
duration: 30s
# a factor to multiply the base duration after each failed retry
factor: 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I just upgraded from Helm chart version 100.2402.0 to 100.2406.1. After the upgrade, I noticed that Argo CD still had a diff between desired state and live state, and it never goes away:
In the new CRD
TridentConfigurator
, there is a listadditionalPrinterColumns
where objects may set the fieldpriority
. Some elements in the list haspriority: 0
according to the CRD applied by the Helm chart:trident/helm/trident-operator/crds/tridentconfigurators.yaml
Lines 17 to 42 in 722e7ef
It seems like they get modified, I'm guessing by the Trident operator, so the
priority
field gets removed if its value is0
. This causes a constant diff in tools like Argo CD. In the particular case of Argo CD, it is possible to ignore changes to certain object attributes, but I think this diff is probably unintentional and should be fixed.Environment
Provide accurate information about the environment to help us reproduce the issue.
helm template --include-crds trident -n trident trident/trident-operator --set 'tridentLogFormat=json' --version 100.2406.1
(this is similar to what Argo CD with Kustomize executes in my case)To Reproduce
kubectl get crd TridentConfigurator -o yaml
and see thatpriority: 0
is unset.Expected behavior
There should be no diff after apply.
Additional context
If I sync Argo CD so the
priority
field gets set, thetrident-operator
produces this log: trident-operator.logThe text was updated successfully, but these errors were encountered: