-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
StatefulSet with volume claim causes diff with ServerSideApply=true
#11143
Comments
Due to: - argoproj/argo-cd#11143 - argoproj/argo-cd#11074 Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Hi @maikelpoot. This is a different issue and is tracked in #11139 |
+1 |
Probably related to kubernetes/kubernetes#87706 (current version here). But I don't understand why the conversion is done... EDIT: kubernetes/website#38981 |
Server-side apply doesn't ask for a conversion, but the apiserver does lots of conversions internally to operate on the statefulset. Without server-side apply, the object is not sent to the server, so nothing happens. With server-side apply, the conversion acts exactly as a default in that case (the conversion defaults these fields), so they end-up appearing in the dry-run output (I don't know much about how any of this is working, but I suspect the diff is done through a dry-run request) i.e. in practice, it's the same thing as #11143 (comment) |
+1 |
@apelisse Tks for jumping in the discussion. In the current version of Argo CD Server-Side Apply, we don't do a dry-run request. We tried to follow the same approach used by CSA aiming for efficiency and avoid sending that additional request to k8s API server. For that, I checked how K8s API server does the conversions and duplicated that logic in Argo CD controller. Unfortunately that is causing issues with default fields. I suspect that it is related with the OpenAPI document that we provide to the Going forward, I believe that dry run is a better way to achieve more accurate diffs as (I believe) it will handle cases where the resource is configured with mutation webhooks. I have an Argo CD proposal to implement dryrun during diff calculation (#11574). I am currently negotiating time to dedicate on the implementation. |
Yeah, we'd love to have more defaults in there, but you'll never get all of them anyway (mostly, as you mentioned, because of mutating webhook and such). Note that dry-run doesn't work well for multi-resources when there's a dependency (namespace must be created before the resources in the namespace can be created, CRD must be created before the CRs can be created, etc...). Let me know if I can help with anything. |
+1 |
I hit the same issue today with Loki. |
for now I'm just patching statefulsets on kustomize/helm
|
Argo would not sync properly unless the appropriate values were defined for the secret - Known issue doc'ed under 'argoproj/argo-cd#11143'
any updates on this? is there a way to ignore the differences in the first screenshot? I have multiple helm charts complaining about apiversion and kind, just like the screenshot. |
<3 |
Like the last couple of comments, I also applied server side diffing for a specific application, particularly CRDs of Prometheus Operator, still I see a lot of diffs that cause my Application to be reported as out of sync. The same also for Loki. I also tried with mutation webhook option, but also this made no difference.
Is there anything we are missing? @STollenaar or anybody, did you find a solution for this? Here is a screenshot to show an example: |
certain objects are showing a diff state, namely statefulSets and CSI drivers when installed via Helm. In the case of CSI's this fixes deployment blockers imposed by Argocd The statefulSet is merely an 'eyesore' argoproj/argo-cd#11143
@MohammedNoureldin - For me, also using Prometheus-Operator, the fix posted by @sgsollie that I replied and <3'd worked great. |
@MohammedNoureldin the diff you're seeing makes sense to me... the contents on-cluster are actually simply different from the contents in git. Others, can you confirm that you're still seeing a diff after upgrading and enabling server-side-diff (which is enabled separately from server-side apply)? |
I have not so that's my issue thank you. I'll go ensure that's enabled |
Thank you for replying, @crenshaw-dev I though in the beginning that it is an issue in Argo CD, but it is not. Actually I figured out. Installing Kube-Prometheus chart and Loki chart together is the issue. Loki installs older version of CRDs, which causes the issue. Prevening Loki from installing its CRDs to rely only on the CRDs of Grafana seems also to not be working (I am not 100% about this, it needs to be confirmed). So it was kind of cycle, everyone of these reports out-of-sync after syncing the other one. Yes, I activated server-side diffs (and also apply). I am not sure if it is relevant now after finding that the source of the issue is not Argo. |
I was able to have it not show up when I used the servidesidediff option. But enabling it would only work when I used the annotation on the application for some reason |
Can confirm that the |
I am having the same issue, i am running the last argocd version... omg |
…-cd#11143 Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>
I believe I am also experiencing this issue - I don't see the Out of Sync issue if I am explicit and have a PVC instead of a volumeClaimTemplate Is the fix to annotate the App with argocd.argoproj.io/compare-options: ServerSideDiff=true ?
Because this didn't work for me. |
Does anyone have the issue in ArgoCD 2.10.0, that the whole ArgoCD seems to be kind of stuck when enabling server side diff? Refresh button does nothing, and most/all of resources looks like they are stuck. The logs show nill pointer issue. I am not sure what is the exact source of this issue.
|
recent versions were royally jacked for me, I ended up rolling back to 6.7.18 version of the chart, which = 2.10.9 this sort of works. |
It helps
|
If you set
along with |
Leaving a comment just to show how we bridge it.
|
Checklist:
argocd version
.Describe the bug
As described in #11074 I get OutOfSync diff when installing loki using ServerSideApply. I haven't double checked but Im pretty sure this is not a Loki-specific issue.
Live manifest
Desired manifest
I also saw this old issue #4126 related to what looks like the same problem.
To Reproduce
Install this helm chart: https://github.com/grafana/loki/tree/main/production/helm/loki
Expected behavior
No diff.
Screenshots
Version
argocd: v2.4.11+3d9e9f2.dirty BuildDate: 2022-08-22T19:32:10Z GitCommit: 3d9e9f2f95b7801b90377ecfc4073e5f0f07205b GitTreeState: dirty GoVersion: go1.19 Compiler: gc Platform: darwin/amd64 WARN[0000] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web. argocd-server: v2.5.0+b895da4
Logs
The text was updated successfully, but these errors were encountered: