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

docs: debugging sidecar CMPs #11142

Merged
merged 2 commits into from
Nov 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/user-guide/config-management-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,24 @@ If you don't need to set any environment variables, you can set an empty plugin
Each CMP command will also independently timeout on the `ARGOCD_EXEC_TIMEOUT` set for the CMP sidecar. The default
is 90s. So if you increase the repo server timeout greater than 90s, be sure to set `ARGOCD_EXEC_TIMEOUT` on the
sidecar.

!!! note
Each Application can only have one config management plugin configured at a time. If you're converting an existing
plugin configured through the `argocd-cm` ConfigMap to a sidecar, make sure the discovery mechanism only returns
true for Applications that have had their `name` field in the `plugin` section of their spec removed.

## Debugging a CMP

If you are actively developing a sidecar-installed CMP, keep a few things in mind:

1) If you are mounting plugin.yaml from a ConfigMap, you will have to restart the repo-server Pod so the plugin will
pick up the changes.
2) If you have baked plugin.yaml into your image, you will have to build, push, and force a re-pull of that image on the
repo-server Pod so the plugin will pick up the changes. If you are using `:latest`, the Pod will always pull the new
image. If you're using a different, static tag, set `imagePullPolicy: Always` on the CMP's sidecar container.
3) CMP errors are cached by the repo-server in Redis. Restarting the repo-server Pod will not clear the cache. Always
do a "Hard Refresh" when actively developing a CMP so you have the latest output.
Copy link
Contributor

@arturhoo arturhoo Nov 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially assumed that the --repo-cache-expiration would also work for this cache, but it turned out not to be the case. Do you know if this is expected or if it would be worth adding a new flag?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. That ought to work. Do you have a test case showing that the manifests aren't expiring?


## Plugin tar stream exclusions

In order to increase the speed of manifest generation, certain files and folders can be excluded from being sent to your
Expand Down