Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- labels:
- app: rabbitmq
- name: rabbitmq
- namespace: development
- resourceVersion: "119265565"
- selfLink: /apis/apps/v1/namespaces/development/statefulsets/rabbitmq
- uid: 10c2fabc-cbb3-11e7-8821-00505695519e
- spec:
- podManagementPolicy: OrderedReady
- replicas: 3
- revisionHistoryLimit: 10
- selector:
- matchLabels:
- app: rabbitmq
- serviceName: rabbitmq
- template:
- metadata:
- creationTimestamp: null
- labels:
- app: rabbitmq
- spec:
- containers:
- - env:
- - name: RABBITMQ_ERLANG_COOKIE
- valueFrom:
- secretKeyRef:
- key: rabbitmq-erlang-cookie
- name: rabbitmq-erlang-cookie
- image: rabbitmq:1.0
- imagePullPolicy: IfNotPresent
- lifecycle:
- postStart:
- exec:
- command:
- - /bin/sh
- - -c
- - |
- if [ -z "$(grep rabbitmq /etc/resolv.conf)" ]; then
- sed "s/^search \([^ ]\+\)/search rabbitmq.\1 \1/" /etc/resolv.conf > /etc/resolv.conf.new;
- cat /etc/resolv.conf.new > /etc/resolv.conf;
- rm /etc/resolv.conf.new;
- fi; until rabbitmqctl node_health_check; do sleep 1; done; if [[ "$HOSTNAME" != "rabbitmq-0" && -z "$(rabbitmqctl cluster_status | grep rabbitmq-0)" ]]; then
- rabbitmqctl stop_app;
- rabbitmqctl join_cluster rabbit@rabbitmq-0;
- rabbitmqctl start_app;
- fi; rabbitmqctl set_policy ha-all "." '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic"}'
- name: rabbitmq
- ports:
- - containerPort: 5672
- protocol: TCP
- - containerPort: 5671
- protocol: TCP
- - containerPort: 15672
- protocol: TCP
- - containerPort: 25672
- protocol: TCP
- - containerPort: 4369
- protocol: TCP
- resources:
- limits:
- cpu: 400m
- memory: 2Gi
- requests:
- cpu: 200m
- memory: 1Gi
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- volumeMounts:
- - mountPath: /var/lib/rabbitmq
- name: rabbitmq-persistent-data-storage
- - mountPath: /etc/rabbitmq
- name: rabbitmq-config
- dnsPolicy: ClusterFirst
- restartPolicy: Always
- schedulerName: default-scheduler
- securityContext: {}
- terminationGracePeriodSeconds: 10
- volumes:
- - name: rabbitmq-config
- secret:
- defaultMode: 420
- secretName: rabbitmq-config
- updateStrategy:
- type: OnDelete
- volumeClaimTemplates:
- - metadata:
- creationTimestamp: null
- name: rabbitmq-persistent-data-storage
- spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 100Gi
- status:
- phase: Pending
- status:
- currentReplicas: 1
- currentRevision: rabbitmq-4234207235
- observedGeneration: 1
- replicas: 1
- updateRevision: rabbitmq-4234207235
Add Comment
Please, Sign In to add comment