Namespace Conventions

namespace-conventions Convention

pal-e-services convention

Rule

No namespace: field in k8s manifests. ArgoCD controls namespace placement via the Application spec's destination.namespace, which is derived from the var.services map key.

Why

Allows the same manifests to deploy to different namespaces (e.g., basketball-api for prod, basketball-api-dev for dev) by having separate ArgoCD Application entries pointing to the same repo with different namespace targets.

Dev/Prod Pattern

  • Production: map key = "service-name" (namespace = service-name)
  • Development: map key = "service-name-dev" (namespace = service-name-dev)
  • Both are separate entries in var.services
  • target_revision defaults to "main" for both. Branch-based promotion (target_revision = "dev" for dev entries) is a documented future option but not currently used.