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

Charm should block if external hostname isn't set in subdomain routing mode #261

Open
sed-i opened this issue Oct 3, 2023 · 0 comments
Open

Comments

@sed-i
Copy link
Contributor

sed-i commented Oct 3, 2023

Bug Description

When traefik is running in subdomain routing mode and without an external hostname set, invalid ingress URLs are generated, such as:
test-prom-0.10.43.8.206

To Reproduce

Deploy this bundle and then juju run trfk/0 show-proxied-endpoints.

bundle: kubernetes
applications:
  ca:
    charm: self-signed-certificates
    channel: edge
    revision: 37
    scale: 1
    constraints: arch=amd64
  external-ca:
    charm: self-signed-certificates
    channel: edge
    revision: 37
    scale: 1
    constraints: arch=amd64
  prom:
    charm: prometheus-k8s
    channel: edge
    revision: 150
    series: focal
    resources:
      prometheus-image: 128
    scale: 1
    constraints: arch=amd64
    storage:
      database: kubernetes,1,1024M
    trust: true
  trfk:
    charm: traefik-k8s
    channel: edge
    revision: 157
    series: focal
    resources:
      traefik-image: 148
    scale: 1
    options:
      routing_mode: subdomain
    constraints: arch=amd64
    storage:
      configurations: kubernetes,1,1024M
relations:
- - prom:ingress
  - trfk:ingress-per-unit
- - external-ca:certificates
  - trfk:certificates

Environment

Model  Controller  Cloud/Region        Version  SLA          Timestamp
test   k8s         microk8s/localhost  3.1.5    unsupported  14:31:33-04:00

App          Version  Status  Scale  Charm                     Channel  Rev  Address        Exposed  Message
ca                    active      1  self-signed-certificates  edge      37  10.152.183.57  no       
external-ca           active      1  self-signed-certificates  edge      37  10.152.183.66  no       
prom         2.46.0   active      1  prometheus-k8s            edge     150  10.152.183.73  no       
trfk         2.10.4   active      1  traefik-k8s               edge     157  10.43.8.206    no       

Unit            Workload  Agent  Address       Ports  Message
ca/0*           active    idle   10.1.166.104         
external-ca/0*  active    idle   10.1.166.126         
prom/0*         active    idle   10.1.166.83          
trfk/0*         active    idle   10.1.166.99          

Relation provider         Requirer               Interface         Type     Message
external-ca:certificates  trfk:certificates      tls-certificates  regular  
prom:prometheus-peers     prom:prometheus-peers  prometheus_peers  peer     
trfk:ingress-per-unit     prom:ingress           ingress_per_unit  regular  
trfk:peers                trfk:peers             traefik_peers     peer     

Relevant log output

$ juju run trfk/0 show-proxied-endpoints
Running operation 8 with 1 task
  - task 9 on unit-trfk-0

Waiting for task 9...
proxied-endpoints: '{"prom/0": {"url": "https://test-prom-0.10.43.8.206/"}}'

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant