Skip to content
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

Add plumbing for Volume Labels #50

Open
s4ke opened this issue Nov 15, 2023 · 5 comments
Open

Add plumbing for Volume Labels #50

s4ke opened this issue Nov 15, 2023 · 5 comments

Comments

@s4ke
Copy link
Contributor

s4ke commented Nov 15, 2023

We are building infrastructure for multitenancy around Docker Swarm using labels on objects - see https://github.com/neuroforgede/swarmgate

I would love for this volume plugin to set and get labels from the Hetzner API. This way I can properly use our multi-tenancy concept with the driver.

What do you think @costela ? Should be possible as far as I can tell.

https://github.com/moby/moby/blob/93fffa299c2cb23055bb54c380a02d53c9a7d525/daemon/cluster/executor/container/container.go#L444

https://github.com/moby/moby/blob/93fffa299c2cb23055bb54c380a02d53c9a7d525/volume/drivers/proxy.go#L26

@s4ke
Copy link
Contributor Author

s4ke commented Nov 15, 2023

The go-plugin-helpers might not support it after all though?

https://github.com/docker/go-plugins-helpers/blob/6eecb7beb65124bb44a23848bb46e98b4f50ae18/volume/api.go#L83

@s4ke
Copy link
Contributor Author

s4ke commented Nov 15, 2023

If the label stuff does not work, we could work around it for our usecase by making the label the volume driver sets configurable and just deploy the volume driver multiple times. Then we set the volume driver permissions accordingly. Label's would be much simpler and straightforward though.

Ah, I forgot, the driver supports prefixing anyways.

@s4ke
Copy link
Contributor Author

s4ke commented Nov 21, 2023

closing this. we will be going down the route of prefixing.

@s4ke s4ke closed this as completed Nov 21, 2023
@costela
Copy link
Owner

costela commented Nov 23, 2023

ok, good to know! Sorry I didn't get around to answering earlier 🙈

@s4ke
Copy link
Contributor Author

s4ke commented Oct 7, 2024

https://docs.docker.com/reference/api/engine/version/v1.45/#tag/Volume/operation/VolumeCreate

The API lists it however. This is weird. I think prefixing is a viable workaround for now, but I think we should get the label support into the driver anyways. It can help for other topics as well to have volumes listed in Hetzner cloud.

@s4ke s4ke reopened this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants