Commit 5ef02f74 authored by xuezj's avatar xuezj

增加rabbitmq pvc 测试用例

parent 9df92e48
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-rabbitmq-db
namespace: test1
spec:
storageClassName: cbs
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
......@@ -18,9 +33,10 @@ spec:
labels:
qcloud-app: rabbitmq
spec:
hostname: rabbitmq-test1
containers:
- image: ccr.ccs.tencentyun.com/qa-base/rabbitmq:3.6
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
name: rabbitmq
resources:
requests:
......@@ -29,15 +45,19 @@ spec:
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
- name: RABBITMQ_DEFAULT_USER
value: qa
- name: RABBITMQ_DEFAULT_PASS
value: qatest
# 数据持久化
volumeMounts:
- name: db
mountPath: "/var/lib/rabbitmq"
volumes:
- name: db
persistentVolumeClaim:
claimName: pvc-rabbitmq-db
imagePullSecrets:
- name: qcloudregistrykey
- name: tencenthubkey
......@@ -56,6 +76,10 @@ metadata:
namespace: test1
spec:
type: NodePort
# 保留客户端源 IP 地址, 方便调试连接
externalTrafficPolicy: Local
selector:
qcloud-app: rabbitmq
ports:
- name: tcp-5672-5672
nodePort: 0
......@@ -67,6 +91,5 @@ spec:
port: 15672
protocol: TCP
targetPort: 15672
selector:
qcloud-app: rabbitmq
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