Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f743c4ecd0 | |||
| 629ab1050e | |||
| be5d86bc8e | |||
| 1daa5095ab | |||
| 9a944560f5 | |||
| 433e0d7870 | |||
| e09e887390 | |||
| fc7198b045 | |||
| b0110e474c | |||
| 2e2713fd3f | |||
| be254b1eec | |||
| 90efdf5569 | |||
| 4ba90fa218 | |||
| a089a2cc2d | |||
| bb283d8923 | |||
| 0af2f24a27 | |||
| 409efe84d5 | |||
| a5032b23d1 | |||
| c241b8d9d5 | |||
| 7ae5efda73 | |||
| fd1d76c932 | |||
| dc981feaa4 | |||
| 77586a98eb | |||
| bfe95475c6 | |||
| f69dfd6356 | |||
| 3c5a837a9d | |||
| f4e4e24b6c | |||
| fef2c3c3e5 | |||
| 423282ec6c | |||
| 4ae7aa6a91 | |||
| c040181509 | |||
| e0037f60d2 | |||
| ce5c0da56e | |||
| bc59cd7a23 | |||
| aa9a0d38fe | |||
| 2c2ad720e5 | |||
| dc6dee9d4d | |||
| 5e93973fa7 | |||
| 93b5018f60 | |||
| 1b2a6046cd | |||
| ba5c296a13 | |||
| 2d92bce571 | |||
| 8fb4c18e8a |
@@ -2,9 +2,9 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main, dev, uat]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main, dev, uat]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
name: Promotion Gate
|
||||||
|
|
||||||
|
# Calls the shared promotion gate workflow.
|
||||||
|
# dev PRs: no gate (engineer self-merges).
|
||||||
|
# uat PRs: QA approval required.
|
||||||
|
# main PRs: UAT approval required (uat→main promotions).
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted, dismissed]
|
||||||
|
pull_request:
|
||||||
|
branches: [uat, main]
|
||||||
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
promotion-gate:
|
||||||
|
uses: privilegedescalation/.github/.github/workflows/dual-approval-check.yaml@main
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
pr_number: ${{ github.event.pull_request.number }}
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"config": {
|
||||||
|
// Line length — not enforced for docs with code examples
|
||||||
|
"MD013": false,
|
||||||
|
// First line heading — files use YAML frontmatter, not headings
|
||||||
|
"MD041": false,
|
||||||
|
// Emphasis as heading — common pattern for Option 1/2/3 sections
|
||||||
|
"MD036": false,
|
||||||
|
// No duplicate heading — changelog files repeat section names intentionally
|
||||||
|
"MD024": false,
|
||||||
|
// Fenced code language — not always applicable for diagram blocks
|
||||||
|
"MD040": false,
|
||||||
|
// Table column style — table alignment is visual, not semantic
|
||||||
|
"MD060": false,
|
||||||
|
// Ordered list item prefix — number resets are intentional in documents
|
||||||
|
"MD029": false,
|
||||||
|
// No inline HTML — each elements are valid in valid Markdown
|
||||||
|
"MD033": false,
|
||||||
|
// List marker space — spacing after list markers varies by editor
|
||||||
|
"MD030": false,
|
||||||
|
// Blanks around headings — not always needed in compact docs
|
||||||
|
"MD022": false,
|
||||||
|
// Blanks around lists — not always needed in compact docs
|
||||||
|
"MD032": false,
|
||||||
|
// Blanks around fences — not always needed between adjacent blocks
|
||||||
|
"MD031": false,
|
||||||
|
// Multiple blanks — editor artifacts, not semantic
|
||||||
|
"MD012": false,
|
||||||
|
// Single title — files may have multiple H1 sections
|
||||||
|
"MD025": false,
|
||||||
|
// Trailing spaces — editor artifacts
|
||||||
|
"MD009": false,
|
||||||
|
// Bare URLs — URL shortening not always needed
|
||||||
|
"MD034": false,
|
||||||
|
// Single trailing newline — editor artifacts
|
||||||
|
"MD047": false,
|
||||||
|
// Trailing punctuation — heading punctuation is intentional
|
||||||
|
"MD026": false,
|
||||||
|
// Space in emphasis — double-asterisk bold spacing varies by renderer
|
||||||
|
"MD037": false,
|
||||||
|
// No hard tabs — some generated docs use tabs for indentation
|
||||||
|
"MD010": false,
|
||||||
|
// Code block style — generated docs may use inconsistent styles
|
||||||
|
"MD046": false,
|
||||||
|
// Comment style — generated docs have no comments
|
||||||
|
"MD048": false,
|
||||||
|
// Commands show output — shell examples intentionally show only commands
|
||||||
|
"MD014": false
|
||||||
|
},
|
||||||
|
"ignores": [
|
||||||
|
"docs/api-reference/generated/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
docs/api-reference/generated/**
|
||||||
+22
-1
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **docs: namespace references** — Updated all documentation, README, and ArtifactHub metadata to explicitly reference the `headlamp` namespace instead of generic "controller pod" language. RBAC examples now clearly scope `pods/proxy` access to `kube-system` where the tns-csi controller runs.
|
||||||
|
|
||||||
|
## [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 +122,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:
|
||||||
@@ -58,38 +63,12 @@ config:
|
|||||||
pluginsManager:
|
pluginsManager:
|
||||||
sources:
|
sources:
|
||||||
- name: tns-csi
|
- name: tns-csi
|
||||||
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/v1.0.0/tns-csi-1.0.0.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 (deployed in `kube-system`). The Benchmark page additionally creates and deletes Jobs and PVCs.
|
||||||
|
|
||||||
### Minimal read-only permissions
|
### Minimal read-only permissions
|
||||||
|
|
||||||
@@ -111,6 +90,10 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/log"]
|
resources: ["pods/log"]
|
||||||
verbs: ["get"]
|
verbs: ["get"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/proxy"]
|
||||||
|
verbs: ["get"]
|
||||||
|
resourceNames: ["pods"]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Additional permissions for Benchmark page
|
### Additional permissions for Benchmark page
|
||||||
@@ -126,13 +109,13 @@ rules:
|
|||||||
|
|
||||||
### Metrics access
|
### Metrics access
|
||||||
|
|
||||||
The plugin fetches Prometheus metrics from the tns-csi controller pod via the Kubernetes pod proxy sub-resource. Grant `get` on `pods/proxy` in `kube-system`:
|
The plugin fetches Prometheus metrics from the tns-csi controller pod via the Kubernetes pod proxy sub-resource in `kube-system`. Grant `get` on `pods/proxy` scoped to `kube-system`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["pods/proxy"]
|
resources: ["pods/proxy"]
|
||||||
verbs: ["get"]
|
verbs: ["get"]
|
||||||
# Optionally scope to the controller pod namespace
|
# Scope to kube-system where the tns-csi controller runs
|
||||||
```
|
```
|
||||||
|
|
||||||
Apply the role and bind it to your Headlamp service account with a ClusterRoleBinding.
|
Apply the role and bind it to your Headlamp service account with a ClusterRoleBinding.
|
||||||
|
|||||||
+4
-4
@@ -91,7 +91,7 @@ metadata:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system # adjust to your Headlamp namespace
|
namespace: <your-namespace>
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: headlamp-tns-csi-reader
|
name: headlamp-tns-csi-reader
|
||||||
@@ -143,7 +143,7 @@ The Kubernetes API server performs the pod proxy hop, so policies should permit
|
|||||||
|
|
||||||
### Service Account (Default)
|
### Service Account (Default)
|
||||||
|
|
||||||
Headlamp runs with a dedicated service account (`headlamp` in `kube-system`). All users share the same RBAC permissions.
|
Headlamp runs with a dedicated service account (`headlamp` in the namespace where Headlamp is installed). All users share the same RBAC permissions.
|
||||||
|
|
||||||
**Security Considerations:**
|
**Security Considerations:**
|
||||||
- All users have identical access to plugin functionality including Benchmark
|
- All users have identical access to plugin functionality including Benchmark
|
||||||
@@ -187,7 +187,7 @@ Report security vulnerabilities via:
|
|||||||
|
|
||||||
The project uses:
|
The project uses:
|
||||||
- **npm audit**: Runs automatically during `npm install`
|
- **npm audit**: Runs automatically during `npm install`
|
||||||
- **GitHub Dependabot**: Monitors dependencies and creates PRs for updates
|
- **Renovate**: Automated dependency updates via Mend Renovate (org-wide configured)
|
||||||
|
|
||||||
Headlamp itself (`@kinvolk/headlamp-plugin`) is a peer dependency. Security updates to Headlamp should be applied by upgrading your Headlamp installation.
|
Headlamp itself (`@kinvolk/headlamp-plugin`) is a peer dependency. Security updates to Headlamp should be applied by upgrading your Headlamp installation.
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ All API requests are logged in Kubernetes API audit logs (if enabled). Pod proxy
|
|||||||
"verb": "get",
|
"verb": "get",
|
||||||
"requestURI": "/api/v1/namespaces/kube-system/pods/<controller-pod>/proxy/metrics",
|
"requestURI": "/api/v1/namespaces/kube-system/pods/<controller-pod>/proxy/metrics",
|
||||||
"user": {
|
"user": {
|
||||||
"username": "system:serviceaccount:kube-system:headlamp"
|
"username": "system:serviceaccount:<your-namespace>:headlamp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
+13
-13
@@ -1,4 +1,4 @@
|
|||||||
version: "0.2.6"
|
version: "1.0.3"
|
||||||
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.3/headlamp-tns-csi-plugin-1.0.3.tar.gz"
|
||||||
headlamp/plugin/archive-checksum: sha256:c7ab23e88c7182df06c4b15e59be055d9dfc85159266986ae9d79d186b62aa3c
|
headlamp/plugin/archive-checksum: sha256:8a032919de65f9ed45a06f4110083cceb11b91625d97f7b49075adecf38e3adc
|
||||||
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"
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
// Allowlist for inherited dev-dependency CVEs from @kinvolk/headlamp-plugin
|
||||||
|
// CTO decision (PRI-854): these high-severity vulns are dev/build-time only,
|
||||||
|
// trace to @kinvolk/headlamp-plugin transitive deps (Picomatch, Vite, lodash),
|
||||||
|
// and do NOT ship in production plugin artifacts.
|
||||||
|
"allowlist": [
|
||||||
|
{
|
||||||
|
"id": "GHSA-hhpm-516h-p3p6",
|
||||||
|
"reason": "Picomatch ReDoS: devDependency only, does not ship in production plugin bundle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "GHSA-36xf-7xpp-53w5",
|
||||||
|
"reason": "Vite arbitrary file read: devDependency only, does not ship in production plugin bundle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "GHSA-jf8v-p3pp-93qh",
|
||||||
|
"reason": "lodash code injection via _.template: devDependency only, does not ship in production plugin bundle"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+1
-1
@@ -67,7 +67,7 @@ Welcome to the Headlamp TNS-CSI Plugin documentation.
|
|||||||
## External Links
|
## External Links
|
||||||
|
|
||||||
- **[GitHub Repository](https://github.com/privilegedescalation/headlamp-tns-csi-plugin)**
|
- **[GitHub Repository](https://github.com/privilegedescalation/headlamp-tns-csi-plugin)**
|
||||||
- **[Artifact Hub](https://artifacthub.io/packages/headlamp/headlamp-tns-csi-plugin/headlamp-tns-csi-plugin)**
|
- **[Artifact Hub](https://artifacthub.io/packages/headlamp/tns-csi/headlamp-tns-csi-plugin)**
|
||||||
- **[tns-csi Driver](https://github.com/fenio/tns-csi)**
|
- **[tns-csi Driver](https://github.com/fenio/tns-csi)**
|
||||||
- **[kbench](https://github.com/longhorn/kbench)**
|
- **[kbench](https://github.com/longhorn/kbench)**
|
||||||
- **[Headlamp](https://headlamp.dev/)**
|
- **[Headlamp](https://headlamp.dev/)**
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ The TNS-CSI plugin is a single-page React application bundled as a Headlamp plug
|
|||||||
│ HTTPS
|
│ HTTPS
|
||||||
▼
|
▼
|
||||||
┌─────────────────────────────────────────────────────┐
|
┌─────────────────────────────────────────────────────┐
|
||||||
│ Headlamp Pod (kube-system) │
|
│ Headlamp Pod (headlamp namespace) │
|
||||||
│ │
|
│ │
|
||||||
│ Headlamp UI server + API proxy │
|
│ Headlamp UI server + API proxy │
|
||||||
│ (forwards requests using service account token │
|
│ (forwards requests using service account token │
|
||||||
|
|||||||
+10
-10
@@ -9,11 +9,11 @@ helm repo add headlamp https://headlamp-k8s.github.io/headlamp/
|
|||||||
helm repo update
|
helm repo update
|
||||||
|
|
||||||
helm install headlamp headlamp/headlamp \
|
helm install headlamp headlamp/headlamp \
|
||||||
--namespace kube-system \
|
--namespace <your-namespace> \
|
||||||
--create-namespace \
|
--create-namespace \
|
||||||
--set config.pluginsDir=/headlamp/plugins \
|
--set config.pluginsDir=/headlamp/plugins \
|
||||||
--set pluginsManager.sources[0].name=tns-csi \
|
--set pluginsManager.sources[0].name=tns-csi \
|
||||||
--set pluginsManager.sources[0].url=https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.4/tns-csi-0.2.4.tar.gz
|
--set pluginsManager.sources[0].url=https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
## Complete values.yaml Example
|
## Complete values.yaml Example
|
||||||
@@ -27,7 +27,7 @@ config:
|
|||||||
pluginsManager:
|
pluginsManager:
|
||||||
sources:
|
sources:
|
||||||
- name: tns-csi
|
- name: tns-csi
|
||||||
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/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
|
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
name: headlamp
|
name: headlamp
|
||||||
@@ -44,7 +44,7 @@ Apply:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm install headlamp headlamp/headlamp \
|
helm install headlamp headlamp/headlamp \
|
||||||
--namespace kube-system \
|
--namespace <your-namespace> \
|
||||||
-f headlamp-values.yaml
|
-f headlamp-values.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ apiVersion: source.toolkit.fluxcd.io/v1
|
|||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
spec:
|
spec:
|
||||||
interval: 12h
|
interval: 12h
|
||||||
url: https://headlamp-k8s.github.io/headlamp/
|
url: https://headlamp-k8s.github.io/headlamp/
|
||||||
@@ -64,7 +64,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2
|
|||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
spec:
|
spec:
|
||||||
interval: 1h
|
interval: 1h
|
||||||
chart:
|
chart:
|
||||||
@@ -74,14 +74,14 @@ spec:
|
|||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
values:
|
values:
|
||||||
config:
|
config:
|
||||||
pluginsDir: /headlamp/plugins
|
pluginsDir: /headlamp/plugins
|
||||||
pluginsManager:
|
pluginsManager:
|
||||||
sources:
|
sources:
|
||||||
- name: tns-csi
|
- name: tns-csi
|
||||||
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/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
## RBAC Manifest (Apply Separately)
|
## RBAC Manifest (Apply Separately)
|
||||||
@@ -122,7 +122,7 @@ metadata:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: headlamp-tns-csi-reader
|
name: headlamp-tns-csi-reader
|
||||||
@@ -136,7 +136,7 @@ To upgrade to a new plugin version, update the `url` in your values and apply:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm upgrade headlamp headlamp/headlamp \
|
helm upgrade headlamp headlamp/headlamp \
|
||||||
--namespace kube-system \
|
--namespace <your-namespace> \
|
||||||
-f headlamp-values.yaml
|
-f headlamp-values.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ config:
|
|||||||
pluginsManager:
|
pluginsManager:
|
||||||
sources:
|
sources:
|
||||||
- name: tns-csi
|
- name: tns-csi
|
||||||
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/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
**Via FluxCD HelmRelease:**
|
**Via FluxCD HelmRelease:**
|
||||||
@@ -32,7 +32,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2
|
|||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
spec:
|
spec:
|
||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
@@ -46,7 +46,7 @@ spec:
|
|||||||
pluginsManager:
|
pluginsManager:
|
||||||
sources:
|
sources:
|
||||||
- name: tns-csi
|
- name: tns-csi
|
||||||
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/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
### Method 2: Manual Tarball Install
|
### Method 2: Manual Tarball Install
|
||||||
@@ -55,13 +55,10 @@ Download and extract the plugin directly:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Download the release tarball
|
# Download the release tarball
|
||||||
wget https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.4/tns-csi-0.2.4.tar.gz
|
wget https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
|
|
||||||
# Verify the checksum
|
|
||||||
echo "14a3e8c13d0b894a41aa1cfccbcb1f6af09dcbb8fd95c7040a540987ea2096a7 tns-csi-0.2.4.tar.gz" | sha256sum --check
|
|
||||||
|
|
||||||
# Extract into your Headlamp plugins directory
|
# Extract into your Headlamp plugins directory
|
||||||
tar xzf tns-csi-0.2.4.tar.gz -C /headlamp/plugins/
|
tar xzf tns-csi-1.0.0.tar.gz -C /headlamp/plugins/
|
||||||
```
|
```
|
||||||
|
|
||||||
The plugin directory should appear as `/headlamp/plugins/tns-csi/`.
|
The plugin directory should appear as `/headlamp/plugins/tns-csi/`.
|
||||||
@@ -81,7 +78,7 @@ initContainers:
|
|||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
wget -O /tmp/plugin.tar.gz \
|
wget -O /tmp/plugin.tar.gz \
|
||||||
https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v0.2.4/tns-csi-0.2.4.tar.gz
|
https://github.com/privilegedescalation/headlamp-tns-csi-plugin/releases/download/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
tar xzf /tmp/plugin.tar.gz -C /headlamp/plugins/
|
tar xzf /tmp/plugin.tar.gz -C /headlamp/plugins/
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: plugins
|
- name: plugins
|
||||||
@@ -98,10 +95,10 @@ cd headlamp-tns-csi-plugin
|
|||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
npm run package
|
npm run package
|
||||||
# Produces tns-csi-0.2.4.tar.gz
|
# Produces tns-csi-<version>.tar.gz
|
||||||
|
|
||||||
# Extract to your Headlamp plugins directory
|
# Extract to your Headlamp plugins directory
|
||||||
tar xzf tns-csi-0.2.4.tar.gz -C /headlamp/plugins/
|
tar xzf tns-csi-<version>.tar.gz -C /headlamp/plugins/
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use `headlamp-plugin extract` for automatic placement:
|
Or use `headlamp-plugin extract` for automatic placement:
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ config:
|
|||||||
pluginsManager:
|
pluginsManager:
|
||||||
sources:
|
sources:
|
||||||
- name: tns-csi
|
- name: tns-csi
|
||||||
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/v1.0.0/tns-csi-1.0.0.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
Then upgrade your Headlamp release:
|
Then upgrade your Headlamp release:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm upgrade headlamp headlamp/headlamp -f values.yaml -n kube-system
|
helm upgrade headlamp headlamp/headlamp -f values.yaml -n <your-namespace>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 2: Configure RBAC
|
## Step 2: Configure RBAC
|
||||||
@@ -70,7 +70,7 @@ metadata:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: headlamp-tns-csi-reader
|
name: headlamp-tns-csi-reader
|
||||||
@@ -78,7 +78,7 @@ roleRef:
|
|||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Adjust `name: headlamp` and `namespace: kube-system` to match your Headlamp service account.
|
Adjust `name: headlamp` and `namespace: <your-namespace>` to match your Headlamp service account.
|
||||||
|
|
||||||
## Step 3: Verify
|
## Step 3: Verify
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ If a page shows a loading spinner indefinitely:
|
|||||||
|
|
||||||
1. **Check browser console** for errors (F12 → Console)
|
1. **Check browser console** for errors (F12 → Console)
|
||||||
2. **Check network tab** for failed API requests (look for 403, 404, 500)
|
2. **Check network tab** for failed API requests (look for 403, 404, 500)
|
||||||
3. **Check Headlamp pod logs**: `kubectl logs -n kube-system -l app.kubernetes.io/name=headlamp`
|
3. **Check Headlamp pod logs**: `kubectl logs -n <your-namespace> -l app.kubernetes.io/name=headlamp`
|
||||||
4. **Try refreshing** — the watch connection may have been interrupted
|
4. **Try refreshing** — the watch connection may have been interrupted
|
||||||
|
|
||||||
## Common API Errors
|
## Common API Errors
|
||||||
@@ -102,7 +102,7 @@ Look for errors related to `tns-csi`, `headlamp-plugin`, or Kubernetes API paths
|
|||||||
**Headlamp pod logs:**
|
**Headlamp pod logs:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl logs -n kube-system -l app.kubernetes.io/name=headlamp --tail=100
|
kubectl logs -n <your-namespace> -l app.kubernetes.io/name=headlamp --tail=100
|
||||||
```
|
```
|
||||||
|
|
||||||
**tns-csi controller logs:**
|
**tns-csi controller logs:**
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ The Benchmark page requires permissions to create and delete Jobs and PVCs:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl auth can-i create jobs -n <benchmark-namespace> \
|
kubectl auth can-i create jobs -n <benchmark-namespace> \
|
||||||
--as=system:serviceaccount:kube-system:headlamp
|
--as=system:serviceaccount:<your-namespace>:headlamp
|
||||||
|
|
||||||
kubectl auth can-i create persistentvolumeclaims -n <benchmark-namespace> \
|
kubectl auth can-i create persistentvolumeclaims -n <benchmark-namespace> \
|
||||||
--as=system:serviceaccount:kube-system:headlamp
|
--as=system:serviceaccount:<your-namespace>:headlamp
|
||||||
```
|
```
|
||||||
|
|
||||||
Apply the additional permissions if missing — see [RBAC Issues](rbac.md) or [SECURITY.md](../../SECURITY.md).
|
Apply the additional permissions if missing — see [RBAC Issues](rbac.md) or [SECURITY.md](../../SECURITY.md).
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ This requires `get` on `pods/proxy` in `kube-system`:
|
|||||||
```bash
|
```bash
|
||||||
kubectl auth can-i get pods/proxy \
|
kubectl auth can-i get pods/proxy \
|
||||||
-n kube-system \
|
-n kube-system \
|
||||||
--as=system:serviceaccount:kube-system:headlamp
|
--as=system:serviceaccount:<your-namespace>:headlamp
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Network Policies
|
### 5. Network Policies
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ Use `kubectl auth can-i` to check specific permissions:
|
|||||||
```bash
|
```bash
|
||||||
# Check if the Headlamp service account can list StorageClasses
|
# Check if the Headlamp service account can list StorageClasses
|
||||||
kubectl auth can-i list storageclasses \
|
kubectl auth can-i list storageclasses \
|
||||||
--as=system:serviceaccount:kube-system:headlamp
|
--as=system:serviceaccount:<your-namespace>:headlamp
|
||||||
|
|
||||||
# Check pod proxy access (for metrics)
|
# Check pod proxy access (for metrics)
|
||||||
kubectl auth can-i get pods/proxy \
|
kubectl auth can-i get pods/proxy \
|
||||||
-n kube-system \
|
-n kube-system \
|
||||||
--as=system:serviceaccount:kube-system:headlamp
|
--as=system:serviceaccount:<your-namespace>:headlamp
|
||||||
|
|
||||||
# Check snapshot access
|
# Check snapshot access
|
||||||
kubectl auth can-i list volumesnapshots \
|
kubectl auth can-i list volumesnapshots \
|
||||||
--as=system:serviceaccount:kube-system:headlamp
|
--as=system:serviceaccount:<your-namespace>:headlamp
|
||||||
```
|
```
|
||||||
|
|
||||||
### Applying the Required RBAC
|
### Applying the Required RBAC
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ metadata:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: headlamp # adjust to your Headlamp service account name
|
name: headlamp # adjust to your Headlamp service account name
|
||||||
namespace: kube-system # adjust to your Headlamp namespace
|
namespace: <your-namespace>
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: headlamp-tns-csi-reader
|
name: headlamp-tns-csi-reader
|
||||||
@@ -99,7 +99,7 @@ metadata:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: headlamp
|
name: headlamp
|
||||||
namespace: kube-system
|
namespace: <your-namespace>
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: Role
|
kind: Role
|
||||||
name: headlamp-tns-csi-benchmark
|
name: headlamp-tns-csi-benchmark
|
||||||
|
|||||||
Generated
-18188
File diff suppressed because it is too large
Load Diff
+29
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tns-csi",
|
"name": "tns-csi",
|
||||||
"version": "0.2.6",
|
"version": "1.0.3",
|
||||||
"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",
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
"homepage": "https://github.com/privilegedescalation/headlamp-tns-csi-plugin#readme",
|
"homepage": "https://github.com/privilegedescalation/headlamp-tns-csi-plugin#readme",
|
||||||
"author": "privilegedescalation",
|
"author": "privilegedescalation",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"packageManager": "pnpm@10.32.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "headlamp-plugin start",
|
"start": "headlamp-plugin start",
|
||||||
"build": "headlamp-plugin build",
|
"build": "headlamp-plugin build",
|
||||||
@@ -24,7 +25,33 @@
|
|||||||
"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",
|
||||||
|
"vite": ">=6.4.2",
|
||||||
|
"elliptic": ">=6.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+11990
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