Skip to content

chore(k8s): drop in-cluster managed-service manifests from staging and prod#210

Merged
vredchenko merged 1 commit into
mainfrom
chore/k8s-prune-managed-service-manifests
May 26, 2026
Merged

chore(k8s): drop in-cluster managed-service manifests from staging and prod#210
vredchenko merged 1 commit into
mainfrom
chore/k8s-prune-managed-service-manifests

Conversation

@vredchenko
Copy link
Copy Markdown
Collaborator

Summary

PostgreSQL, RabbitMQ, MongoDB, Elasticsearch and Keycloak are externally managed services in staging and production (provided by DLS infra). The in-cluster manifests for them were dead config left over from the development overlay structure.

Removed (8 files)

  • k8s/environments/{staging,production}/postgres.yaml
  • k8s/environments/{staging,production}/rabbitmq.yaml
  • k8s/environments/{staging,production}/mongodb.yaml
  • k8s/environments/{staging,production}/elasticsearch.yaml

Dropped from both kustomization.yaml resource lists.

Configmap changes (both envs)

  • POSTGRES_HOST and RABBITMQ_HOST set to "OVERRIDE-FROM-ENV" placeholders so a deploy without .env.{staging,production} override fails fast with a clear signal rather than silently trying to resolve the now-deleted in-cluster services.
  • Removed ADMINER_PORT (adminer is not deployed in either env).

Bonus fix

Out of scope

  • development/ overlay is not touched - dev still spins up its own infra locally.

Test plan

  • kubectl kustomize k8s/environments/production/ builds successfully (291 lines, no errors)
  • kubectl kustomize k8s/environments/staging/ builds successfully (291 lines, no errors)
  • CI green on PR
  • After merge + deploy with real .env.staging / .env.production (provided by Dan), backend pods come up and connect to the managed PG/MQ instances

…d prod

PostgreSQL, RabbitMQ, MongoDB, Elasticsearch and Keycloak are externally
managed services provided by DLS infra in staging and production. The
in-cluster Deployment/StatefulSet manifests were dead config — left over
from the development overlay structure. Removed from both overlays:

- postgres.yaml
- rabbitmq.yaml
- mongodb.yaml
- elasticsearch.yaml

Also updated both configmaps:
- POSTGRES_HOST and RABBITMQ_HOST now placeholder OVERRIDE-FROM-ENV
  values so a deploy without .env override fails fast with a clear
  signal rather than trying to resolve the now-deleted in-cluster
  services.
- Dropped ADMINER_PORT (adminer is not deployed in staging/prod).
- Staging CORS_ALLOWED_ORIGINS corrected from staging.example.com
  placeholder to smartem-staging.diamond.ac.uk (matches the ingress
  host).

Development overlay is unchanged - dev still spins up its own infra.
@github-actions github-actions Bot added the devops CI/CD, deployment, infrastructure, or tooling work label May 26, 2026
@vredchenko vredchenko merged commit 5973351 into main May 26, 2026
7 checks passed
@vredchenko vredchenko deleted the chore/k8s-prune-managed-service-manifests branch May 26, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops CI/CD, deployment, infrastructure, or tooling work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant