Closed ymettier closed 10 months ago
Of course : a manual fix is to remove all the agents. Then restart the pods : they will registers automatically.
some cleanup should be done automatically when a pod is removed.
+1. Or by scheduled task at least.
when an pod terminates, the agent should unregister before leaving.
+1.
Seems the same problem should appear for autoscaler and I wonder if it has been resolved somehow.
As a workaround we can:
P.S. It's feature request, I would say.
Well, I'm writing like if I was a member of the Architecture Board of WoodpeckerCI, which I'm not. I'm fairly new to Woodpecker-ci. Please consider my suggestions as what they are : just suggestions.
P.S. It's feature request, I would say.
I consider it as a security issue when any agent, including malicious agents can connect as soon as they have the door key :)
I second this behavior and have also asked/reported this somewhere some months ago but can't find it anymore.
Suggestion : when an pod terminates, the agent should unregister before leaving.
I think this would be the best approach. I don't think that switching to a statefulset would make anything better.
Component
server, agent
Describe the bug
I noticed that I have a lot of agents declared in http://my-ci/admin/settings#agents.
After few tests, I noticed that every time I restart a pod with an agent, it registers itself, adding a new agent declared in http://my-ci/admin/settings#agents.
Note : in the Kubernetes world, pods can be deleted at any time, for load balancing, draining a node, upgrading, or any other good or bad reason. With the Helm chart provided at woodpecker-ci/helm the pods are under control of a Deployment, which means that they are stateless. Any new pod has no idea of the registration of the older one.
Bug : some cleanup should be done automatically when a pod is removed.
Suggestion : when an pod terminates, the agent should unregister before leaving.
System Info
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]