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