-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Custom resource actions overrides default actions #9147
Comments
Looked into the code a bit and I think the following code is probably causing this issue. As I suspected, there's no merging of the config there, it's currently either-or. Will try to make it merge the config instead. Do point out if I'm wrong. Lines 283 to 299 in 248929c
|
The function above only returns a string and I don't know how to combine the two values from override and the predefined actions reliably. Changing the functions to return a list of strings and combine the outputs after executing the string as Lua code is probably a better approach. |
Hit this bug, just when i thought how modular Argo is :p I think the possible workaround for now is just adding the upstream actions into our own argocd-cm configmap? For example for deployment, take everything under this https://github.com/argoproj/argo-cd/tree/master/resource_customizations/apps/Deployment/actions and add this to our list of custom actions i guess. |
Checklist:
argocd version
.Describe the bug
I added a custom resource action to Deployments in my
argocd-cm.yaml
and then after it is applied, I lost the option to restart my deployment. I am using Argo CD version 1.21 which only hasrestart
defined inresource_customizations/apps/Deployment/actions
.When not using the same action name as the default actions, I expect the default actions will not be overwritten, and instead the custom resource actions will be appended to the list of actions allowed on the resource. If the user wants to explicitly override the default actions, then they can use the same action name as the default.
To Reproduce
Add the following entry to
data
inargocd-cm.yaml
:Expected behavior
Both the
restart
action and custom resource actions will show up in the UI/CLI.Actual behavior
Only the custom resource actions showed up in the UI/CLI. The
restart
action is not there and got overwritten.Screenshots
Version
Logs
The text was updated successfully, but these errors were encountered: