Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a75152b2e4 | |||
| fd1d76c932 | |||
| dc981feaa4 | |||
| 77586a98eb | |||
| bfe95475c6 | |||
| f69dfd6356 | |||
| 3c5a837a9d | |||
| f4e4e24b6c | |||
| fef2c3c3e5 | |||
| 423282ec6c | |||
| 4ae7aa6a91 | |||
| c040181509 | |||
| e0037f60d2 | |||
| ce5c0da56e | |||
| bc59cd7a23 | |||
| aa9a0d38fe | |||
| 2c2ad720e5 | |||
| dc6dee9d4d | |||
| 5e93973fa7 | |||
| 93b5018f60 | |||
| 1b2a6046cd | |||
| ba5c296a13 | |||
| 2d92bce571 | |||
| 8fb4c18e8a |
@@ -0,0 +1,18 @@
|
|||||||
|
name: Dual Approval (CTO + QA)
|
||||||
|
|
||||||
|
# Calls the shared dual-approval-check workflow.
|
||||||
|
# Passes when both privilegedescalation-cto and privilegedescalation-qa
|
||||||
|
# have approved the PR. Add "Dual Approval (CTO + QA)" to required_status_checks
|
||||||
|
# in branch protection to enforce this gate.
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted, dismissed]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dual-approval:
|
||||||
|
uses: privilegedescalation/.github/.github/workflows/dual-approval-check.yaml@main
|
||||||
|
secrets: inherit
|
||||||
@@ -10,10 +10,14 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
uses: privilegedescalation/.github/.github/workflows/plugin-release.yaml@main
|
uses: privilegedescalation/.github/.github/workflows/plugin-release.yaml@main
|
||||||
|
secrets:
|
||||||
|
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
||||||
|
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
||||||
with:
|
with:
|
||||||
version: ${{ inputs.version }}
|
version: ${{ inputs.version }}
|
||||||
upstream-repo: fenio/tns-csi
|
upstream-repo: fenio/tns-csi
|
||||||
|
|||||||
+18
-1
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.0.0] - 2026-03-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- **Missing devDependencies** — added `@mui/material`, `@types/react`, `@types/react-dom`, and `notistack` to devDependencies so the full test suite resolves correctly; upgraded `vitest` to `^3.2.4`
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Test infrastructure fix** — added `define: { 'process.env.NODE_ENV': '"test"' }` to `vitest.config.mts` to prevent React production-build `act()` errors; all 159 component tests now pass
|
||||||
|
- **Version bump** — bumped package version from 0.2.7 to 1.0.0 (stable release)
|
||||||
|
- **Lock file** — removed `package-lock.json`; `pnpm-lock.yaml` is now the canonical lock file
|
||||||
|
- **Renovate config** — extended from org-level preset (PR #18)
|
||||||
|
- **GitHub Actions SHA pinning** — added `pinDigests` to Renovate config for SHA-pinned Actions (PR #17)
|
||||||
|
- **Dual-approval caller workflow** — added dual-approval status check workflow to CI (PR #16)
|
||||||
|
- **Release workflow** — GitHub App token secrets now passed to release workflow (PR #15)
|
||||||
|
|
||||||
## [0.2.6] - 2026-03-04
|
## [0.2.6] - 2026-03-04
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@@ -102,7 +118,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- TypeScript strict mode with zero `any` types
|
- TypeScript strict mode with zero `any` types
|
||||||
- ESLint + Prettier code quality tooling
|
- ESLint + Prettier code quality tooling
|
||||||
|
|
||||||
[Unreleased]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.6...HEAD
|
[Unreleased]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v1.0.0...HEAD
|
||||||
|
[1.0.0]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.7...v1.0.0
|
||||||
[0.2.6]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.5...v0.2.6
|
[0.2.6]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.5...v0.2.6
|
||||||
[0.2.4]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.3...v0.2.4
|
[0.2.4]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.3...v0.2.4
|
||||||
[0.2.3]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.2...v0.2.3
|
[0.2.3]: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/compare/v0.2.2...v0.2.3
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Installation Policy
|
||||||
|
|
||||||
|
## Approved Installation Method
|
||||||
|
|
||||||
|
**The ONLY approved method for installing this plugin is via [Artifact Hub](https://artifacthub.io/) using the Headlamp plugin installer.**
|
||||||
|
|
||||||
|
No other installation method is acceptable. This includes but is not limited to:
|
||||||
|
|
||||||
|
- Direct installation from GitHub release assets
|
||||||
|
- Manual npm pack / tarball extraction
|
||||||
|
- initContainer workarounds that bypass Artifact Hub
|
||||||
|
- Direct file copy or sidecar injection
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
All deployment configurations, CI/CD pipelines, and documentation MUST reference Artifact Hub as the sole plugin distribution channel. Any pull request that introduces an alternative installation method will be rejected.
|
||||||
|
|
||||||
|
## Rationale
|
||||||
|
|
||||||
|
Artifact Hub provides verified checksums, consistent versioning, and a standard discovery mechanism for the CNCF ecosystem. Bypassing it introduces security and integrity risks.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*This policy is set by the CTO and approved by the CEO of Privileged Escalation.*
|
||||||
@@ -47,9 +47,14 @@ The tns-csi driver must be deployed in `kube-system` with the standard `app.kube
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
### Option 1: Headlamp Plugin Manager (Recommended)
|
The plugin is published on [Artifact Hub](https://artifacthub.io/packages/headlamp/tns-csi/headlamp-tns-csi-plugin). Install via the Headlamp UI:
|
||||||
|
|
||||||
The plugin is published on [Artifact Hub](https://artifacthub.io/packages/headlamp/tns-csi/headlamp-tns-csi-plugin). Configure Headlamp via Helm:
|
1. Go to **Settings → Plugins**
|
||||||
|
2. Click **Catalog** tab
|
||||||
|
3. Search for "TNS CSI" or "TrueNAS"
|
||||||
|
4. Click **Install**
|
||||||
|
|
||||||
|
Or configure Headlamp via Helm:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
config:
|
config:
|
||||||
@@ -61,32 +66,6 @@ pluginsManager:
|
|||||||
url: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.4/tns-csi-0.2.4.tar.gz
|
url: https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.4/tns-csi-0.2.4.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
Or install via the Headlamp UI:
|
|
||||||
|
|
||||||
1. Go to **Settings → Plugins**
|
|
||||||
2. Click **Catalog** tab
|
|
||||||
3. Search for "TNS CSI" or "TrueNAS"
|
|
||||||
4. Click **Install**
|
|
||||||
|
|
||||||
### Option 2: Manual Tarball Install
|
|
||||||
|
|
||||||
Download the `.tar.gz` from the [GitHub releases page](https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases), then extract into Headlamp's plugin directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
wget https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.4/tns-csi-0.2.4.tar.gz
|
|
||||||
tar xzf tns-csi-0.2.4.tar.gz -C /headlamp/plugins/
|
|
||||||
```
|
|
||||||
|
|
||||||
### Option 3: Build from Source
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/privilegedescalation/headlamp-tns-csi-plugin.git
|
|
||||||
cd headlamp-tns-csi-plugin
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
npx @kinvolk/headlamp-plugin extract . /headlamp/plugins
|
|
||||||
```
|
|
||||||
|
|
||||||
## RBAC / Security Setup
|
## RBAC / Security Setup
|
||||||
|
|
||||||
The plugin reads from the Kubernetes API and the tns-csi controller pod's Prometheus endpoint. The Benchmark page additionally creates and deletes Jobs and PVCs.
|
The plugin reads from the Kubernetes API and the tns-csi controller pod's Prometheus endpoint. The Benchmark page additionally creates and deletes Jobs and PVCs.
|
||||||
|
|||||||
+13
-13
@@ -1,4 +1,4 @@
|
|||||||
version: "0.2.6"
|
version: "1.0.0"
|
||||||
name: headlamp-tns-csi-plugin
|
name: headlamp-tns-csi-plugin
|
||||||
displayName: TrueNAS CSI (tns-csi)
|
displayName: TrueNAS CSI (tns-csi)
|
||||||
description: >-
|
description: >-
|
||||||
@@ -13,7 +13,7 @@ license: Apache-2.0
|
|||||||
category: storage
|
category: storage
|
||||||
|
|
||||||
homeURL: https://github.com/privilegedescalation/headlamp-tns-csi-plugin
|
homeURL: https://github.com/privilegedescalation/headlamp-tns-csi-plugin
|
||||||
appVersion: "0.17.0"
|
appVersion: "0.17.4"
|
||||||
|
|
||||||
keywords:
|
keywords:
|
||||||
- headlamp
|
- headlamp
|
||||||
@@ -48,22 +48,22 @@ links:
|
|||||||
|
|
||||||
changes:
|
changes:
|
||||||
- kind: added
|
- kind: added
|
||||||
description: "Component tests for all 8 UI components"
|
description: "Stable v1.0.0 release marking production readiness"
|
||||||
|
- kind: added
|
||||||
|
description: "Missing devDependencies for test infrastructure (@mui/material, @types/react, @types/react-dom, notistack, vitest upgraded to ^3.2.4)"
|
||||||
- kind: changed
|
- kind: changed
|
||||||
description: "CI workflow split into parallel lint, typecheck, test jobs with build gating on all three"
|
description: "vitest.config.mts: added define block to set process.env.NODE_ENV=test, fixing act() errors in all component tests"
|
||||||
- kind: changed
|
- kind: changed
|
||||||
description: "JUnit test reporter for PR test result visibility"
|
description: "Renovate config extended from org-level preset"
|
||||||
- kind: changed
|
- kind: changed
|
||||||
description: "Node.js 20 upgraded to 22 (current LTS) in all workflows"
|
description: "GitHub Actions SHA pinning via pinDigests in Renovate"
|
||||||
- kind: changed
|
- kind: changed
|
||||||
description: "Release workflow gated on CI passing with concurrency protection"
|
description: "Dual-approval caller workflow added to CI"
|
||||||
- kind: fixed
|
- kind: changed
|
||||||
description: "Conditional React hook call in OverviewPage"
|
description: "GitHub App token secrets passed to release workflow"
|
||||||
- kind: fixed
|
|
||||||
description: "appVersion now tracks upstream tns-csi driver release (0.12.0)"
|
|
||||||
|
|
||||||
annotations:
|
annotations:
|
||||||
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.6/tns-csi-0.2.6.tar.gz"
|
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v1.0.0/tns-csi-1.0.0.tar.gz"
|
||||||
headlamp/plugin/archive-checksum: sha256:c7ab23e88c7182df06c4b15e59be055d9dfc85159266986ae9d79d186b62aa3c
|
headlamp/plugin/archive-checksum: sha256:e38846ceb17a79438f8aecc50f22920b0efa7456f3ebb3e628d89856af83ad01
|
||||||
headlamp/plugin/version-compat: ">=0.20.0"
|
headlamp/plugin/version-compat: ">=0.20.0"
|
||||||
headlamp/plugin/distro-compat: "in-cluster,web,app"
|
headlamp/plugin/distro-compat: "in-cluster,web,app"
|
||||||
|
|||||||
Generated
-18188
File diff suppressed because it is too large
Load Diff
+26
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tns-csi",
|
"name": "tns-csi",
|
||||||
"version": "0.2.6",
|
"version": "1.0.0",
|
||||||
"description": "Headlamp plugin for TNS-CSI driver visibility and benchmarking",
|
"description": "Headlamp plugin for TNS-CSI driver visibility and benchmarking",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -24,7 +24,31 @@
|
|||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest"
|
"test:watch": "vitest"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^18.0.0",
|
||||||
|
"react-dom": "^18.0.0"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@kinvolk/headlamp-plugin": "^0.13.0"
|
"@headlamp-k8s/eslint-config": "^0.6.0",
|
||||||
|
"@kinvolk/headlamp-plugin": "^0.13.0",
|
||||||
|
"@mui/material": "^5.15.14",
|
||||||
|
"@testing-library/jest-dom": "^6.4.8",
|
||||||
|
"@testing-library/react": "^16.0.0",
|
||||||
|
"@testing-library/user-event": "^14.5.2",
|
||||||
|
"@types/react": "^18.0.0",
|
||||||
|
"@types/react-dom": "^18.0.0",
|
||||||
|
"eslint": "^8.57.0",
|
||||||
|
"jsdom": "^24.0.0",
|
||||||
|
"notistack": "^3.0.0",
|
||||||
|
"prettier": "^2.8.8",
|
||||||
|
"react": "^18.3.1",
|
||||||
|
"react-dom": "^18.3.1",
|
||||||
|
"react-router-dom": "^5.3.0",
|
||||||
|
"typescript": "~5.6.2",
|
||||||
|
"vitest": "^3.2.4"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"tar": "^7.5.11",
|
||||||
|
"undici": "^7.24.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+11907
File diff suppressed because it is too large
Load Diff
+2
-16
@@ -1,19 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": ["config:recommended"],
|
"extends": ["github>privilegedescalation/.github:renovate-config"]
|
||||||
"baseBranches": ["main"],
|
|
||||||
"schedule": ["every weekend"],
|
|
||||||
"prConcurrentLimit": 10,
|
|
||||||
"packageRules": [
|
|
||||||
{
|
|
||||||
"matchManagers": ["npm"],
|
|
||||||
"matchUpdateTypes": ["minor", "patch"],
|
|
||||||
"groupName": "npm minor and patch"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matchManagers": ["github-actions"],
|
|
||||||
"matchUpdateTypes": ["minor", "patch"],
|
|
||||||
"groupName": "github-actions minor and patch"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"extends": "@kinvolk/headlamp-plugin/config/plugins-tsconfig.json",
|
"extends": "@kinvolk/headlamp-plugin/config/plugins-tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"types": ["vite/client", "vite-plugin-svgr/client", "vitest/globals", "@testing-library/jest-dom"]
|
"types": ["vitest/globals", "@testing-library/jest-dom"]
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { defineConfig } from 'vitest/config';
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
define: {
|
||||||
|
'process.env.NODE_ENV': '"test"',
|
||||||
|
},
|
||||||
test: {
|
test: {
|
||||||
globals: true,
|
globals: true,
|
||||||
environment: 'jsdom',
|
environment: 'jsdom',
|
||||||
|
|||||||
Reference in New Issue
Block a user