Namespace Conventions
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_revisiondefaults to"main"for both. Branch-based promotion (target_revision = "dev"for dev entries) is a documented future option but not currently used.