Skip to content

chore(deploy): remove v1 kubernetes-controller from chart, CI, scripts, docs#269

Closed
JoshuaAFerguson wants to merge 1 commit into
mainfrom
chore/v1-to-v2-deploy-cleanup
Closed

chore(deploy): remove v1 kubernetes-controller from chart, CI, scripts, docs#269
JoshuaAFerguson wants to merge 1 commit into
mainfrom
chore/v1-to-v2-deploy-cleanup

Conversation

@JoshuaAFerguson

Copy link
Copy Markdown
Member

Summary

The v1 `streamspace-kubernetes-controller` was replaced by the K8s Agent in v2.0 — but its dead config was left behind across the deployment surface. Cleans up that residue atomically:

  • Helm chart: Deletes `controller-deployment.yaml`; removes controller blocks from PDB, NetworkPolicy, RBAC (ClusterRole+ClusterRoleBinding+SA), ServiceMonitor, and `_helpers.tpl`. Drops the `controller:` block (~75 lines) and `networkPolicy.controller` from `values.yaml`. Trims the v1-controller upgrade-path stanza in `NOTES.txt` and points the metrics port-forward example at the api service.
  • CI: `release.yml` no longer announces `streamspace-kubernetes-controller` as a released image and drops it from the trivy docker-scan matrix (replaced with k8s-agent). `security-scan.yml` matrix swaps `kubernetes-controller` for the two real v2 agents (`k8s-agent`, `docker-agent`).
  • Scripts: `local-deploy.sh` comment moved to past tense.
  • Docs: `TROUBLESHOOTING.md` clarifies the controller is fully removed, not just disabled-by-default.

12 files changed, 22 insertions(+), 415 deletions(-) — almost all dead config / dead templates.

Verification

  • `helm lint chart/` → exits clean (no errors)
  • `helm template streamspace chart/` → 806 lines (was 872; 66-line shrinkage matches the dead-template removal)
  • No remaining `kubernetes-controller` references except intentional historical-narrative comments in `chart/values.yaml` and `docs/TROUBLESHOOTING.md` explaining what was removed

Test plan

  • CI `release.yml` runs cleanly on next tag
  • CI `security-scan.yml` builds + scans both agent images on next push
  • `helm install` against a fresh cluster produces only api / ui / k8s-agent / postgresql deployments (no `-controller` resources)
  • `helm upgrade` against a v1-installed chart cleanly removes the controller resources

Out of scope (already cleaned in companion branch)

  • `scripts/local-build.sh` still has a few `KUBERNETES_CONTROLLER_IMAGE` references; cleaned in `fix/docker-compose-v2-agents` (the dev-loop branch). Left out of this PR to avoid a cross-branch conflict.

…s, docs

The v1 controller was replaced by the K8s Agent in v2.0 but its dead
config persisted across the deployment surface. Atomic removal of the
remaining references now that the v2 architecture is the only path:

Helm chart (chart/):
- Delete templates/controller-deployment.yaml (whole file was guarded
  on `controller.enabled` which defaulted to false)
- Remove controller PDB block from templates/pdb.yaml
- Remove controller NetworkPolicy block from templates/networkpolicy.yaml
- Remove controller ClusterRole + ClusterRoleBinding + SA from
  templates/rbac.yaml (the K8s Agent has its own RBAC bundle)
- Remove controller ServiceMonitor from templates/servicemonitor.yaml
- Remove streamspace.controller.labels / .serviceAccountName / .image
  helper defines from templates/_helpers.tpl
- Trim NOTES.txt: remove the v1-controller upgrade-path stanza, point
  metrics port-forward at the api service instead of the dead
  controller service
- Delete `controller:` values block (~75 lines) and the
  `networkPolicy.controller` sub-block from values.yaml

CI workflows (.github/workflows/):
- Drop kubernetes-controller from release.yml's release-notes image
  list and from its docker-scan matrix; add k8s-agent in its place
- Replace kubernetes-controller in security-scan.yml's trivy matrix
  with the two real v2 agents (k8s-agent, docker-agent)

Scripts:
- scripts/local-deploy.sh: update the comment at the image-existence
  check from "K8s Agent REPLACES kubernetes-controller" to read in the
  past tense (the v1 controller was removed in v2)

Docs:
- docs/TROUBLESHOOTING.md: clarify the controller is fully removed,
  not just disabled-by-default

Verified:
- `helm lint chart/` exits clean
- `helm template streamspace chart/` renders 806 lines (was 872 before;
  the 66-line shrinkage is the dead-config removal)

Out of scope here (cleaned in fix/docker-compose-v2-agents branch):
- scripts/local-build.sh KUBERNETES_CONTROLLER_IMAGE variable + grep
  filter + case branch — touched there to avoid cross-branch conflict
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 28, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8d80213b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread chart/templates/NOTES.txt
View metrics:
kubectl port-forward -n {{ .Release.Namespace }} \
svc/{{ include "streamspace.fullname" . }}-controller 8080:8080
svc/{{ include "streamspace.fullname" . }}-api 8080:8080

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Forward metrics to the API service's configured port

This command now targets the API service but still hard-codes 8080:8080, while the chart’s default API service port is 8000 (api.service.port), so the post-install metrics check fails on a default install with a "service does not have a service port 8080" error. Update the port-forward mapping to use the API service port (or template it from values) so NOTES instructions work reliably.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity.

Action Required:

  • If this PR is still being worked on, please add a comment
  • If this is blocked, add the status:blocked label
  • If this is no longer needed, it will be closed in 7 days

@github-actions github-actions Bot added the stale No recent activity - will be closed if no response label May 29, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This pull request was automatically closed due to inactivity.

If you believe this was closed in error, please reopen it.

@github-actions github-actions Bot closed this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation stale No recent activity - will be closed if no response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant