netbox-docker-plugin icon indicating copy to clipboard operation
netbox-docker-plugin copied to clipboard

add support for config context in volumes

Open dzove855 opened this issue 1 year ago • 1 comments

Netbox version Agent version Docker API Version
v3.6.9 / /

Actual Behavior

There is no way to add config context to be mounted inside a container

Desired Behavior

An new type should be added for volumes, which we can use inside the agent to map mount a config context inside a container

Example of use cases:

  • you have a config file with for example a nginx configuration, we would use the config context who contains the config and the mount it inside the container where the path should be

Expected structure: Destination path of the file Config context Driver (something like configmap or just configcontext)

dzove855 avatar Mar 06 '24 13:03 dzove855

Would you plan to keep context on the volume itself as per below ?

buzko@lovespizza:~$ docker volume create dzove --label country=croatia,luxembourg --label birthday=01/01/1970
dzove
buzko@lovespizza:~$ docker inspect dzove
[
    {
        "CreatedAt": "2024-05-06T16:28:20+02:00",
        "Driver": "local",
        "Labels": {
            "birthday": "01/01/1970",
            "country": "croatia,luxembourg"
        },
        "Mountpoint": "/var/lib/docker/volumes/dzove/_data",
        "Name": "dzove",
        "Options": null,
        "Scope": "local"
    }
]

if not "add host" will make you lose that information

lvenier avatar May 06 '24 14:05 lvenier