SaaShup / netbox-docker-plugin

Netbox Docker Plugin
https://saashup.com
BSD 3-Clause "New" or "Revised" License
64 stars 5 forks source link

:sparkles: Add support for container restart policy #101

Closed linkdd closed 7 months ago

linkdd commented 8 months ago
Netbox version Plugin version Agent version Docker API Version
3..6.9 1.2.0 N/A N/A

Actual Behavior

There is no way to specify a restart policy on a container. This means for example, that when the host restarts, the netbox-docker-agent is not restarted automatically, and you can't restart it from Netbox since the agent is not there to start it (oopsie).

Desired Behavior

According to the documentation, we can configure a container to be restarted:

A field should be added to the Container model, as an enumeration, to define the restart policy. The default value should be no. Another field should be added for the max-retries as well.

fanshan commented 7 months ago

@linkdd We will first implement the enumeration. We plan for later the max-retries property.