Add dev/stg/prod environments with per-env values, configmaps and secrets

- Move env-specific config into environments/<env>/{values,configmap,secret}.yaml
  for both nginx-chart and mysql-chart (dev, stg, prod)
- Make templates env-agnostic: resource names come from values
  (configMap.name, secret.name)
- nginx deployment mounts env ConfigMap and loads env Secret via envFrom
- mysql statefulset reads DB config from ConfigMap, passwords from Secret
- Remove mysql-chart/templates/secret.yaml (secrets are now per-env manifests)
- Add README with layout and deploy commands
This commit is contained in:
mdsamsulhaque
2026-11-04 06:43:05 +06:00
parent dfca9ba4ae
commit bbf501269d
24 changed files with 491 additions and 25 deletions
+31
View File
@@ -0,0 +1,31 @@
# ---------------------------------------------------------------------------
# Registry pull secret used by the nginx Deployment (imagePullSecrets).
# Replace the credentials with the real registry values, or regenerate with:
# kubectl create secret docker-registry harbor-secret \
# --docker-server=imageregistry.gen-itech.com \
# --docker-username=demo --docker-password=demo123 \
# -n prod --dry-run=client -o yaml
# ---------------------------------------------------------------------------
apiVersion: v1
kind: Secret
metadata:
name: harbor-secret
namespace: prod
type: kubernetes.io/dockerconfigjson
stringData:
.dockerconfigjson: |
{"auths":{"imageregistry.gen-itech.com":{"username":"demo","password":"demo123","auth":"ZGVtbzpkZW1vMTIz"}}}
---
# ---------------------------------------------------------------------------
# Application secret for the nginx container (loaded via envFrom).
# ---------------------------------------------------------------------------
apiVersion: v1
kind: Secret
metadata:
name: nginx-secret-prod
namespace: prod
type: Opaque
stringData:
APP_ENV: prod
APP_SECRET: change-me-prod