Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f743c4ecd0 | |||
| 629ab1050e | |||
| be5d86bc8e | |||
| 1daa5095ab | |||
| 9a944560f5 | |||
| 433e0d7870 | |||
| e09e887390 | |||
| fc7198b045 | |||
| b0110e474c | |||
| 2e2713fd3f | |||
| be254b1eec | |||
| 90efdf5569 | |||
| 4ba90fa218 | |||
| a089a2cc2d |
@@ -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:
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
name: Dual Approval (CTO + QA)
|
name: Promotion Gate
|
||||||
|
|
||||||
# Calls the shared dual-approval-check workflow.
|
# Calls the shared promotion gate workflow.
|
||||||
# Passes when both privilegedescalation-cto and privilegedescalation-qa
|
# dev PRs: no gate (engineer self-merges).
|
||||||
# have approved the PR. Add "Dual Approval (CTO + QA)" to required_status_checks
|
# uat PRs: QA approval required.
|
||||||
# in branch protection to enforce this gate.
|
# main PRs: UAT approval required (uat→main promotions).
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted, dismissed]
|
types: [submitted, dismissed]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [uat, main]
|
||||||
types: [opened, reopened, synchronize]
|
types: [opened, reopened, synchronize]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dual-approval:
|
promotion-gate:
|
||||||
uses: privilegedescalation/.github/.github/workflows/dual-approval-check.yaml@main
|
uses: privilegedescalation/.github/.github/workflows/dual-approval-check.yaml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
pr_number: ${{ github.event.pull_request.number }}
|
pr_number: ${{ github.event.pull_request.number }}
|
||||||
|
|
||||||
|
|||||||
@@ -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/**
|
||||||
+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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
version: "1.0.0"
|
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: >-
|
||||||
@@ -63,7 +63,7 @@ changes:
|
|||||||
description: "GitHub App token secrets passed to release workflow"
|
description: "GitHub App token secrets passed to release workflow"
|
||||||
|
|
||||||
annotations:
|
annotations:
|
||||||
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-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:e38846ceb17a79438f8aecc50f22920b0efa7456f3ebb3e628d89856af83ad01
|
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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ 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 \
|
||||||
@@ -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,7 +74,7 @@ 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
|
||||||
@@ -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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ pluginsManager:
|
|||||||
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
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tns-csi",
|
"name": "tns-csi",
|
||||||
"version": "1.0.0",
|
"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",
|
||||||
@@ -51,6 +51,7 @@
|
|||||||
"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
+529
-529
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user