headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

When I use baseUrl feature, plugins doesn't work #1102

Closed Rolika4 closed 3 months ago

Rolika4 commented 1 year ago

Description

Use plugins in the headlamp when base-url option is enabled.

Impact

When the base-URL option is enabled - plugins don't draw in the Headlamp UI.

Environment and steps to reproduce

Set-up: Kubernetes 1.23, nginx-ingress controller, Keycloak OIDC enabled Headlamp in cluster deployed with settings:

  1. deployment:

      args:
        - '-in-cluster'
        - '-plugins-dir=/headlamp/plugins'
        - '-oidc-client-id=<client_id>'
        - '-oidc-client-secret=$(CLIENT_SECRET)'
        - >-
          -oidc-idp-issuer-url=https://<keycloak_url>/auth/realms/<headlamp_realm>
        - "-base-url=/headlamp"
  2. ingress:

      spec:
        rules:
          - host: >-
             <dns_name>.com
            http:
              paths:
                - path: /headlamp
                  pathType: Prefix
                  backend:
                    service:
                      name: edp-headlamp
                      port:
                        number: 80

Additional information

I tried to copy plugins from the custom directory (/headlamp/plugins) to the Headlamp base plugins directory, but it did not help to resolve this issue.

Attached 2 screenshots. Without base-URL features headlamp_work With base-URL features headlamp_un

illume commented 3 months ago

I'm pretty sure this works now.