Commit 2c0a7949 authored by xuezj's avatar xuezj

新增 op monogo服务

parent 7995fe80
# 存放运营系统需要的数据,以前是在4.50
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-mongo-default
namespace: default
spec:
storageClassName: cbs
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
qcloud-app: mongodb
name: mongodb
namespace: default
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
qcloud-app: mongodb
strategy:
type: Recreate
template:
metadata:
labels:
qcloud-app: mongodb
spec:
containers:
- image: ccr.ccs.tencentyun.com/qa-base/mongodb:3.6
imagePullPolicy: IfNotPresent
name: mongodb
resources:
requests:
memory: 256Mi
cpu: 250m
limits:
memory: 1024Mi
cpu: 500m
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: qa
- name: MONGO_INITDB_ROOT_PASSWORD
value: qatest
volumeMounts:
- mountPath: "/data/db"
name: db
volumes:
- name: db
persistentVolumeClaim:
claimName: pvc-mongo-default
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
restartPolicy: Always
terminationGracePeriodSeconds: 30
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
type: base
qcloud-app: mongodb
name: mongodb
namespace: default
spec:
type: NodePort
ports:
- name: "27017"
nodePort: 30017
port: 27017
protocol: TCP
targetPort: 27017
selector:
qcloud-app: mongodb
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: mongodb.test1
namespace: test1
spec:
rules:
- host: mongodb-test1.liangkebang.net
http:
paths:
- path: /
backend:
serviceName: mongodb
servicePort: 27017
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment