Cannot re-install litmus-agent after uninstalling it #334
Description
Hello,
I have a problem where we cannot re-install the litmus-agent after un-installing it.
When trying to re-install the agent the subscriber and event-tracker pod are failing with the following error: level=fatal msg="required key VERSION missing value"
or level=fatal msg="required key SERVER_ADDR missing value"
.
The reason is that the configmap (litmus-config) and the secret (litmus-agent) are not populated by the pre-hook job during the reinstall.
I think the origin of this problem is that during the uninstallation of the litmus-agent, the chaos-agent is not removed from the chaos center. Which mean the pre-hook job think that the litmus-agent is already installed on the chaoscenter and so skip the part where it add information to the configmap and the secret.
As a quickfix, removing the litmus-agent manually from the chaoscenter solve the issue and it's possible to re-install the litmus-agent.
As a long term fix, my first idea would be to a "pre-delete" job that remove the litmus-agent from the chaoscenter. Any opinion on this idea is welcome.
Have a nice day.