Skip to content

Support configuring the dashboard's max HTTP header size in the pebble plan #338

Description

@NohaIhab

Why it needs to get done

When the kubeflow-dashboard charm sits behind a proxy/auth stack that adds sizeable headers, the dashboard workload returns 431 Request Header Fields Too Large and the UI fails to load.

This is expected Node.js behaviour: Node returns 431 once the header limit is exceeded (nodejs/node#25528), and the limit can be raised with the --max-http-header-size flag (nodejs/node#24811).

Today the only way to fix this is to manually edit the Pebble plan inside the running container to set NODE_OPTIONS='--max-http-header-size=...', which is not charm-managed and is lost on restart/reconciliation. There is no charm-supported way to configure it.

The manual workaround this replaces:

kubectl exec -it -n kubeflow kubeflow-dashboard-0 -c kubeflow-dashboard -- /bin/bash
pebble add --combine header-size /dev/stdin <<'EOF'
services:
  kubeflow-dashboard:
    override: merge
    environment:
      NODE_OPTIONS: '--max-http-header-size=32768'
EOF

What needs to get done

Provide a charm-supported way to configure the dashboard's maximum HTTP header size (e.g. a charm config option) that sets NODE_OPTIONS='--max-http-header-size=<value>' on the kubeflow-dashboard service in the Pebble plan.

When is the task considered done

  • A charm config option (or equivalent) controls the dashboard's max HTTP header size.
  • Setting it updates the kubeflow-dashboard service environment and persists across restarts/reconciliation (no manual container edits needed).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions