-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
"Configure plugin via sidecar" ⇒ child resources not pruned on deletion #8243
Labels
Comments
Foo: myfoo
KubeVersion: "1.21"
- in-sidecar: "true"
creationTimestamp: "2022-02-02T18:07:43Z"
+ labels:
+ app.kubernetes.io/instance: test-cmd-plugin
name: test-cmd-plugin
namespace: default The (partial) ConfigMap diff is interesting. I wonder if the problem is that the sidecar CMP is failing to apply the necessary label. |
I think I've found the fix. The most difficult part will be writing an e2e test for it. Should be done tomorrow. |
alexmt
pushed a commit
that referenced
this issue
Feb 16, 2022
gdsoumya
pushed a commit
to gdsoumya/argo-cd
that referenced
this issue
Feb 23, 2022
fix: add labels to sidecar CMP manifests (argoproj#8243) (argoproj#8367) Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
alexmt
pushed a commit
that referenced
this issue
Feb 25, 2022
3 tasks
wojtekidd
pushed a commit
to wojtekidd/argo-cd
that referenced
this issue
Apr 25, 2022
fix: add labels to sidecar CMP manifests (argoproj#8243) (argoproj#8367) Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> Signed-off-by: wojtekidd <wojtek.cichon@protonmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
The behavior differs between a plugin via Argo CD configmap and a plugin via sidecar if the application manifest has:
When the plugin is installed in the
argocd-cm
ConfigMap, then resources installed by the application are pruned when the application is deleted. If the plugin is in a sidecar, the application's resources are not pruned as expected when the application is removed.Also, the logs from ArgoCD are much shorter when deleting the application that uses the sidecar plugin (see "Logs" below).
To Reproduce
In this gist, i've included all the files referenced below. Short version: I've created an ArgoCD installation with two plugins. One installed in the Argo CD configmap and (almost) the same plugin in a sidecar.
Now there are two application
.yaml
files, one for the configmap plugin (with aname
) and one for the sidecar plugin (without aname
).If I apply
app-cmp-plugin.yaml
, the plugin from theargocd-cm
config map installs atest-cmd-plugin
config map in thedefault
namespace. When I deleteapp-cmp-plugin.yaml
, thetest-cmd-plugin
config map is pruned along with the application as expected.If I apply
nameless-app-cmp-plugin.yaml
, the plugin in the sidecar likewise installs atest-cmd-plugin
config map in thedefault
namespace. But when I deletenameless-app-cmp-plugin.yaml
, thetest-cmd-plugin
config map is not pruned along with the application. I expected it to be pruned.Expected behavior
I expect
argocd-cm
and sidecar plugins to behave identically and both should prune resources when specified to do so in the Application's declaration.Version
$ argocd version argocd: v2.1.7+a408e29.dirty BuildDate: 2021-11-19T05:20:05Z GitCommit: a408e299ffa743213df3aa9135bf7945644ec936 GitTreeState: dirty GoVersion: go1.17.2 Compiler: gc Platform: linux/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.2.2+03b17e0 BuildDate: 2022-01-01T06:27:52Z GitCommit: 03b17e0233e64787ffb5fcf65c740cc2a20822ba GitTreeState: clean GoVersion: go1.16.11 Compiler: gc Platform: linux/amd64 Ksonnet Version: v0.13.1 Kustomize Version: v4.2.0 2021-06-30T22:49:26Z Helm Version: v3.7.1+g1d11fcb Kubectl Version: v0.22.2 Jsonnet Version: v0.17.0
Logs
Logs are available in the gist and were created with
kubetail
for all pods in theargocd
namespace. What I found most interesting was that the log for deleting the application for theargocd-cm
configmap plugin, delete-with-name.log was 34 lines, but the one for deleting with the the sidecar plugin, delete-without-name.log, was 3 lines.The text was updated successfully, but these errors were encountered: