mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
docs: prepare phase35 d7 boundary gate
This commit is contained in:
1 parent
5119dd97bc
commit
34bd5a4763
2 files changed
+150
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Current Plan: Phase 35 - Kubernetes-Native Read-Only Operator Foundation
|
||||
|
||||
Status: active, 88% complete. Started on 2026-06-02.
|
||||
Status: active, 92% complete. Started on 2026-06-02.
|
||||
|
||||
Branch: `phase33-testops-failure-hardening`
|
||||
|
||||
@@ -315,6 +315,8 @@ Non-blocking follow-ups:
|
||||
|
||||
Goal: prove the new operator foundation cannot mutate storage.
|
||||
|
||||
Status: local review PASS; live QA pending.
|
||||
|
||||
Acceptance:
|
||||
|
||||
```text
|
||||
@@ -324,6 +326,25 @@ HTTP/dashboard/ops surfaces remain read-only
|
||||
negative scenarios produce dry-run advice only
|
||||
```
|
||||
|
||||
Local verification:
|
||||
|
||||
```text
|
||||
[done] operator-status Helm RBAC grants only get/list/watch on CRDs,
|
||||
get/update/patch on CRD status subresources, and create Events.
|
||||
[done] operator-status Deployment uses its dedicated ServiceAccount.
|
||||
[done] KubernetesStatusClient only PATCHes CRD /status and POSTs Events.
|
||||
[done] no operator-status code path exposes PVC/PV/workload/Secret/
|
||||
StorageClass/host mutation methods.
|
||||
[done] go test ./core/ops ./cmd/sw-block ./cmd/blockcsi
|
||||
[done] helm lint charts/seaweed-block
|
||||
```
|
||||
|
||||
QA assignment:
|
||||
|
||||
```text
|
||||
internal/docs/qa-assignments/phase35-d7-read-only-boundary-qa-assignment.md
|
||||
```
|
||||
|
||||
## D8: Close And Release Claim Alignment
|
||||
|
||||
Goal: close Phase 35 as a Kubernetes-native status foundation, not a full
|
||||
@@ -412,14 +433,17 @@ finished plan moved under internal/docs/finished-plans/
|
||||
left exactly one distinct Kubernetes Event named
|
||||
`pvc-walfault-warning-wal-integrity-fault`. Status remained
|
||||
blocked/Ready=False and RBAC remained status/events only.
|
||||
- 92%: D7 local read-only boundary review passed. The operator-status
|
||||
ServiceAccount, writer interface, Kubernetes client, and chart render are
|
||||
limited to CRD reads, CRD status writes, and core Event creation. Live
|
||||
`kubectl auth can-i` QA remains pending.
|
||||
|
||||
## Next Step
|
||||
|
||||
Run D7 read-only boundary close. Re-audit the operator-status service account
|
||||
and code path now that real status writes and Events are enabled: it may patch
|
||||
only CRD status and create Events, and it must not mutate PVC/PV/workloads,
|
||||
storage classes, Secrets, Helm releases, iSCSI sessions, multipath maps, or
|
||||
hostPath data.
|
||||
Ask QA to run D7 from
|
||||
`internal/docs/qa-assignments/phase35-d7-read-only-boundary-qa-assignment.md`.
|
||||
D7 closes only when live `kubectl auth can-i` checks prove status/events are
|
||||
allowed and storage/workload/spec mutations are denied.
|
||||
|
||||
```text
|
||||
VolumeReady -> Normal
|
||||
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
# QA Assignment - Phase 35 D7 Read-Only Boundary
|
||||
|
||||
Source branch: `phase33-testops-failure-hardening`
|
||||
|
||||
Gate: D7 read-only boundary for the Kubernetes-native operator-status
|
||||
foundation.
|
||||
|
||||
## Local Review Summary
|
||||
|
||||
The operator-status path is intentionally narrow:
|
||||
|
||||
- Helm creates a dedicated `sw-block-operator-status` ServiceAccount only when
|
||||
`operatorStatus.create=true`.
|
||||
- Its ClusterRole grants:
|
||||
- `get/list/watch` on `swblockclusters` and `swblockvolumes`
|
||||
- `get/update/patch` on `swblockclusters/status` and
|
||||
`swblockvolumes/status`
|
||||
- `create` on core `events`
|
||||
- `core/ops.KubernetesStatusClient` exposes only:
|
||||
- `WriteClusterStatus`
|
||||
- `WriteVolumeStatus`
|
||||
- `EmitEvent`
|
||||
- The client only PATCHes `/status` subresources and POSTs core Events.
|
||||
- It has no methods for spec mutation, PVC/PV, workloads, Secrets,
|
||||
StorageClasses, Helm, iSCSI, multipath, or hostPath mutation.
|
||||
|
||||
Scoped local checks already cover this boundary:
|
||||
|
||||
```text
|
||||
go test ./core/ops ./cmd/sw-block ./cmd/blockcsi
|
||||
helm lint charts/seaweed-block
|
||||
helm template ... --set operatorStatus.create=true --set operatorStatus.dryRun=false
|
||||
```
|
||||
|
||||
## Required Live QA Checks
|
||||
|
||||
Install the chart with the operator-status controller enabled in write mode:
|
||||
|
||||
```text
|
||||
operatorStatus.create=true
|
||||
operatorStatus.dryRun=false
|
||||
```
|
||||
|
||||
Use the rendered ServiceAccount name from the release, usually:
|
||||
|
||||
```text
|
||||
system:serviceaccount:kube-system:sw-block-seaweed-block-operator-status
|
||||
```
|
||||
|
||||
### Allowed Verbs
|
||||
|
||||
These must be `yes`:
|
||||
|
||||
```text
|
||||
kubectl auth can-i get swblockvolumes.block.seaweedfs.com --as <SA> -n kube-system
|
||||
kubectl auth can-i list swblockvolumes.block.seaweedfs.com --as <SA> -n kube-system
|
||||
kubectl auth can-i watch swblockvolumes.block.seaweedfs.com --as <SA> -n kube-system
|
||||
kubectl auth can-i patch swblockvolumes.block.seaweedfs.com/status --as <SA> -n kube-system
|
||||
kubectl auth can-i update swblockvolumes.block.seaweedfs.com/status --as <SA> -n kube-system
|
||||
kubectl auth can-i patch swblockclusters.block.seaweedfs.com/status --as <SA> -n kube-system
|
||||
kubectl auth can-i create events --as <SA> -n kube-system
|
||||
```
|
||||
|
||||
### Forbidden Verbs
|
||||
|
||||
These must be `no`:
|
||||
|
||||
```text
|
||||
kubectl auth can-i patch swblockvolumes.block.seaweedfs.com --as <SA> -n kube-system
|
||||
kubectl auth can-i update swblockvolumes.block.seaweedfs.com --as <SA> -n kube-system
|
||||
kubectl auth can-i delete swblockvolumes.block.seaweedfs.com --as <SA> -n kube-system
|
||||
kubectl auth can-i create pods --as <SA> -n kube-system
|
||||
kubectl auth can-i patch pods --as <SA> -n kube-system
|
||||
kubectl auth can-i delete pods --as <SA> -n kube-system
|
||||
kubectl auth can-i create persistentvolumeclaims --as <SA> -n default
|
||||
kubectl auth can-i patch persistentvolumeclaims --as <SA> -n default
|
||||
kubectl auth can-i delete persistentvolumeclaims --as <SA> -n default
|
||||
kubectl auth can-i create persistentvolumes --as <SA>
|
||||
kubectl auth can-i patch persistentvolumes --as <SA>
|
||||
kubectl auth can-i delete persistentvolumes --as <SA>
|
||||
kubectl auth can-i create secrets --as <SA> -n kube-system
|
||||
kubectl auth can-i patch secrets --as <SA> -n kube-system
|
||||
kubectl auth can-i create deployments.apps --as <SA> -n kube-system
|
||||
kubectl auth can-i patch deployments.apps --as <SA> -n kube-system
|
||||
kubectl auth can-i delete deployments.apps --as <SA> -n kube-system
|
||||
kubectl auth can-i create storageclasses.storage.k8s.io --as <SA>
|
||||
kubectl auth can-i patch storageclasses.storage.k8s.io --as <SA>
|
||||
kubectl auth can-i delete storageclasses.storage.k8s.io --as <SA>
|
||||
```
|
||||
|
||||
### Runtime Boundary
|
||||
|
||||
Run one write-mode reconcile against a ready, blocked, or stale bundle and
|
||||
verify:
|
||||
|
||||
```text
|
||||
operator_status=write_status ... mutation_allowed=false
|
||||
```
|
||||
|
||||
Then verify:
|
||||
|
||||
```text
|
||||
SwBlockCluster.spec is unchanged
|
||||
SwBlockVolume.spec is unchanged
|
||||
SwBlockCluster.status is updated
|
||||
SwBlockVolume.status is updated
|
||||
Kubernetes Event(s) may be created
|
||||
no PVC/PV/workload/Secret/StorageClass changed because of operator-status
|
||||
```
|
||||
|
||||
## Pass Criteria
|
||||
|
||||
D7 passes when:
|
||||
|
||||
- All allowed `can-i` checks return `yes`.
|
||||
- All forbidden `can-i` checks return `no`.
|
||||
- Runtime reconcile writes CRD `.status` and Events only.
|
||||
- Output and operator snapshot still report `mutation_allowed=false`.
|
||||
- Cleanup leaves no product residue.
|
||||
|
||||
Reference in new issue
Block a user