openstack-operator/openstack_operator/templates/rabbitmq/deployment.yml.j2
okozachenko 8f1e4c7e81 Remove resource quota from rabbitmq
Change-Id: I8e29f01492cb6c767bafab6d5dbc26dfb6b8ede1
2020-07-13 17:38:18 +03:00

79 lines
2.2 KiB
Django/Jinja

---
# Copyright 2020 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: rabbitmq-{{ name }}
labels:
{{ labels("rabbitmq", name) | indent(4) }}
spec:
replicas: 1
selector:
matchLabels:
{{ labels("rabbitmq", name) | indent(6) }}
template:
metadata:
labels:
{{ labels("rabbitmq", name) | indent(8) }}
spec:
containers:
- name: rabbitmq
env:
- name: RABBITMQ_DEFAULT_USER
valueFrom:
secretKeyRef:
key: username
name: {{ spec.authSecret }}
- name: RABBITMQ_DEFAULT_PASS
valueFrom:
secretKeyRef:
key: password
name: {{ spec.authSecret }}
image: vexxhost/rabbitmq:latest
imagePullPolicy: Always
ports:
- name: rabbitmq
protocol: TCP
containerPort: 5672
- name: metrics
protocol: TCP
containerPort: 15692
livenessProbe:
tcpSocket:
port: rabbitmq
failureThreshold: 3
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
tcpSocket:
port: rabbitmq
failureThreshold: 3
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 1
securityContext:
runAsUser: 999
runAsGroup: 999
{% if 'nodeSelector' in spec %}
nodeSelector:
{{ spec.nodeSelector | to_yaml | indent(8) }}
{% endif %}
{% if 'tolerations' in spec %}
tolerations:
{{ spec.tolerations | to_yaml | indent(8) }}
{% endif %}