refactor: remove hardcoded namespaces from Kubernetes manifests

- Remove namespace: adopt-a-street from all metadata sections
- Update CouchDB NODENAME to use namespace-agnostic format
- Make all manifests deployable to any namespace
- Maintain service names and selectors for functionality
- All manifests validated with kubectl dry-run

Now manifests can be deployed to any namespace using:
kubectl apply -n <namespace> -f deploy/k8s/

🤖 Generated with [AI Assistant]

Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
William Valentin
2025-11-02 01:30:46 -08:00
parent 1375c8d9cf
commit 00133d5e43
9 changed files with 1 additions and 14 deletions

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: adopt-a-street-backend
namespace: adopt-a-street
labels:
app: backend
spec:
@@ -19,7 +18,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: adopt-a-street-backend
namespace: adopt-a-street
spec:
replicas: 2
selector:

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: adopt-a-street-config
namespace: adopt-a-street
data:
# CouchDB Connection
COUCHDB_URL: "http://adopt-a-street-couchdb:5984"

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: couchdb-config
namespace: adopt-a-street
data:
10-cluster.ini: |
[cluster]

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: adopt-a-street-couchdb
namespace: adopt-a-street
labels:
app: couchdb
spec:
@@ -23,7 +22,6 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: adopt-a-street-couchdb
namespace: adopt-a-street
spec:
serviceName: adopt-a-street-couchdb
replicas: 1
@@ -70,7 +68,7 @@ spec:
name: adopt-a-street-secrets
key: COUCHDB_SECRET
- name: NODENAME
value: couchdb@0.adopt-a-street-couchdb.adopt-a-street
value: couchdb@0.adopt-a-street-couchdb
- name: ERL_FLAGS
value: "+K true +A 4"
- name: COUCHDB_SINGLE_NODE_ENABLED

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: adopt-a-street-frontend
namespace: adopt-a-street
labels:
app: frontend
spec:
@@ -19,7 +18,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: adopt-a-street-frontend
namespace: adopt-a-street
spec:
replicas: 2
selector:

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Secret
metadata:
name: regcred
namespace: adopt-a-street
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: eyJhdXRocyI6eyJnaXRlYS1odHRwLnRhaWxkYjM0OTQudHMubmV0Ijp7InVzZXJuYW1lIjoid2lsbCIsInBhc3N3b3JkIjoiW1lPVVJfR0lURUFfUEFTU1dPUkRdIiwiYXV0aCI6IltBVVRIX1RPS0VOXSJ9fX0=

View File

@@ -2,7 +2,6 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: adopt-a-street-ingress
namespace: adopt-a-street
annotations:
# Uncomment the appropriate ingress class for your cluster
kubernetes.io/ingress.class: "traefik" # For Traefik

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Service
metadata:
name: adopt-a-street-mongodb
namespace: adopt-a-street
labels:
app: mongodb
spec:
@@ -19,7 +18,6 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: adopt-a-street-mongodb
namespace: adopt-a-street
spec:
serviceName: adopt-a-street-mongodb
replicas: 1

View File

@@ -2,7 +2,6 @@ apiVersion: v1
kind: Secret
metadata:
name: adopt-a-street-secrets
namespace: adopt-a-street
type: Opaque
stringData:
# JWT Secret - CHANGE THIS IN PRODUCTION!