-
Notifications
You must be signed in to change notification settings - Fork 357
charts: Add headlamp-plugin sidecar for automated plugin management #2983
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
charts: Add headlamp-plugin sidecar for automated plugin management #2983
Conversation
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
fcf4fe1
to
fd8bf41
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
673f041
to
a619ba8
Compare
@knrt10 an initial review here along with other bulk support PR might be helpful. I've currently brought the image size to 100MB, further reduction of image size would require creating a binary IMO, I did try that also with |
Can you please add to the PR description why this is needed? How about using npm global install?Perhaps using global install is a good idea for the Dockerfile? Dockerfile: ARG BASE_IMAGE=node:lts
FROM $BASE_IMAGE
ARG VERSION=latest
WORKDIR /usr/src/app
RUN npm install -g @kinvolk/headlamp-plugin@$VERSION
ENTRYPOINT ["headlamp-plugin"] To run it defaulting to latest version: docker build -t headlamp-k8s/headlamp-plugin .
docker run -it --rm headlamp-k8s/headlamp-plugin Or with a version:
Watch bash scriptI think it should be for windows containers that the watch commands runs in JavaScript rather than using bash. Maybe the watch command could be added to headlamp-plugin? |
Yes, i did thought of installing using npm package. I was creating seperate containerization and headlamp-plugin container release configuration based on the initial description of the issue..
This would create dependency on the npm package. If this is fine approach, then I guess we wont need the release management and maintainance overhead for this container image seperatly.
And yes, this would be indeed better, thanks for the feedback. @illume @knrt10 please leave a reaction/comment to confirm the approach:
|
Sounds good to me. |
@illume @knrt10
a non-global install, not much difference in size though:
The total image size with |
The headlamp-plugin is large because it needs all the packages as frontend/ for testing. Is it only plugin management commands that need to be run? We did have a plan to make plugin-management its own package #2197 . Because it is also used by the app. plugin management by itself should be a much smaller image. I don’t know how much time is left for your project, and if this headlamp-k8s/plugin-management package could be done in time? it could include a cli with only the plugin management things in there. A copy of the headlamp-plugin with other stuff removed (no test, format, lint, etc). If you don’t have enough time to do the plugin-management package… Maybe call the container image headlamp-plugin-management, and just use headlamp-plugin package in there for now. This way the npm package used could be swapped out fairly easily later. Then it won’t matter too much that the image is larger for now. I hope I am being clear? —- I’m not sure if it’s worth considering moving most dependencies into devDependencies? Maybe it’s possible to move most there that are needed for testing/tsc/build/lint. Then it could be installed with npm ci (or omit dev) and commands like creat and the plugin management ones could be done. But then the container image could only be used for these commands. So after thinking this through, I think plugin-management should be its own package? |
Alright, understood, I'll be doing the above approach; however, I might probably come back to implement this plugin-management package later if time permits, or even post LFX next month. |
Signed-off-by: Faakhir30 <[email protected]>
Signed-off-by: Faakhir30 <[email protected]>
a619ba8
to
0997a78
Compare
…c updates - Introduced `pluginsManager` section in `values.yaml` for managing plugins via a sidecar container. - Added `watchPlugins` option to enable automatic updates of plugins in the main Headlamp container. This enhances the plugin management capabilities of Headlamp when deployed in-cluster.
0997a78
to
1e0cbeb
Compare
@illume I've implemented the above discussed approach, tested by publishing package temporarily on my account and building image of headlamp server locally.
Updated PR description, please let me know about the release of docker image and npm package mentioned in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉🎈 thanks
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Faakhir30, illume 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 |
@Faakhir30 There is now a The release is delayed because of some certificate signing issues. I don't have any clarity on when the container image will be released again. But I'll let you know when I do. |
Implemented headlamp-plugin sidecar container for plugin management.
--watch-plugins-changes
option to charts for the main headlamp container@kinvolk/headlamp-plugin
install and watch the config fileTesting
For docs, see https://github.com/kubernetes-sigs/headlamp/pull/2983/files#diff-6ba75da13a137e0dc291f25e5514187d41c825abf7cc74cee9e238cffbf7d539
I've tested by using my published npm package from my account https://www.npmjs.com/package/@faakhir/headlamp-plugin
and building the headlamp server image locally, and overriding it by
minikube image load ghcr.io/headlamp-k8s/headlamp:v0.30.0
.sample
plugin.yml
to try:NOTES:
v0.30.0
version of ghcr.io/headlamp-k8s/headlamp image does not include the--watch-plugins-changes
flag. So would require a release for that image.npm publish
?bin/headlamp-plugin.js install -c plugin.yml -w --folderName /home/f/w/oss/headlamp/plugins/headlamp-plugin/out