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

Use traefik labels as label prefix #105

Open
Disane87 opened this issue Nov 27, 2024 · 2 comments
Open

Use traefik labels as label prefix #105

Disane87 opened this issue Nov 27, 2024 · 2 comments

Comments

@Disane87
Copy link

Disane87 commented Nov 27, 2024

Hi and thank you for this awesome project!

I have several services running with one or more available webservers. Since I have around 30 docker containers running, I don't want to edit all of them manually and I tried to link autokuma with the traefik labels, because all available service have traefik labels.

Here are some of my labels

- traefik.enable=true
- traefik.subdomain=status
- traefik.http.services.uptimekuma.loadbalancer.server.port=3001

traefik.subdomain is a custom tag to get rid of the boilerplate I have to set on each service for Traefik.

But when I set AUTOKUMA__DOCKER__LABEL_PREFIX to traefik autokuma throws exceptions like

WARN [kuma_client::util] Error while parsing http: unknown variant services, expected one of group, http, port, ping, keyword, json-query, grpc-keyword, dns, docker, real-browser, push, steam, gamedig, mqtt, kafka-producer, sqlserver, postgres, mysql, mongodb, radius, redis, tailscale-ping!
WARN [autokuma::sync] Encountered error during sync: Error while trying to parse labels: unknown variant services, expected one of group, http, port, ping, keyword, json-query, grpc-keyword, dns, docker, real-browser, push, steam, gamedig, mqtt, kafka-producer, sqlserver, postgres, mysql, mongodb, radius, redis, tailscale-ping

Which I understand, because the traefik labels doesn't match your kuma.xyz syntax.

Do you have any idea how I can automatically create entries in UptimeKuma with these treafik labels?

@BigBoot
Copy link
Owner

BigBoot commented Nov 28, 2024

Not possible, you could create a snippet to "translate" traefik labels to autokuma ones to decrease duplication, but you'd still need to add a label to include the snippet in the given containers.

@Disane87
Copy link
Author

Too bad!

Is there a chance to get such a "mode" or is this a thing you don't want to support?

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