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:
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-backend
|
name: adopt-a-street-backend
|
||||||
namespace: adopt-a-street
|
|
||||||
labels:
|
labels:
|
||||||
app: backend
|
app: backend
|
||||||
spec:
|
spec:
|
||||||
@@ -19,7 +18,6 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-backend
|
name: adopt-a-street-backend
|
||||||
namespace: adopt-a-street
|
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-config
|
name: adopt-a-street-config
|
||||||
namespace: adopt-a-street
|
|
||||||
data:
|
data:
|
||||||
# CouchDB Connection
|
# CouchDB Connection
|
||||||
COUCHDB_URL: "http://adopt-a-street-couchdb:5984"
|
COUCHDB_URL: "http://adopt-a-street-couchdb:5984"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: couchdb-config
|
name: couchdb-config
|
||||||
namespace: adopt-a-street
|
|
||||||
data:
|
data:
|
||||||
10-cluster.ini: |
|
10-cluster.ini: |
|
||||||
[cluster]
|
[cluster]
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-couchdb
|
name: adopt-a-street-couchdb
|
||||||
namespace: adopt-a-street
|
|
||||||
labels:
|
labels:
|
||||||
app: couchdb
|
app: couchdb
|
||||||
spec:
|
spec:
|
||||||
@@ -23,7 +22,6 @@ apiVersion: apps/v1
|
|||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-couchdb
|
name: adopt-a-street-couchdb
|
||||||
namespace: adopt-a-street
|
|
||||||
spec:
|
spec:
|
||||||
serviceName: adopt-a-street-couchdb
|
serviceName: adopt-a-street-couchdb
|
||||||
replicas: 1
|
replicas: 1
|
||||||
@@ -70,7 +68,7 @@ spec:
|
|||||||
name: adopt-a-street-secrets
|
name: adopt-a-street-secrets
|
||||||
key: COUCHDB_SECRET
|
key: COUCHDB_SECRET
|
||||||
- name: NODENAME
|
- name: NODENAME
|
||||||
value: couchdb@0.adopt-a-street-couchdb.adopt-a-street
|
value: couchdb@0.adopt-a-street-couchdb
|
||||||
- name: ERL_FLAGS
|
- name: ERL_FLAGS
|
||||||
value: "+K true +A 4"
|
value: "+K true +A 4"
|
||||||
- name: COUCHDB_SINGLE_NODE_ENABLED
|
- name: COUCHDB_SINGLE_NODE_ENABLED
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-frontend
|
name: adopt-a-street-frontend
|
||||||
namespace: adopt-a-street
|
|
||||||
labels:
|
labels:
|
||||||
app: frontend
|
app: frontend
|
||||||
spec:
|
spec:
|
||||||
@@ -19,7 +18,6 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-frontend
|
name: adopt-a-street-frontend
|
||||||
namespace: adopt-a-street
|
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: regcred
|
name: regcred
|
||||||
namespace: adopt-a-street
|
|
||||||
type: kubernetes.io/dockerconfigjson
|
type: kubernetes.io/dockerconfigjson
|
||||||
data:
|
data:
|
||||||
.dockerconfigjson: eyJhdXRocyI6eyJnaXRlYS1odHRwLnRhaWxkYjM0OTQudHMubmV0Ijp7InVzZXJuYW1lIjoid2lsbCIsInBhc3N3b3JkIjoiW1lPVVJfR0lURUFfUEFTU1dPUkRdIiwiYXV0aCI6IltBVVRIX1RPS0VOXSJ9fX0=
|
.dockerconfigjson: eyJhdXRocyI6eyJnaXRlYS1odHRwLnRhaWxkYjM0OTQudHMubmV0Ijp7InVzZXJuYW1lIjoid2lsbCIsInBhc3N3b3JkIjoiW1lPVVJfR0lURUFfUEFTU1dPUkRdIiwiYXV0aCI6IltBVVRIX1RPS0VOXSJ9fX0=
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-ingress
|
name: adopt-a-street-ingress
|
||||||
namespace: adopt-a-street
|
|
||||||
annotations:
|
annotations:
|
||||||
# Uncomment the appropriate ingress class for your cluster
|
# Uncomment the appropriate ingress class for your cluster
|
||||||
kubernetes.io/ingress.class: "traefik" # For Traefik
|
kubernetes.io/ingress.class: "traefik" # For Traefik
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-mongodb
|
name: adopt-a-street-mongodb
|
||||||
namespace: adopt-a-street
|
|
||||||
labels:
|
labels:
|
||||||
app: mongodb
|
app: mongodb
|
||||||
spec:
|
spec:
|
||||||
@@ -19,7 +18,6 @@ apiVersion: apps/v1
|
|||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-mongodb
|
name: adopt-a-street-mongodb
|
||||||
namespace: adopt-a-street
|
|
||||||
spec:
|
spec:
|
||||||
serviceName: adopt-a-street-mongodb
|
serviceName: adopt-a-street-mongodb
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: v1
|
|||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: adopt-a-street-secrets
|
name: adopt-a-street-secrets
|
||||||
namespace: adopt-a-street
|
|
||||||
type: Opaque
|
type: Opaque
|
||||||
stringData:
|
stringData:
|
||||||
# JWT Secret - CHANGE THIS IN PRODUCTION!
|
# JWT Secret - CHANGE THIS IN PRODUCTION!
|
||||||
|
|||||||
Reference in New Issue
Block a user