Skip to content

Conversation

@illume
Copy link
Contributor

@illume illume commented Oct 27, 2025

Because there is no permission to do that now. So we run it without installing it.

For

Testing

  1. Deploy Headlamp using Helm chart version 0.36.0

Enable plugin manager:

Put in values.yml

pluginsManager:
  enabled: true
  configContent: |
    plugins:
      - name: flux
        source: https://artifacthub.io/packages/headlamp/headlamp-plugins/headlamp_flux
        version: 0.5.0

Use the local chart instead of the one in the repo.

helm install my-headlamp charts/headlamp --namespace kube-system -f values.yml
  1. Check pod status: kubectl get pods -n headlamp
  2. Before you would see CrashLoopBackOff with 1/2 Ready, with this it will say something like my-headlamp-58789b6df-8cpwn 2/2 Running 0 0m11s.
  3. Check logs: kubectl logs <pod> -c headlamp-plugin There should be a success message not a failure one.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 27, 2025
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 27, 2025
@illume illume added this to the v0.37.0 milestone Oct 28, 2025
@illume illume force-pushed the plugin-manager-fix branch from 8af7a4f to 8e36091 Compare October 28, 2025 10:03
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 28, 2025
@illume illume marked this pull request as draft October 28, 2025 10:24
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2025
@illume illume force-pushed the plugin-manager-fix branch from 8e36091 to e9fd227 Compare October 28, 2025 10:36
@illume illume marked this pull request as ready for review October 28, 2025 10:36
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2025
@k8s-ci-robot k8s-ci-robot requested a review from sniok October 28, 2025 10:36
@illume illume marked this pull request as draft October 28, 2025 10:38
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2025
@illume illume marked this pull request as ready for review October 28, 2025 11:05
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2025
@illume illume force-pushed the plugin-manager-fix branch from e9fd227 to 20bb65f Compare October 28, 2025 11:07
@illume illume added kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. labels Oct 28, 2025
@illume
Copy link
Contributor Author

illume commented Oct 29, 2025

@yolossn please review?

@yolossn
Copy link
Contributor

yolossn commented Oct 30, 2025

unrelated to this PR but the initcontianer is failing.

image

The configmap that is created from the pluginConfig has an empty line in the beginning.
image

@yolossn
Copy link
Contributor

yolossn commented Oct 30, 2025

@illume I tried reproducing this in helm playground.

Because there is no permission to do that now. So we run it without
installing it.

Also make sure the config and cache folders use somewhere writable.

The ConfigMap was rendering with extra newlines. At the top, and
after plugin.yml, which was causing an error when validating the
configuration inside the plugin manager code.
@illume illume force-pushed the plugin-manager-fix branch from 20bb65f to 6e36926 Compare October 30, 2025 14:52
@illume
Copy link
Contributor Author

illume commented Oct 30, 2025

@yolossn Thanks for testing and the review.

@illume I tried reproducing this in helm playground.

Neat tool. I updated the config so it does not render with the new lines. Could you please have a look?

@yolossn
Copy link
Contributor

yolossn commented Oct 30, 2025

Now the plugin is getting created in the path correctly. The plugins are not getting loaded by headlamp because there is a race condition. The server is getting started even before the plugin is downloaded. Ideally the watchPlugins should be set to true if pluginManager is enabled. Since this is unrelated we can fix this in a new PR

image image image

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: illume, yolossn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@illume
Copy link
Contributor Author

illume commented Oct 30, 2025

The plugins are not getting loaded by headlamp because there is a race condition. The server is getting started even before the plugin is downloaded. Ideally the watchPlugins should be set to true if pluginManager is enabled.

Sorry, yes... this is because we need the watch config which I forgot to mention in the testing. But it's documented already.

@illume
Copy link
Contributor Author

illume commented Oct 30, 2025

Thanks @yolossn

@illume illume merged commit 3d3fa42 into kubernetes-sigs:main Oct 30, 2025
3 of 4 checks passed
@illume illume deleted the plugin-manager-fix branch October 30, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants