Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 375132bdc3 | |||
| 0b5ca61785 | |||
| 300c705033 | |||
| ea587c149f | |||
| 4468396e52 | |||
| ead81a51a9 | |||
| 8e0b95ed64 | |||
| e54caa7be4 |
@@ -37,7 +37,7 @@ jobs:
|
||||
- name: Update artifacthub-pkg.yml version and URL
|
||||
run: |
|
||||
VERSION="${{ inputs.version }}"
|
||||
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/headlamp-rook-ceph-plugin-${VERSION}.tar.gz"
|
||||
RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/headlamp-rook-plugin-${VERSION}.tar.gz"
|
||||
|
||||
sed -i "s|^version:.*|version: \"${VERSION}\"|" artifacthub-pkg.yml
|
||||
sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
- name: Validate tarball name
|
||||
run: |
|
||||
EXPECTED="headlamp-rook-ceph-plugin-${{ inputs.version }}.tar.gz"
|
||||
EXPECTED="headlamp-rook-plugin-${{ inputs.version }}.tar.gz"
|
||||
ACTUAL=$(ls *.tar.gz)
|
||||
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
||||
echo "::error::Tarball name mismatch! Expected: $EXPECTED, Got: $ACTUAL"
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
- name: Compute checksum
|
||||
id: compute_checksum
|
||||
run: |
|
||||
TARBALL="headlamp-rook-ceph-plugin-${{ inputs.version }}.tar.gz"
|
||||
TARBALL="headlamp-rook-plugin-${{ inputs.version }}.tar.gz"
|
||||
CHECKSUM=$(sha256sum "$TARBALL" | awk '{print $1}')
|
||||
echo "checksum=${CHECKSUM}" >> $GITHUB_OUTPUT
|
||||
echo "Checksum: sha256:${CHECKSUM}"
|
||||
@@ -95,7 +95,7 @@ jobs:
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: "v${{ inputs.version }}"
|
||||
files: headlamp-rook-ceph-plugin-${{ inputs.version }}.tar.gz
|
||||
files: headlamp-rook-plugin-${{ inputs.version }}.tar.gz
|
||||
fail_on_unmatched_files: true
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
+31
-3
@@ -1,12 +1,36 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to the Headlamp Rook-Ceph Plugin will be documented in this file.
|
||||
All notable changes to the Headlamp Rook Plugin will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.0] - 2026-02-19
|
||||
|
||||
### Changed
|
||||
|
||||
- **Rename** — plugin renamed from `headlamp-rook-ceph-plugin` to `headlamp-rook-plugin`
|
||||
|
||||
## [0.1.3] - 2026-02-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Protocol column** — renamed `Type` → `Protocol` with short values (`RBD`, `CephFS`) to match tns-csi column naming convention on shared native tables
|
||||
|
||||
## [0.1.2] - 2026-02-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Column naming** — renamed `Rook Type` → `Type` and `Cluster ID` → `Cluster` in StorageClass and PV column processors
|
||||
|
||||
## [0.1.1] - 2026-02-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- **StorageClass/PV column injection** — removed redundant `Rook Type` label prefix; standardized column headers across plugins
|
||||
|
||||
## [0.1.0] - 2026-02-18
|
||||
|
||||
### Added
|
||||
@@ -32,5 +56,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- TypeScript strict mode with zero `any` types
|
||||
- ESLint + Prettier code quality tooling
|
||||
|
||||
[Unreleased]: https://github.com/cpfarhood/headlamp-rook-ceph-plugin/compare/v0.1.0...HEAD
|
||||
[0.1.0]: https://github.com/cpfarhood/headlamp-rook-ceph-plugin/releases/tag/v0.1.0
|
||||
[Unreleased]: https://github.com/cpfarhood/headlamp-rook-plugin/compare/v0.2.0...HEAD
|
||||
[0.2.0]: https://github.com/cpfarhood/headlamp-rook-plugin/compare/v0.1.3...v0.2.0
|
||||
[0.1.3]: https://github.com/cpfarhood/headlamp-rook-plugin/compare/v0.1.2...v0.1.3
|
||||
[0.1.2]: https://github.com/cpfarhood/headlamp-rook-plugin/compare/v0.1.1...v0.1.2
|
||||
[0.1.1]: https://github.com/cpfarhood/headlamp-rook-plugin/compare/v0.1.0...v0.1.1
|
||||
[0.1.0]: https://github.com/cpfarhood/headlamp-rook-plugin/releases/tag/v0.1.0
|
||||
|
||||
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
Headlamp plugin for Rook-Ceph cluster visibility.
|
||||
|
||||
- **Plugin name**: `headlamp-rook-ceph-plugin`
|
||||
- **Plugin name**: `headlamp-rook-plugin`
|
||||
- **Rook-Ceph API group**: `ceph.rook.io/v1`
|
||||
- **Default namespace**: `rook-ceph`
|
||||
- **Reference plugin**: `../headlamp-tns-csi-plugin`
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ Contributions are welcome! Please open an issue before submitting large PRs.
|
||||
## Development Setup
|
||||
|
||||
```bash
|
||||
git clone https://github.com/cpfarhood/headlamp-rook-ceph-plugin.git
|
||||
cd headlamp-rook-ceph-plugin
|
||||
git clone https://github.com/cpfarhood/headlamp-rook-plugin.git
|
||||
cd headlamp-rook-plugin
|
||||
npm install
|
||||
npm start # hot-reload dev server
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Headlamp Rook-Ceph Plugin
|
||||
# Headlamp Rook Plugin
|
||||
|
||||
[](https://github.com/cpfarhood/headlamp-rook-ceph-plugin/actions/workflows/ci.yaml)
|
||||
[](https://github.com/cpfarhood/headlamp-rook-plugin/actions/workflows/ci.yaml)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
A [Headlamp](https://headlamp.dev/) plugin that surfaces [Rook-Ceph](https://rook.io/) cluster health, storage resources, and CSI driver status directly in the Headlamp UI.
|
||||
@@ -53,16 +53,16 @@ Download the latest release tarball and place it in your Headlamp plugins direct
|
||||
|
||||
```bash
|
||||
# Download the latest release
|
||||
curl -L https://github.com/cpfarhood/headlamp-rook-ceph-plugin/releases/latest/download/headlamp-rook-ceph-plugin-<version>.tar.gz \
|
||||
-o headlamp-rook-ceph-plugin.tar.gz
|
||||
curl -L https://github.com/cpfarhood/headlamp-rook-plugin/releases/latest/download/headlamp-rook-plugin-<version>.tar.gz \
|
||||
-o headlamp-rook-plugin.tar.gz
|
||||
|
||||
# Extract to Headlamp plugins directory
|
||||
tar -xzf headlamp-rook-ceph-plugin.tar.gz -C ~/.config/Headlamp/plugins/
|
||||
tar -xzf headlamp-rook-plugin.tar.gz -C ~/.config/Headlamp/plugins/
|
||||
```
|
||||
|
||||
### Option 2: Headlamp In-App Plugin Manager
|
||||
|
||||
Browse the Headlamp Plugin Manager (Settings → Plugins) and install **headlamp-rook-ceph-plugin** directly.
|
||||
Browse the Headlamp Plugin Manager (Settings → Plugins) and install **headlamp-rook-plugin** directly.
|
||||
|
||||
## RBAC & Security Setup
|
||||
|
||||
@@ -117,8 +117,8 @@ subjects:
|
||||
### Setup
|
||||
|
||||
```bash
|
||||
git clone https://github.com/cpfarhood/headlamp-rook-ceph-plugin.git
|
||||
cd headlamp-rook-ceph-plugin
|
||||
git clone https://github.com/cpfarhood/headlamp-rook-plugin.git
|
||||
cd headlamp-rook-plugin
|
||||
npm install
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report security vulnerabilities by opening a [GitHub Security Advisory](https://github.com/cpfarhood/headlamp-rook-ceph-plugin/security/advisories/new) rather than a public issue.
|
||||
Please report security vulnerabilities by opening a [GitHub Security Advisory](https://github.com/cpfarhood/headlamp-rook-plugin/security/advisories/new) rather than a public issue.
|
||||
|
||||
## Scope
|
||||
|
||||
|
||||
+7
-7
@@ -1,12 +1,12 @@
|
||||
version: "0.1.2"
|
||||
name: headlamp-rook-ceph-plugin
|
||||
displayName: Rook-Ceph Plugin
|
||||
version: "0.2.0"
|
||||
name: headlamp-rook-plugin
|
||||
displayName: Rook Plugin
|
||||
createdAt: "2026-02-18T00:00:00Z"
|
||||
description: Headlamp plugin for Rook-Ceph cluster visibility — CephCluster health, pool status, CSI driver monitoring, and native Headlamp StorageClass/PV integrations.
|
||||
logoPath: ""
|
||||
digest: ""
|
||||
license: Apache-2.0
|
||||
homeURL: https://github.com/privilegedescalation/headlamp-rook-ceph-plugin
|
||||
homeURL: https://github.com/privilegedescalation/headlamp-rook-plugin
|
||||
keywords:
|
||||
- rook
|
||||
- ceph
|
||||
@@ -16,14 +16,14 @@ keywords:
|
||||
- kubernetes
|
||||
links:
|
||||
- name: source
|
||||
url: https://github.com/privilegedescalation/headlamp-rook-ceph-plugin
|
||||
url: https://github.com/privilegedescalation/headlamp-rook-plugin
|
||||
maintainers:
|
||||
- name: privilegedescalation
|
||||
email: privilegedescalation@users.noreply.github.com
|
||||
provider:
|
||||
name: privilegedescalation
|
||||
annotations:
|
||||
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-rook-ceph-plugin/releases/download/v0.1.2/headlamp-rook-ceph-plugin-0.1.2.tar.gz"
|
||||
headlamp/plugin/archive-checksum: "sha256:c74aef8dd3e67b66bd20ce4845d324ee351b3bb560b43a4a5fff26f31b3d73e1"
|
||||
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-rook-plugin/releases/download/v0.2.0/headlamp-rook-plugin-0.2.0.tar.gz"
|
||||
headlamp/plugin/archive-checksum: "sha256:2ef2efd810a512c13914a9ce74af23f6ec8ab0937d30cac1593a42dce5e9fe17"
|
||||
headlamp/plugin/distro-compat: ""
|
||||
headlamp/plugin/version-compat: ">=0.20"
|
||||
|
||||
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "headlamp-rook-ceph-plugin",
|
||||
"name": "headlamp-rook-plugin",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "headlamp-rook-ceph-plugin",
|
||||
"name": "headlamp-rook-plugin",
|
||||
"version": "0.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
|
||||
+5
-5
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "headlamp-rook-ceph-plugin",
|
||||
"version": "0.1.2",
|
||||
"name": "headlamp-rook-plugin",
|
||||
"version": "0.2.0",
|
||||
"description": "Headlamp plugin for Rook-Ceph cluster visibility and CSI driver monitoring",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/privilegedescalation/headlamp-rook-ceph-plugin.git"
|
||||
"url": "https://github.com/privilegedescalation/headlamp-rook-plugin.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/privilegedescalation/headlamp-rook-ceph-plugin/issues"
|
||||
"url": "https://github.com/privilegedescalation/headlamp-rook-plugin/issues"
|
||||
},
|
||||
"homepage": "https://github.com/privilegedescalation/headlamp-rook-ceph-plugin#readme",
|
||||
"homepage": "https://github.com/privilegedescalation/headlamp-rook-plugin#readme",
|
||||
"author": "privilegedescalation",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
|
||||
@@ -4,10 +4,14 @@
|
||||
* Adds Rook-Ceph-specific columns to the native Headlamp StorageClass table
|
||||
* ('headlamp-storageclasses') and PV table ('headlamp-persistentvolumes').
|
||||
* Non-Rook-Ceph rows show '—'.
|
||||
*
|
||||
* Column names (Protocol, Pool) are intentionally shared with the tns-csi
|
||||
* column processor so both plugins contribute to the same logical columns
|
||||
* on a mixed-driver cluster.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { formatStorageType, isRookCephProvisioner } from '../../api/k8s';
|
||||
import { isRookCephProvisioner } from '../../api/k8s';
|
||||
|
||||
/** Safely read a nested field from either a KubeObject instance or plain object. */
|
||||
function getField(item: unknown, ...path: string[]): unknown {
|
||||
@@ -36,23 +40,26 @@ function isRookPvRow(item: unknown): boolean {
|
||||
return typeof driver === 'string' && isRookCephProvisioner(driver);
|
||||
}
|
||||
|
||||
function rookProtocol(s: string | undefined): string {
|
||||
if (!s) return '—';
|
||||
if (s.includes('.rbd.')) return 'RBD';
|
||||
if (s.includes('.cephfs.')) return 'CephFS';
|
||||
return '—';
|
||||
}
|
||||
|
||||
export function buildStorageClassColumns() {
|
||||
return [
|
||||
{
|
||||
label: 'Rook Type',
|
||||
label: 'Protocol',
|
||||
getValue: (item: unknown) => {
|
||||
if (!isRookRow(item)) return null;
|
||||
const provisioner = getField(item, 'provisioner') as string | undefined;
|
||||
if (!provisioner) return null;
|
||||
const type = provisioner.includes('.rbd.') ? 'rbd' : provisioner.includes('.cephfs.') ? 'cephfs' : 'unknown';
|
||||
return formatStorageType(type as 'rbd' | 'cephfs' | 'unknown');
|
||||
return rookProtocol(provisioner);
|
||||
},
|
||||
render: (item: unknown) => {
|
||||
if (!isRookRow(item)) return <span>—</span>;
|
||||
const provisioner = getField(item, 'provisioner') as string | undefined;
|
||||
if (!provisioner) return <span>—</span>;
|
||||
const type = provisioner.includes('.rbd.') ? 'rbd' : provisioner.includes('.cephfs.') ? 'cephfs' : 'unknown';
|
||||
return <span style={{ color: '#1976d2', fontWeight: 500 }}>{formatStorageType(type as 'rbd' | 'cephfs' | 'unknown')}</span>;
|
||||
return <span>{rookProtocol(provisioner)}</span>;
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -65,13 +72,12 @@ export function buildStorageClassColumns() {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Cluster ID',
|
||||
label: 'Cluster',
|
||||
getValue: (item: unknown) => getField(item, 'parameters', 'clusterID') as string | null ?? null,
|
||||
render: (item: unknown) => {
|
||||
if (!isRookRow(item)) return <span>—</span>;
|
||||
const clusterID = getField(item, 'parameters', 'clusterID') as string | undefined;
|
||||
if (!clusterID) return <span>—</span>;
|
||||
// Truncate long cluster IDs
|
||||
return <span title={clusterID}>{clusterID.length > 16 ? `${clusterID.slice(0, 16)}…` : clusterID}</span>;
|
||||
},
|
||||
},
|
||||
@@ -81,20 +87,16 @@ export function buildStorageClassColumns() {
|
||||
export function buildPVColumns() {
|
||||
return [
|
||||
{
|
||||
label: 'Rook Type',
|
||||
label: 'Protocol',
|
||||
getValue: (item: unknown) => {
|
||||
if (!isRookPvRow(item)) return null;
|
||||
const driver = getField(item, 'spec', 'csi', 'driver') as string | undefined;
|
||||
if (!driver) return null;
|
||||
const type = driver.includes('.rbd.') ? 'rbd' : driver.includes('.cephfs.') ? 'cephfs' : 'unknown';
|
||||
return formatStorageType(type as 'rbd' | 'cephfs' | 'unknown');
|
||||
return rookProtocol(driver);
|
||||
},
|
||||
render: (item: unknown) => {
|
||||
if (!isRookPvRow(item)) return <span>—</span>;
|
||||
const driver = getField(item, 'spec', 'csi', 'driver') as string | undefined;
|
||||
if (!driver) return <span>—</span>;
|
||||
const type = driver.includes('.rbd.') ? 'rbd' : driver.includes('.cephfs.') ? 'cephfs' : 'unknown';
|
||||
return <span style={{ color: '#1976d2', fontWeight: 500 }}>{formatStorageType(type as 'rbd' | 'cephfs' | 'unknown')}</span>;
|
||||
return <span>{rookProtocol(driver)}</span>;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* headlamp-rook-ceph-plugin — entry point.
|
||||
* headlamp-rook-plugin — entry point.
|
||||
*
|
||||
* Registers sidebar entries, routes, detail view sections, table column
|
||||
* processors, and app bar action for Rook-Ceph visibility in Headlamp.
|
||||
|
||||
Reference in New Issue
Block a user