Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,59 @@ metadata:
data:
settings_local.py: |-
{{- .Files.Get "settings_local.py" | indent 4 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: rabbitmq-configmap
data:
definitions.json: |-
{
"permissions": [
{
"configure": ".*",
"read": ".*",
"user": "datatracker",
"vhost": "dt",
"write": ".*"
}
],
"users": [
{
"hashing_algorithm": "rabbit_password_hashing_sha256",
"limits": {},
"name": "datatracker",
"password_hash": "HJxcItcpXtBN+R/CH7dUelfKBOvdUs3AWo82SBw2yLMSguzb",
"tags": []
}
],
"vhosts": [
{
"limits": [],
"metadata": {
"description": "",
"tags": []
},
"name": "dt"
}
]
}
rabbitmq.conf: |-
# prevent guest from logging in over tcp
loopback_users.guest = true

# load saved definitions
load_definitions = /etc/rabbitmq/definitions.json

# Ensure that enough disk is available to flush to disk. To do this, need to limit the
# memory available to the container to something reasonable. See
# https://www.rabbitmq.com/production-checklist.html#monitoring-and-resource-usage
# for recommendations.

# 1-1.5 times the memory available to the container is adequate for disk limit
disk_free_limit.absolute = 6000MB

# This should be ~40% of the memory available to the container. Use an
# absolute number because relative will be proprtional to the full machine
# memory.
vm_memory_high_watermark.absolute = 1600MB
20 changes: 20 additions & 0 deletions helm/templates/services/rabbitmq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: rabbitmq
labels: {{- include "datatracker.labels" . | nindent 4 }}
{{- with .Values.rabbitmq.service.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
type: {{.Values.rabbitmq.service.type}}
clusterIP: None # headless service
ports:
- port: {{ default "5672" .Values.rabbitmq.service.port}}
targetPort: amqp
protocol: TCP
name: amqp
selector: {{- include "datatracker.selectorLabels" . | nindent 4}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "datatracker.rabbitmq.fullname" . }}
labels:
Expand Down Expand Up @@ -41,8 +41,8 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8000
- name: amqp
containerPort: 5672
protocol: TCP
livenessProbe:
{{- toYaml $podValues.livenessProbe | nindent 12 }}
Expand Down
18 changes: 12 additions & 6 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,11 @@ beat:
# -------------------------------------------------------------

rabbitmq:
name: rabbitmq
name: "rabbitmq"
image:
repository: "ghcr.io/ietf-tools/datatracker-mq"
repository: "rabbitmq"
pullPolicy: IfNotPresent
tag: "latest"
tag: "3.13"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -433,7 +433,7 @@ rabbitmq:

service:
type: ClusterIP
port: 80
port: 5672

serviceAccount:
# Specifies whether a service account should be created
Expand All @@ -456,14 +456,19 @@ rabbitmq:
command: ["rabbitmq-diagnostics", "-q", "ping"]

# Additional volumes on the output Deployment definition.
volumes: []
volumes:
- name: "rabbitmq-config"
configMap:
name: "rabbitmq-configmap"
# - name: foo
# secret:
# secretName: mysecret
# optional: false

# Additional volumeMounts on the output Deployment definition.
volumeMounts: []
volumeMounts:
- name: "rabbitmq-config"
mountPath: "/etc/rabbitmq"
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true
Expand Down Expand Up @@ -557,3 +562,4 @@ env:
DBUSER: "django"
DBPASS: "RkTkDPFnKpko"
DJANGO_SECRET_KEY: "PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHk"
CELERY_BROKER_URL: "amqp://datatracker:frog@rabbitmq/dt"