Implementation Tasks: Kubernetes Cluster-Source Matrix (EW-616)
Backlog of discrete, completable units of work that implement
./plan.md.
Status: Done
Last updated: 2026-05-14
Closed
Code
- ✅ T-1. Add
ClusterSourcetype +clusterSource?field toKubernetesSettings. — PR #753. - ✅ T-2. Add
clusterSourceenum +allOf/if/thenconditionalrequired+x-showIfonkubeconfig/kubeContextto the plugin schema. — PRs #753 (schema), #766 (x-showIf). - ✅ T-3.
coerceSettingsacceptsclusterSourceonly when it's a valid enum value. — PR #753. - ✅ T-4.
validateConnectionshort-circuits for platform-managed sources. — PR #753. - ✅ T-5.
getDeploymentSecretsemitsK8S_CLUSTER_SOURCE. — PR #753. - ✅ T-6. New
cluster-source-matrix.tswithvalidateClusterSourceForOwner,resolveKubeconfigForClusterSource,allowedClusterSourcesFor,isEverWorksSharedOrg,isAdminOnlyOrg. — PR #753. - ✅ T-7.
DeployService.resolveDeployTokencalls validator + resolver, throwsBadRequestExceptionon policy violation,InternalServerErrorExceptionon missing platform env var. — PRs #753 + #753's review-fix commit. - ✅ T-8.
DeployFacadeService.getTokenFromSettingsemitsPLATFORM_MANAGED_KUBECONFIG_SENTINELfor k8s + platform-managed sources. — PR #753 review-fix commit. - ✅ T-9.
DeployService.resolveDeployTokendefensively strips the sentinel before validator/resolver. — PR #753 review-fix commit.
Tests
- ✅ T-10.
cluster-source-matrix.spec.ts— 19 tests: all 9 matrix cells, case-insensitivity, env-var substitution, missing-env failures. — PR #753. - ✅ T-11. Update
deploy.service.spec.ts— 6 new EW-616 integration tests covering back-compat fall-through, env substitution, validation failures, sentinel-isolation, Vercel pass-through. — PR #753 + review-fix commit. - ✅ T-12. Update
deploy.facade.spec.ts— 5 sentinel tests. — PR #753 review-fix commit. - ✅ T-13. Update
k8s.plugin.spec.ts— 3 schema tests: dropdown enum, conditionalrequired,x-showIfshape. — PRs #753 + #766. - ✅ T-14. Update
facades.module.spec.tsregression-guard symbol list to includePLATFORM_MANAGED_KUBECONFIG_SENTINEL. — PR #753 final commit.
Infrastructure
- ✅ T-15. Push two base64-encoded kubeconfig secrets to
ever-works/ever-worksGitHub repo:EVER_WORKS_K8S_WORKS_KUBECONFIG_B64,EVER_WORKS_K8S_GAUZY_KUBECONFIG_B64. — Manual ops, recorded in PR #765 description. - ✅ T-16. Wire the two secrets into
deploy-do-{dev,stage,prod}.ymlworkflowenv:blocks. — PR #765. - ✅ T-17. Add
Secretresource (ever-works-platform-kubeconfigs[-{dev,stage}]) to each.deploy/k8s/k8s-manifest.*.yamlwithdata:keys +valueFrom.secretKeyRefon the API container. — PR #765.
Release
- ✅ T-18. Merge PR #753 to develop; cascade develop→stage (#762) → main (#763) for round-1 (matrix-only).
- ✅ T-19. Merge PR #751 (EW-615 secrets) to develop.
- ✅ T-20. Merge PR #765 (platform manifests + workflows) to develop.
- ✅ T-21. Merge PR #766 (UI
x-showIf) to develop. - ✅ T-22. Cascade develop→stage (#767) → main (#768) for round-2 (#751 + #765 + #766 bundled).
- ✅ T-23. Verify prod deploy: both API pods on
k8s-gauzyhave both env vars mounted viasecretKeyRef;ever-works-platform-kubeconfigsSecret exists with 2021-byte decoded values for both keys.
Documentation
- ✅ T-24. Spec, plan, and tasks docs under
docs/specs/features/k8s-cluster-source-matrix/. — This PR. - ✅ T-25. Update Workspace runbook
EVER_WORKS_K8S_DEPLOY_TROUBLESHOOTING.mdwith: closed gotchas (EW-615/616 follow-up tickets), new behaviour (clusterSource dropdown, matrix enforcement, env-var routing, sentinel), new failure modes. — Companion PR onever-works/workspace.
Out of scope / follow-up tickets
- T-26. Replace long-lived platform kubeconfigs with rotated, short-lived service-account tokens. New ticket.
- T-27. Per-Work UI filtering: call
allowedClusterSourcesFor(websiteOwner)to filter the dropdown options when the form is rendered in a Work-scoped context. New ticket. - T-28. RBAC scoping: the platform kubeconfigs are currently full cluster-admin. Scope them to the
ever-worksnamespace only. New ticket. - T-29. GHCR auto-link reliability: pin the
org.opencontainers.image.sourcelabel workaround so future template changes don't break auto-link. Workaround documented in the runbook.