Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72ce7fa585 | |||
| be254b1eec | |||
| 90efdf5569 |
@@ -16,7 +16,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@hugh/add-pnpm-support-plugin-e2e
|
uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@main
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
node-version: '22'
|
||||||
headlamp-version: v0.40.1
|
headlamp-version: v0.40.1
|
||||||
|
|||||||
@@ -5,9 +5,3 @@ dist/
|
|||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
# E2E
|
|
||||||
e2e/.auth/
|
|
||||||
.env.e2e
|
|
||||||
playwright-report/
|
|
||||||
test-results/
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ 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
|
## [1.0.0] - 2026-03-24
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -63,12 +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
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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
|
||||||
|
|
||||||
@@ -90,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
|
||||||
@@ -105,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.
|
||||||
|
|||||||
+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 │
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ helm install headlamp headlamp/headlamp \
|
|||||||
--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
|
||||||
@@ -81,7 +81,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
|
||||||
```
|
```
|
||||||
|
|
||||||
## RBAC Manifest (Apply Separately)
|
## RBAC Manifest (Apply Separately)
|
||||||
|
|||||||
@@ -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:**
|
||||||
@@ -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,7 +28,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
|
||||||
```
|
```
|
||||||
|
|
||||||
Then upgrade your Headlamp release:
|
Then upgrade your Headlamp release:
|
||||||
|
|||||||
+3
-2
@@ -24,14 +24,14 @@ test.describe('TNS CSI plugin smoke tests', () => {
|
|||||||
|
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
await expect(page).toHaveURL(/tns-csi/);
|
await expect(page).toHaveURL(/tns-csi/);
|
||||||
await expect(page.getByRole('heading', { name: /tns.csi.*overview/i })).toBeVisible();
|
await expect(page.getByRole('heading', { name: /TNS.CSI/i })).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('TNS CSI page renders content', async ({ page }) => {
|
test('TNS CSI page renders content', async ({ page }) => {
|
||||||
await page.goto('/c/main/tns-csi');
|
await page.goto('/c/main/tns-csi');
|
||||||
await waitForSidebar(page);
|
await waitForSidebar(page);
|
||||||
|
|
||||||
await expect(page.getByRole('heading', { name: /tns.csi.*overview/i })).toBeVisible({
|
await expect(page.getByRole('heading', { name: /TNS.CSI/i })).toBeVisible({
|
||||||
timeout: 15_000,
|
timeout: 15_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -43,6 +43,7 @@ test.describe('TNS CSI plugin smoke tests', () => {
|
|||||||
test('plugin settings page shows TNS CSI plugin entry', async ({ page }) => {
|
test('plugin settings page shows TNS CSI plugin entry', async ({ page }) => {
|
||||||
await page.goto('/settings/plugins');
|
await page.goto('/settings/plugins');
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector('[class*="PluginList"], [class*="plugins"], table, list', { timeout: 10_000 }).catch(() => {});
|
||||||
|
|
||||||
const pluginEntry = page.locator('text=/tns.csi/i').first();
|
const pluginEntry = page.locator('text=/tns.csi/i').first();
|
||||||
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
|
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
|
||||||
|
|||||||
+4
-4
@@ -24,8 +24,7 @@
|
|||||||
"format:check": "prettier --check src/",
|
"format:check": "prettier --check src/",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"e2e": "playwright test",
|
"e2e": "playwright test"
|
||||||
"e2e:headed": "playwright test --headed"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
@@ -49,11 +48,12 @@
|
|||||||
"react-router-dom": "^5.3.0",
|
"react-router-dom": "^5.3.0",
|
||||||
"typescript": "~5.6.2",
|
"typescript": "~5.6.2",
|
||||||
"vitest": "^3.2.4",
|
"vitest": "^3.2.4",
|
||||||
"@playwright/test": "^1.58.2"
|
"@playwright/test": "^1.59.1"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"tar": "^7.5.11",
|
"tar": "^7.5.11",
|
||||||
"undici": "^7.24.3",
|
"undici": "^7.24.3",
|
||||||
"vite": ">=6.4.2"
|
"vite": ">=6.4.2",
|
||||||
|
"elliptic": ">=6.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+530
-530
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user