-
Notifications
You must be signed in to change notification settings - Fork 34
Fix multiarch build #290
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
Fix multiarch build #290
Conversation
improves the Docker build process, GitHub Actions workflow, and plugin dependencies for the Headlamp Kubernetes plugins repository. Signed-off-by: Kirill <[email protected]>
d4f7d8f
to
8f40c05
Compare
Signed-off-by: Kirill <[email protected]>
c595182
to
d4b75d2
Compare
@illume Pls, review this PR |
Wow, thanks for all these improvements. Would you mind breaking the changes up into separate commits? With one separate topic per commit. I think the flux package.json version change can be removed from the PR. The release can come later. |
@illume , |
@@ -1,5 +1,7 @@ | |||
# Use the official Node.js 18 image as the base image for building the plugins | |||
FROM node:18@sha256:d0bbfdbad0bff8253e6159dcbee42141db4fc309365d5b8bcfce46ed71569078 AS builder | |||
ARG BASE_IMAGE_VERSION=18 |
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.
For security reasons we need the full image version with the hash.
# Use the official Node.js 18 image as the base image for building the plugins | ||
FROM node:18@sha256:d0bbfdbad0bff8253e6159dcbee42141db4fc309365d5b8bcfce46ed71569078 AS builder | ||
ARG BASE_IMAGE_VERSION=18 | ||
ARG FINAL_IMAGE_VERSION=3.20.3 |
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.
For security reasons we need the full image version with the hash.
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.
For security reasons we need the full image version with the hash.
Would you like to get the dependabot , which could watch updates and make a PR for the updated docker image versions?
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.
I thought we had it. I will check it out. But in the current code, we need to keep the hash.
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@headlamp-k8s/flux", | |||
"version": "0.2.0", |
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.
Can you remove the flux commits from this PR? I think this should be just about the image building.
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.
The commit title needs to summarize what this commit does. It does update the docs but it should instead indicate what this is about.
image: ghcr.io/headlamp-k8s/headlamp-plugin-flux:latest | ||
imagePullPolicy: Always | ||
name: headlamp-plugins | ||
securityContext: |
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.
Do we need to run this as root?
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.
Not sure, I guess no.
Thanks @kksudo . I think the image building changes for the GH action are nice. I left some comments though. |
Actually, I split this big PR to few small PRs. Should we close this one and use small PRs instead? |
Yeah, let's close this one now you have all the other ones :) |
Optimized Docker Builds, Workflow, and Plugin Updates
This PR improves the Docker build process, GitHub Actions workflow, and plugin dependencies for the Headlamp Kubernetes plugins repository.
Main Changes
flux
plugin dependencies to ensure stability.flux
plugin version influx/package.json
from0.2.0
to0.2.1
.Additional Improvements
.github/workflows/build-and-publish-image.yml
to support building multiple plugins in a single GitHub Actions run using a matrix strategy.ENVIRONMENT
is set toproduction
..dockerignore
: Excludednode_modules
,.git
, and test files to reduce Docker image size and improve build efficiency.BASE_IMAGE_VERSION
andFINAL_IMAGE_VERSION
arguments in theDockerfile
and fixed unsupported Node base image versions..gitignore
: Included a.gitignore
file to prevent unnecessary files from being tracked.https://github.com/kksudo/plugins/actions/runs/15802543339
issue links
Error: Cannot find module @rollup/rollup-linux-arm64-gnu
https://github.com/headlamp-k8s/plugins/actions/runs/14095869941/job/39482966413#step:9:287can't create plugins/flux directory
Flux: v0.2.0 can't create plugins/flux directory #214