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
|
name: karin
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: karin
|
name: karin
|
||||||
|
- secretRef:
|
||||||
|
name: mongodb
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,57 @@
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: mongodb-service
|
name: mongo
|
||||||
labels:
|
labels:
|
||||||
name: mongo
|
app: mongo
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 27017
|
- port: 27017
|
||||||
targetPort: 27017
|
name: mongodb
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
selector:
|
selector:
|
||||||
role: mongo
|
app: mongo
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: mongod
|
name: mongo
|
||||||
spec:
|
spec:
|
||||||
serviceName: mongodb-service
|
serviceName: mongo
|
||||||
replicas: 1
|
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
role: mongo
|
app: mongo
|
||||||
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
role: mongo
|
app: mongo
|
||||||
environment: test
|
|
||||||
replicaset: MainRepSet
|
|
||||||
spec:
|
spec:
|
||||||
terminationGracePeriodSeconds: 10
|
|
||||||
containers:
|
containers:
|
||||||
- name: mongod-container
|
- name: mongo
|
||||||
image: mongo
|
image: mongo:latest
|
||||||
command:
|
command:
|
||||||
- "mongod"
|
- "mongod"
|
||||||
- "--bind_ip"
|
- "--bind_ip"
|
||||||
- "0.0.0.0"
|
- "0.0.0.0"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
limits:
|
||||||
cpu: 0.2
|
cpu: 400m
|
||||||
memory: 200Mi
|
memory: 200M
|
||||||
limits:
|
ports:
|
||||||
cpu: 0.3
|
- containerPort: 27017
|
||||||
memory: 300Mi
|
volumeMounts:
|
||||||
ports:
|
- name: mongodb-data
|
||||||
- containerPort: 27017
|
mountPath: /data/db
|
||||||
volumeMounts:
|
envFrom:
|
||||||
- name: mongodb-persistent-storage-claim
|
- secretRef:
|
||||||
mountPath: /data/db
|
name: mongodb
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
- metadata:
|
- metadata:
|
||||||
name: mongodb-persistent-storage-claim
|
name: mongodb-data
|
||||||
annotations:
|
|
||||||
volume.beta.kubernetes.io/storage-class: "standard"
|
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ "ReadWriteOnce" ]
|
accessModes: [ "ReadWriteOnce" ]
|
||||||
|
storageClassName: "standard"
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 100Mi
|
storage: 100M
|
||||||
Loading…
Add table
Add a link
Reference in a new issue