mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-03 18:32:19 +00:00
refactor: Remove MongoDB Kubernetes deployment configuration
- Remove mongodb ConfigMap with MONGO_INITDB_DATABASE configuration - Remove mongodb Secret with root username/password credentials - Remove mongodb PersistentVolumeClaim with 10Gi storage allocation - Remove mongodb Deployment with mongo:7.0 image, resource limits, and persistent volume mount - Remove mongodb ClusterIP Service exposing port 27017
This commit is contained in:
@@ -1,93 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: mongodb-config
|
|
||||||
namespace: taas-platform
|
|
||||||
data:
|
|
||||||
MONGO_INITDB_DATABASE: "free5gc"
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: mongodb-secret
|
|
||||||
namespace: taas-platform
|
|
||||||
type: Opaque
|
|
||||||
stringData:
|
|
||||||
MONGO_INITDB_ROOT_USERNAME: "admin"
|
|
||||||
MONGO_INITDB_ROOT_PASSWORD: "changeme-in-production"
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: mongodb-pvc
|
|
||||||
namespace: taas-platform
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: mongodb
|
|
||||||
namespace: taas-platform
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: mongodb
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: mongodb
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: mongodb
|
|
||||||
image: mongo:7.0
|
|
||||||
ports:
|
|
||||||
- containerPort: 27017
|
|
||||||
env:
|
|
||||||
- name: MONGO_INITDB_ROOT_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: mongodb-secret
|
|
||||||
key: MONGO_INITDB_ROOT_USERNAME
|
|
||||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: mongodb-secret
|
|
||||||
key: MONGO_INITDB_ROOT_PASSWORD
|
|
||||||
- name: MONGO_INITDB_DATABASE
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: mongodb-config
|
|
||||||
key: MONGO_INITDB_DATABASE
|
|
||||||
volumeMounts:
|
|
||||||
- name: mongodb-storage
|
|
||||||
mountPath: /data/db
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "512Mi"
|
|
||||||
cpu: "250m"
|
|
||||||
limits:
|
|
||||||
memory: "2Gi"
|
|
||||||
cpu: "1000m"
|
|
||||||
volumes:
|
|
||||||
- name: mongodb-storage
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: mongodb-pvc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: mongodb
|
|
||||||
namespace: taas-platform
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: mongodb
|
|
||||||
ports:
|
|
||||||
- port: 27017
|
|
||||||
targetPort: 27017
|
|
||||||
type: ClusterIP
|
|
||||||
Reference in New Issue
Block a user