Files
llm-automation-docs-and-rem…/deploy/kubernetes/mongodb.yaml
LLM Automation System 1ba5ce851d Initial commit: LLM Automation Docs & Remediation Engine v2.0
Features:
- Automated datacenter documentation generation
- MCP integration for device connectivity
- Auto-remediation engine with safety checks
- Multi-factor reliability scoring (0-100%)
- Human feedback learning loop
- Pattern recognition and continuous improvement
- Agentic chat support with AI
- API for ticket resolution
- Frontend React with Material-UI
- CI/CD pipelines (GitLab + Gitea)
- Docker & Kubernetes deployment
- Complete documentation and guides

v2.0 Highlights:
- Auto-remediation with write operations (disabled by default)
- Reliability calculator with 4-factor scoring
- Human feedback system for continuous learning
- Pattern-based progressive automation
- Approval workflow for critical actions
- Full audit trail and rollback capability
2025-10-17 23:47:28 +00:00

152 lines
3.7 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: mongodb
namespace: datacenter-docs
labels:
app: mongodb
spec:
ports:
- port: 27017
targetPort: 27017
name: mongodb
clusterIP: None
selector:
app: mongodb
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongodb
namespace: datacenter-docs
spec:
serviceName: mongodb
replicas: 3 # MongoDB replica set
selector:
matchLabels:
app: mongodb
template:
metadata:
labels:
app: mongodb
spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongodb
image: mongo:7.0
command:
- mongod
- "--replSet"
- "rs0"
- "--bind_ip_all"
- "--auth"
ports:
- containerPort: 27017
name: mongodb
env:
- name: MONGO_INITDB_ROOT_USERNAME
valueFrom:
secretKeyRef:
name: datacenter-secrets
key: mongodb-root-user
- name: MONGO_INITDB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: datacenter-secrets
key: mongodb-root-password
- name: MONGO_INITDB_DATABASE
value: "datacenter_docs"
volumeMounts:
- name: mongodb-data
mountPath: /data/db
- name: mongodb-config
mountPath: /data/configdb
resources:
requests:
memory: "512Mi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "2000m"
livenessProbe:
exec:
command:
- mongosh
- --eval
- "db.adminCommand('ping')"
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
exec:
command:
- mongosh
- --eval
- "db.adminCommand('ping')"
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumeClaimTemplates:
- metadata:
name: mongodb-data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: standard
resources:
requests:
storage: 20Gi
- metadata:
name: mongodb-config
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: standard
resources:
requests:
storage: 1Gi
---
# MongoDB initialization job (optional, for replica set setup)
apiVersion: batch/v1
kind: Job
metadata:
name: mongodb-init
namespace: datacenter-docs
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: init
image: mongo:7.0
command:
- /bin/bash
- -c
- |
sleep 30
mongosh --host mongodb-0.mongodb.datacenter-docs.svc.cluster.local \
--username $MONGO_ROOT_USER --password $MONGO_ROOT_PASSWORD \
--authenticationDatabase admin \
--eval '
rs.initiate({
_id: "rs0",
members: [
{ _id: 0, host: "mongodb-0.mongodb.datacenter-docs.svc.cluster.local:27017" },
{ _id: 1, host: "mongodb-1.mongodb.datacenter-docs.svc.cluster.local:27017" },
{ _id: 2, host: "mongodb-2.mongodb.datacenter-docs.svc.cluster.local:27017" }
]
})
'
env:
- name: MONGO_ROOT_USER
valueFrom:
secretKeyRef:
name: datacenter-secrets
key: mongodb-root-user
- name: MONGO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: datacenter-secrets
key: mongodb-root-password