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

Allow custom labels to be configured for Dockerized Services #1247

Open
1 task done
FatildaIV opened this issue Jun 8, 2023 · 0 comments · May be fixed by #1251
Open
1 task done

Allow custom labels to be configured for Dockerized Services #1247

FatildaIV opened this issue Jun 8, 2023 · 0 comments · May be fixed by #1251
Labels
in: module An issue/pull request releated to one of the internal modules t: feature request A request of a feature someone wants to see in a future release. v: 4.X This pull should be included in the 4.0 release

Comments

@FatildaIV
Copy link

Describe the new feature

Adding a new configuration option to the Dockerized-Services config.json file would allow administrators to assign custom labels to Docker containers that are created when the service starts.

Why do you need this feature?

Using custom labels for Dockerized services will make it easier to work with containers using 3rd party tools and automate tasks that CloudNet is not yet capable of, such as automatically updating the used Docker image for a service environment using containrrr/watchtower, which behavior can be controlled by adding a label to the running container.

Alternatives

Setting the label before starting the container

It's indeed not possible to add a label to an existing image. Strictly speaking, adding a label would change the images checksum, thus its id, thus it's no longer the same image.
by oxy

Or see label options in Docker object labels | Docker Documentation.

Setting up a label by building a Docker image

This solution cannot be considered sufficient as it causes unnecessary load on the server resources and cannot be linked with automatic tasks managed by 3rd party tools (the build would have to be done by cron with time offset against 3rd party tasks).

Configure containrrr/watchtower to prevent automatic restart of containers after they are updated

While this solution is possible, it creates problems for other services that run on the same Docker instance and do not support automated container restart options, such as CloudNet via its REST API. This setup would require manually accessing the server and restarting the containers after each image update.

Do nothing and let the third party tool handle its thing

However, the optimistically best option has its flaws, which is why this feature request exists. Automatically restarting containers will break the connection between the CloudNet service and the network listener, automatically deploying the new CloudNet service while restarting the existing container. This results in duplicate services running, increased server resource utilization, and possible data corruption.

Other

No response

Issue uniqueness

  • Yes, this issue is unique. There are no similar issues.
@FatildaIV FatildaIV added s: needs triage Issue waiting for triage t: feature request A request of a feature someone wants to see in a future release. labels Jun 8, 2023
@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release in: module An issue/pull request releated to one of the internal modules and removed s: needs triage Issue waiting for triage labels Jun 8, 2023
@0utplay 0utplay linked a pull request Jun 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: module An issue/pull request releated to one of the internal modules t: feature request A request of a feature someone wants to see in a future release. v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants