Problem
The current infra/k8s structure uses hard-coded configuration values (e.g., environment, image tags, domains, resource limits) directly in the YAML manifests. This approach makes it difficult to maintain, update, and promote changes across different environments (dev, staging, prod). Manual edits are required for each environment, increasing the risk of errors and configuration drift.
Proposal
Adopt Kustomize for managing Kubernetes manifests in infra/k8s. Kustomize allows for:
- Environment-specific overlays (e.g., dev, staging, prod) without duplicating base manifests.
- Centralized management of common resources and configuration.
- Easier updates to image tags, environment variables, resource limits, and other settings.
- Improved maintainability and scalability as the project grows.
Acceptance Criteria
- Refactor existing manifests in
infra/k8s to use a base/ directory and environment overlays (e.g., overlays/prod/, overlays/dev/).
- Remove hard-coded values from base manifests; use Kustomize patches and
kustomization.yaml files for environment-specific configuration.
- Update documentation to describe how to use Kustomize for deployment.
- Validate that deployments using Kustomize overlays produce the same (or improved) results as the current setup.
Additional Context
Example improvements:
- Image tags and environment variables can be set per environment overlay.
- Sensitive or environment-specific data can be managed more cleanly.
- Reduces manual YAML editing and risk of misconfiguration.
Priority: Medium
Labels: enhancement, k8s, maintainability
Problem
The current
infra/k8sstructure uses hard-coded configuration values (e.g., environment, image tags, domains, resource limits) directly in the YAML manifests. This approach makes it difficult to maintain, update, and promote changes across different environments (dev, staging, prod). Manual edits are required for each environment, increasing the risk of errors and configuration drift.Proposal
Adopt Kustomize for managing Kubernetes manifests in
infra/k8s. Kustomize allows for:Acceptance Criteria
infra/k8sto use abase/directory and environment overlays (e.g.,overlays/prod/,overlays/dev/).kustomization.yamlfiles for environment-specific configuration.Additional Context
Example improvements:
Priority: Medium
Labels: enhancement, k8s, maintainability