Compare commits

..

11 Commits

Author SHA1 Message Date
github-actions[bot] 7828f02b97 chore: release v0.2.7 2026-02-12 23:16:46 +00:00
github-actions[bot] d819ede977 chore: release v0.2.7 2026-02-12 23:15:07 +00:00
Chris Farhood 73cb990ea0 fix: sort imports for linter 2026-02-12 18:13:19 -05:00
Chris Farhood 567551747c chore: bump version to 0.2.7 2026-02-12 18:11:15 -05:00
Chris Farhood a22c2ca41b chore: bump version to 0.2.6 2026-02-12 18:10:45 -05:00
Chris Farhood 873ec033fe fix: use official Headlamp API instead of internal paths
The plugin was importing from internal Headlamp paths like
'@kinvolk/headlamp-plugin/lib/lib/k8s/cluster' instead of using the
official public API '@kinvolk/headlamp-plugin/lib'.

This caused the plugin to fail loading in the browser with:
"TypeError: undefined is not an object (evaluating 'Ot.KubeObject')"

Changes:
- Updated imports to use K8s.cluster and ApiProxy from main export
- Added vite.config.js with custom globals (now obsolete with this fix)
- Moved node-forge to dependencies for proper bundling

The plugin now uses only the official documented Headlamp plugin API.

Fixes: #[issue number if exists]

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 18:10:45 -05:00
Chris Farhood 37391cd92a fix: move node-forge to devDependencies for proper bundling
Moving node-forge from dependencies to devDependencies ensures it gets
bundled into the plugin instead of being externalized. This is required
because Headlamp doesn't provide node-forge as a shared library.

The .pluginrc file with empty externals forces bundling of all deps,
and keeping node-forge in devDependencies makes this behavior explicit.

This fixes the frontend loading error:
"TypeError: undefined is not an object (evaluating 'Ot.KubeObject')"

Changes:
- Moved node-forge from dependencies to devDependencies
- Updated package-lock.json to mark node-forge as dev dependency
- .pluginrc remains in place to enforce bundling

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 18:10:45 -05:00
github-actions[bot] 9802448e82 chore: release v0.2.6 2026-02-12 21:01:54 +00:00
Chris Farhood 69ed7ae3e8 fix: bundle node-forge to prevent frontend loading error
The Headlamp plugin build system was externalizing node-forge because it
was in dependencies. Since Headlamp doesn't provide node-forge as a shared
library, the plugin would fail to load in the browser.

Solution: Add .pluginrc with empty externals to force bundling all dependencies.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 15:58:38 -05:00
Chris Farhood 9ee113e583 ci: consolidate release workflow into single step
Merged prepare-release and release workflows into a single workflow
that handles everything in one job. This eliminates the need for
separate tokens or manual intervention.

Single workflow now:
- Validates version format
- Updates package.json and artifacthub-pkg.yml
- Builds and packages plugin (with type check and linting)
- Computes checksum
- Verifies tarball contents
- Updates metadata with real checksum
- Commits all changes to main
- Creates and pushes tag
- Creates GitHub release with tarball

No more tag push triggers, no separate tokens needed.
Everything runs in one workflow_dispatch job.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 15:23:15 -05:00
github-actions[bot] de67b4dd1a ci: update checksum for v0.2.5 2026-02-12 20:12:14 +00:00
10 changed files with 110 additions and 137 deletions
-69
View File
@@ -1,69 +0,0 @@
name: Prepare Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (without v prefix, e.g., 0.2.5)'
required: true
type: string
jobs:
prepare:
runs-on: local-ubuntu-latest
permissions:
contents: write
steps:
- name: Validate version format
run: |
if ! echo "${{ inputs.version }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "::error::Version must be in format X.Y.Z (e.g., 0.2.5)"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update package.json version
working-directory: ./headlamp-sealed-secrets
run: |
jq --arg version "${{ inputs.version }}" '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json
- name: Update artifacthub-pkg.yml version
run: |
VERSION="${{ inputs.version }}"
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/headlamp-sealed-secrets-${VERSION}.tar.gz"
sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml
sed -i "s|^appVersion:.*|appVersion: ${VERSION}|" artifacthub-pkg.yml
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml
# Set placeholder checksum - will be updated after release
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:PLACEHOLDER_WILL_BE_UPDATED_AFTER_RELEASE|" artifacthub-pkg.yml
- name: Commit version bump
run: |
git add headlamp-sealed-secrets/package.json artifacthub-pkg.yml
git commit -m "chore: bump version to ${{ inputs.version }}"
git push origin main
- name: Create and push tag
run: |
git tag "v${{ inputs.version }}"
git push origin "v${{ inputs.version }}"
- name: Summary
run: |
echo "✓ Version bumped to ${{ inputs.version }}"
echo "✓ Tag v${{ inputs.version }} created"
echo ""
echo "The release workflow will now run automatically."
echo "After it completes, the checksum will be updated on main."
+64 -57
View File
@@ -1,28 +1,48 @@
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to release (without v prefix, e.g., 0.2.5)'
required: true
type: string
jobs:
build-and-release:
release:
runs-on: local-ubuntu-latest
permissions:
contents: write
outputs:
version: ${{ steps.extract_version.outputs.version }}
checksum: ${{ steps.compute_checksum.outputs.checksum }}
steps:
- name: Validate version format
run: |
if ! echo "${{ inputs.version }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "::error::Version must be in format X.Y.Z (e.g., 0.2.5)"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from tag
id: extract_version
- name: Configure git
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Version: ${VERSION}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update package.json version
working-directory: ./headlamp-sealed-secrets
run: |
jq --arg version "${{ inputs.version }}" '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json
- name: Update artifacthub-pkg.yml version
run: |
VERSION="${{ inputs.version }}"
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/headlamp-sealed-secrets-${VERSION}.tar.gz"
sed -i "s|^version:.*|version: ${VERSION}|" artifacthub-pkg.yml
sed -i "s|^appVersion:.*|appVersion: ${VERSION}|" artifacthub-pkg.yml
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -54,8 +74,7 @@ jobs:
- name: Move tarball to root
working-directory: ./headlamp-sealed-secrets
run: |
# Get the specific tarball created by package command
TARBALL="headlamp-sealed-secrets-${{ steps.extract_version.outputs.version }}.tar.gz"
TARBALL="headlamp-sealed-secrets-${{ inputs.version }}.tar.gz"
if [ ! -f "${TARBALL}" ]; then
echo "::error::Expected tarball ${TARBALL} not found"
ls -la *.tar.gz
@@ -66,7 +85,7 @@ jobs:
- name: Validate tarball name
run: |
EXPECTED="headlamp-sealed-secrets-${{ steps.extract_version.outputs.version }}.tar.gz"
EXPECTED="headlamp-sealed-secrets-${{ inputs.version }}.tar.gz"
ACTUAL=$(ls *.tar.gz)
if [ "$EXPECTED" != "$ACTUAL" ]; then
echo "::error::Tarball name mismatch! Expected: $EXPECTED, Got: $ACTUAL"
@@ -77,14 +96,14 @@ jobs:
- name: Compute checksum
id: compute_checksum
run: |
TARBALL="headlamp-sealed-secrets-${{ steps.extract_version.outputs.version }}.tar.gz"
TARBALL="headlamp-sealed-secrets-${{ inputs.version }}.tar.gz"
CHECKSUM=$(sha256sum "$TARBALL" | awk '{print $1}')
echo "checksum=${CHECKSUM}" >> $GITHUB_OUTPUT
echo "Checksum: sha256:${CHECKSUM}"
- name: Verify tarball contents
run: |
TARBALL="headlamp-sealed-secrets-${{ steps.extract_version.outputs.version }}.tar.gz"
TARBALL="headlamp-sealed-secrets-${{ inputs.version }}.tar.gz"
echo "Tarball contents:"
tar -tzf "${TARBALL}" | head -20
@@ -95,10 +114,27 @@ jobs:
fi
echo "✓ Tarball contents validated"
- name: Update checksum in metadata
run: |
CHECKSUM="${{ steps.compute_checksum.outputs.checksum }}"
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
- name: Commit version bump and metadata
run: |
git add headlamp-sealed-secrets/package.json artifacthub-pkg.yml
git commit -m "chore: release v${{ inputs.version }}"
git push origin main
- name: Create and push tag
run: |
git tag "v${{ inputs.version }}"
git push origin "v${{ inputs.version }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: headlamp-sealed-secrets-${{ steps.extract_version.outputs.version }}.tar.gz
tag_name: "v${{ inputs.version }}"
files: headlamp-sealed-secrets-${{ inputs.version }}.tar.gz
fail_on_unmatched_files: true
draft: false
prerelease: false
@@ -106,47 +142,18 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-metadata:
needs: build-and-release
runs-on: local-ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update checksum in metadata
run: |
VERSION="${{ needs.build-and-release.outputs.version }}"
CHECKSUM="${{ needs.build-and-release.outputs.checksum }}"
sed -i "s|headlamp/plugin/archive-checksum:.*|headlamp/plugin/archive-checksum: sha256:${CHECKSUM}|" artifacthub-pkg.yml
git add artifacthub-pkg.yml
if ! git diff --cached --quiet; then
git commit -m "ci: update checksum for v${VERSION}"
git push origin main
echo "✓ Checksum updated on main branch"
else
echo "✓ Checksum already up to date"
fi
- name: Release Summary
- name: Summary
run: |
echo "Release Summary:"
echo "=================="
echo "Version: v${{ needs.build-and-release.outputs.version }}"
echo "Tarball: headlamp-sealed-secrets-${{ needs.build-and-release.outputs.version }}.tar.gz"
echo "Checksum: sha256:${{ needs.build-and-release.outputs.checksum }}"
echo "Archive URL: https://github.com/${{ github.repository }}/releases/download/v${{ needs.build-and-release.outputs.version }}/headlamp-sealed-secrets-${{ needs.build-and-release.outputs.version }}.tar.gz"
echo "Version: v${{ inputs.version }}"
echo "Tarball: headlamp-sealed-secrets-${{ inputs.version }}.tar.gz"
echo "Checksum: sha256:${{ steps.compute_checksum.outputs.checksum }}"
echo "Archive URL: https://github.com/${{ github.repository }}/releases/download/v${{ inputs.version }}/headlamp-sealed-secrets-${{ inputs.version }}.tar.gz"
echo ""
echo "✓ Version bumped to ${{ inputs.version }}"
echo "✓ Metadata updated with checksum"
echo "✓ Tag v${{ inputs.version }} created"
echo "✓ GitHub release published with tarball"
echo ""
echo "Metadata updated on main branch."
echo "Artifact Hub will sync within 5-10 minutes."
+4 -4
View File
@@ -1,13 +1,13 @@
# Artifact Hub package metadata file
# https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml
version: 0.2.5
version: 0.2.7
name: headlamp-sealed-secrets
displayName: Sealed Secrets Plugin for Headlamp
createdAt: "2026-02-12T00:00:00Z"
description: A comprehensive Headlamp plugin for managing Bitnami Sealed Secrets with client-side encryption and RBAC-aware UI
license: Apache-2.0
homeURL: https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin
appVersion: 0.2.5
appVersion: 0.2.7
containersImages:
- name: sealed-secrets-controller
image: docker.io/bitnami/sealed-secrets-controller:v0.24.0
@@ -19,8 +19,8 @@ keywords:
- encryption
- security
annotations:
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin/releases/download/v0.2.5/headlamp-sealed-secrets-0.2.5.tar.gz"
headlamp/plugin/archive-checksum: sha256:PLACEHOLDER_WILL_BE_UPDATED_AFTER_RELEASE
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin/releases/download/v0.2.7/headlamp-sealed-secrets-0.2.7.tar.gz"
headlamp/plugin/archive-checksum: sha256:b2ca7d70e22839178fe46f3618abe6fc6b9dc9b51b9c52a6faa4759d4f756152
headlamp/plugin/version-compat: ">=0.13.0"
headlamp/plugin/distro-compat: "desktop,in-cluster,web,docker-desktop"
links:
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
{
"externals": {}
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "headlamp-sealed-secrets",
"version": "0.2.2",
"version": "0.2.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "headlamp-sealed-secrets",
"version": "0.2.2",
"version": "0.2.7",
"license": "Apache-2.0",
"dependencies": {
"node-forge": "^1.3.1"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "headlamp-sealed-secrets",
"version": "0.2.5",
"version": "0.2.7",
"description": "Headlamp plugin for Bitnami Sealed Secrets - manage encrypted Kubernetes secrets",
"files": [
"dist",
@@ -2,8 +2,10 @@
* SealedSecret Custom Resource Definition
*/
import { apiFactoryWithNamespace } from '@kinvolk/headlamp-plugin/lib/lib/k8s/apiProxy';
import { KubeObject } from '@kinvolk/headlamp-plugin/lib/lib/k8s/cluster';
import { ApiProxy,K8s } from '@kinvolk/headlamp-plugin/lib';
const { apiFactoryWithNamespace } = ApiProxy;
const { KubeObject } = K8s.cluster;
import { AsyncResult, Err, Ok, tryCatchAsync } from '../types';
import {
SealedSecretInterface,
+3 -1
View File
@@ -2,7 +2,9 @@
* TypeScript interfaces for Bitnami Sealed Secrets plugin
*/
import { KubeObjectInterface } from '@kinvolk/headlamp-plugin/lib/lib/k8s/cluster';
import { K8s } from '@kinvolk/headlamp-plugin/lib';
type KubeObjectInterface = K8s.cluster.KubeObjectInterface;
/**
* Result type for operations that can fail
+28
View File
@@ -0,0 +1,28 @@
import { defineConfig, mergeConfig } from 'vite';
import baseConfig from '@kinvolk/headlamp-plugin/config/vite.config.mjs';
// Override the base config to add missing externals
export default mergeConfig(baseConfig, defineConfig({
build: {
rollupOptions: {
output: {
globals: (request) => {
// Add the missing /lib/lib/k8s/* mappings
if (request === '@kinvolk/headlamp-plugin/lib/lib/k8s/cluster') {
return 'pluginLib.libk8scluster';
}
if (request === '@kinvolk/headlamp-plugin/lib/lib/k8s/apiProxy') {
return 'pluginLib.libk8sapiProxy';
}
// Use base config's globals function for everything else
if (typeof baseConfig.build.rollupOptions.output.globals === 'function') {
return baseConfig.build.rollupOptions.output.globals(request);
}
return request;
},
},
},
},
}));