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

Scope labels to avoid collisions #86

Open
ogmueller opened this issue Feb 24, 2025 · 0 comments
Open

Scope labels to avoid collisions #86

ogmueller opened this issue Feb 24, 2025 · 0 comments

Comments

@ogmueller
Copy link

It would be really nice, if all ofelia labels are scoped to the container ID/name.

Example:
If a hoster has many docker compose project, it can happen, that the project is using the same labels for ofelia than another project.
These are our labels for a project, where we call an optimize method.

       - "ofelia.enabled=true"
       - "ofelia.job-exec.optimize.schedule=@every 23h"
       - "ofelia.job-exec.optimize.command=php -dmemory_limit=-1 /web/app/console.php index:optimize"
       - "ofelia.job-exec.optimize.no-overlap=true"

Another project has also an optimize step and because of that, named it "optimize" as well.

There is no error message in ofelia, that this is a problem, but the log is rather strange, if you do so. The jobs are kind of overwriting themselves and it is not clear, which job is executed and which one is basically dead.

If all jobs would be "scoped" to the container, they couldn't overwrite each other and it would prevent any name collision between independent projects. So maybe ofelia could (internally) add the container ID or name to the job-exec name. So if the container is called "gitlab" and the ofelia jobs-exec is called "optimize" make it (internally) "gitlab-optimize" or so.

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

1 participant