Commit f44b8cf8 authored by xuezj's avatar xuezj

增加yaml

parent 0c4bce7c
apiVersion: v1
kind: Service
metadata:
name: mongodb
namespace: test1
labels:
qcloud-app: mongodb
type: base
spec:
type: NodePort
ports:
- port: 27017
targetPort: 27017
selector:
qcloud-app: mongodb
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: mongodb
namespace: test1
labels:
qcloud-app: mongodb
spec:
serviceName: mongodb
replicas: 1
revisionHistoryLimit: 1
template:
metadata:
labels:
qcloud-app: mongodb
spec:
terminationGracePeriodSeconds: 10
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
containers:
- name: mongodb
image: ccr.ccs.tencentyun.com/qa-base/mongodb:3.6
ports:
- containerPort: 27017
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: qa
- name: MONGO_INITDB_ROOT_PASSWORD
value: qatest
volumeMounts:
- name: mongodb-ps
mountPath: /data/db
volumeClaimTemplates: # 自动创建pvc,进而自动创建pv
- metadata:
name: mongodb-ps
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: cbs
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: redis
type: base
name: redis
spec:
replicas: 1
revisionHistoryLimit: 3
strategy: {}
template:
metadata:
labels:
app: redis
tier: common
spec:
containers:
- image: 192.168.4.4/common/redis:multiport
name: redis
# resources:
# limits:
# memory: 256Mi
# requests:
# memory: 64Mi
ports:
- containerPort: 6379
- containerPort: 6380
- containerPort: 6381
- containerPort: 6382
- containerPort: 6383
restartPolicy: Always
status: {}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
qcloud-app: rabbitmq
name: rabbitmq
namespace: test1
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
qcloud-app: rabbitmq
strategy:
type: Recreate
template:
metadata:
labels:
qcloud-app: rabbitmq
spec:
containers:
- image: ccr.ccs.tencentyun.com/qa-base/rabbitmq:3.6
imagePullPolicy: Always
name: rabbitmq
resources:
requests:
memory: 100Mi
cpu: 100m
limits:
memory: 500Mi
cpu: 500m
securityContext:
privileged: false
terminationMessagePath: /dev/termination-log
env:
- name: RABBITMQ_DEFAULT_USER
value: qa
- name: RABBITMQ_DEFAULT_PASS
value: qatest
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
restartPolicy: Always
terminationGracePeriodSeconds: 30
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
type: base
qcloud-app: rabbitmq
name: rabbitmq
namespace: test1
spec:
type: NodePort
ports:
- name: tcp-5672-5672
nodePort: 0
port: 5672
protocol: TCP
targetPort: 5672
- name: tcp-15672-15672
nodePort: 0
port: 15672
protocol: TCP
targetPort: 15672
selector:
qcloud-app: rabbitmq
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
qcloud-app: redis
name: redis
namespace: {{namespace}}
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
qcloud-app: redis
strategy:
type: Recreate
template:
metadata:
labels:
qcloud-app: redis
spec:
containers:
- image: ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy: Always
name: redis
resources:
requests:
memory: 40Mi
cpu: 100m
limits:
memory: 128Mi
cpu: 500m
securityContext:
privileged: false
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
restartPolicy: Always
terminationGracePeriodSeconds: 30
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
type: base
qcloud-app: redis
name: redis
namespace: {{namespace}}
spec:
type: NodePort
ports:
- name: tcp-6379-6379
nodePort: 0
port: 6379
protocol: TCP
targetPort: 6379
- name: tcp-6380-6380
nodePort: 0
port: 6380
protocol: TCP
targetPort: 6380
- name: tcp-6381-6381
nodePort: 0
port: 6381
protocol: TCP
targetPort: 6381
- name: tcp-6382-6382
nodePort: 0
port: 6382
protocol: TCP
targetPort: 6382
- name: tcp-6383-6383
nodePort: 0
port: 6383
protocol: TCP
targetPort: 6383
selector:
qcloud-app: redis
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
qcloud-app: zookeeper
name: zookeeper
namespace: {{namespace}}
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
qcloud-app: zookeeper
strategy:
type: Recreate
template:
metadata:
labels:
qcloud-app: zookeeper
spec:
containers:
- image: ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy: Always
name: zookeeper
resources:
requests:
memory: 40Mi
cpu: 100m
limits:
memory: 128Mi
cpu: 500m
securityContext:
privileged: false
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
restartPolicy: Always
terminationGracePeriodSeconds: 30
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
type: base
qcloud-app: zookeeper
name: zookeeper
namespace: {{namespace}}
spec:
type: NodePort
ports:
- name: tcp-2181-2181
nodePort: 0
port: 2181
protocol: TCP
targetPort: 2181
- name: tcp-9090-9090
nodePort: 0
port: 9090
protocol: TCP
targetPort: 9090
selector:
qcloud-app: zookeeper
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