mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
more
This commit is contained in:
parent
68768a3e7c
commit
bbac1a47d6
2 changed files with 32 additions and 35 deletions
|
|
@ -20,6 +20,8 @@ spec:
|
|||
name: karin
|
||||
- secretRef:
|
||||
name: karin
|
||||
- secretRef:
|
||||
name: mongodb
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
|
|
|
|||
|
|
@ -1,62 +1,57 @@
|
|||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongodb-service
|
||||
name: mongo
|
||||
labels:
|
||||
name: mongo
|
||||
app: mongo
|
||||
spec:
|
||||
ports:
|
||||
- port: 27017
|
||||
targetPort: 27017
|
||||
name: mongodb
|
||||
clusterIP: None
|
||||
selector:
|
||||
role: mongo
|
||||
app: mongo
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mongod
|
||||
name: mongo
|
||||
spec:
|
||||
serviceName: mongodb-service
|
||||
replicas: 1
|
||||
serviceName: mongo
|
||||
selector:
|
||||
matchLabels:
|
||||
role: mongo
|
||||
app: mongo
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: mongo
|
||||
environment: test
|
||||
replicaset: MainRepSet
|
||||
app: mongo
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: mongod-container
|
||||
image: mongo
|
||||
command:
|
||||
- "mongod"
|
||||
- "--bind_ip"
|
||||
- "0.0.0.0"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.2
|
||||
memory: 200Mi
|
||||
limits:
|
||||
cpu: 0.3
|
||||
memory: 300Mi
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongodb-persistent-storage-claim
|
||||
mountPath: /data/db
|
||||
- name: mongo
|
||||
image: mongo:latest
|
||||
command:
|
||||
- "mongod"
|
||||
- "--bind_ip"
|
||||
- "0.0.0.0"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 400m
|
||||
memory: 200M
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongodb-data
|
||||
mountPath: /data/db
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: mongodb
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mongodb-persistent-storage-claim
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: "standard"
|
||||
name: mongodb-data
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
storageClassName: "standard"
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
storage: 100M
|
||||
Loading…
Add table
Add a link
Reference in a new issue