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

Insertion of Line break within label #406

Closed
2 tasks done
benniblot opened this issue Jan 26, 2024 · 1 comment
Closed
2 tasks done

Insertion of Line break within label #406

benniblot opened this issue Jan 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@benniblot
Copy link

⚠️ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

When trying to save my labels looking like this:

    labels:
      - com.centurylinklabs.watchtower.monitor-only=true
      - traefik.enable=true
      - traefik.http.routers.authentik.entrypoints=http
      - traefik.http.routers.authentik.rule=Host(`authenthik.domain.com`) || HostRegexp(`{subdomain:[a-z0-9]+}.domain.com`) && PathPrefix(`/outpost.goauthentik.io/`)
      - traefik.http.routers.authentik.middlewares=authentik-https-redirect
      - traefik.http.middlewares.authentik-https-redirect.redirectscheme.scheme=https
      - traefik.http.middlewares.authentik.forwardAuth.address=http://authentik:9000/outpost.goauthentik.io/auth/traefik
      - traefik.http.middlewares.authentik.forwardAuth.trustForwardHeader=true
      - traefik.http.middlewares.authentik.forwardAuth.authResponseHeaders=X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version,Authorization,Remote-User,Remote-Groups,Remote-Name,Remote-Email #Remote-User,Remote-Groups,Remote-Name,Remote-Email are for Dozzle
      - traefik.http.routers.authentik-secure.rule=Host(`authentik.domain.com`) || HostRegexp(`{subdomain:[a-z0-9-]+}.domain.com`) && PathPrefix(`/outpost.goauthentik.io/`)
      - traefik.http.routers.authentik-secure.entrypoints=https
      - traefik.http.routers.authentik-secure.tls=true
      - traefik.http.routers.authentik-secure.service=authentik
      - traefik.http.services.authentik.loadbalancer.server.port=9000
      - traefik.docker.network=internal_communication

They get reformatted to this, resulting in an invalid compose.yaml file:

    labels:
      - com.centurylinklabs.watchtower.monitor-only=true
      - traefik.enable=true
      - traefik.http.routers.authentik.entrypoints=http
      - traefik.http.routers.authentik.rule=Host(`authenthik.domain.com`) ||
        HostRegexp(`{subdomain:[a-z0-9]+}.domain.com`) &&
        PathPrefix(`/outpost.goauthentik.io/`)
      - traefik.http.routers.authentik.middlewares=authentik-https-redirect
      - traefik.http.middlewares.authentik-https-redirect.redirectscheme.scheme=https
      - traefik.http.middlewares.authentik.forwardAuth.address=http://authentik:9000/outpost.goauthentik.io/auth/traefik
      - traefik.http.middlewares.authentik.forwardAuth.trustForwardHeader=true
      - traefik.http.middlewares.authentik.forwardAuth.authResponseHeaders=X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version,Authorization,Remote-User,Remote-Groups,Remote-Name,Remote-Email #Remote-User,Remote-Groups,Remote-Name,Remote-Email are for Dozzle
      - traefik.http.routers.authentik-secure.rule=Host(`authentik.domain.com`)
        || HostRegexp(`{subdomain:[a-z0-9-]+}.domain.com`) &&
        PathPrefix(`/outpost.goauthentik.io/`)
      - traefik.http.routers.authentik-secure.entrypoints=https
      - traefik.http.routers.authentik-secure.tls=true
      - traefik.http.routers.authentik-secure.service=authentik
      - traefik.http.services.authentik.loadbalancer.server.port=9000
      - traefik.docker.network=internal_communication

👟 Reproduction steps

  1. Open dockge, add the labels provided
  2. Save
  3. Look at compose.yaml file

👀 Expected behavior

It should reformat the labels and leave them as is

😓 Actual Behavior

It reformats the labels resulting in an invalid dompose.yaml

Dockge Version

1.4.2

💻 Operating System and Arch

Debian GNU/Linux 11 (bullseye)

🌐 Browser

Brave v1.62.153

🐋 Docker Version

Docker Engine - Community 25.0.0 / 1.44

🟩 NodeJS Version

No response

📝 Relevant log output

No response

@benniblot benniblot added the bug Something isn't working label Jan 26, 2024
@devkinetic
Copy link

I ran into this today, also with traefik, the solution is to use the reccomended array format.

traefik.http.routers.authentik-secure.rule: "Host(`authentik.domain.com`) || HostRegexp(`{subdomain:[a-z0-9-]+}.domain.com`) && PathPrefix(`/outpost.goauthentik.io/`)"

https://github.com/compose-spec/compose-spec/blob/master/05-services.md#labels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants