Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5b73dfe
Initial implementation of rabbitmq pool
pcapriotti Nov 5, 2024
6944182
Set and unset inner channel
pcapriotti Nov 6, 2024
bfc07cf
Integrate rabbitmq pool into cannon
pcapriotti Nov 6, 2024
fc96360
Add rabbitmq channel finaliser
pcapriotti Nov 7, 2024
1049f36
Create connections when necessary
pcapriotti Nov 8, 2024
32c6fcd
Add rabbitmq options to cannon
pcapriotti Nov 11, 2024
44279aa
Use Codensity in event tests
pcapriotti Nov 18, 2024
0316b09
Refactor web socket test code
pcapriotti Nov 18, 2024
9cc5aef
Fix connection pool deadlock
pcapriotti Nov 11, 2024
3a187bf
Replace TChan with MVar
pcapriotti Nov 18, 2024
4fb3cd5
introduce EventWebSocket
stefanwire Nov 18, 2024
517989d
Fix channel limit test
pcapriotti Nov 21, 2024
1398d6b
Fix potential channel leak
pcapriotti Nov 20, 2024
0f0bc53
Minor cleanups
pcapriotti Nov 21, 2024
80c8d3c
Remove websocket read thread
pcapriotti Nov 21, 2024
5a951e0
Catch AsyncCancelled when RabbitMQ channel is closed
stefanwire Nov 21, 2024
b3acc81
Remove more spurious logs
pcapriotti Nov 22, 2024
8a1a30e
Keep track of channels in ConnectionPool
stefanwire Nov 22, 2024
932f0ba
Implement connection pool draining
pcapriotti Nov 22, 2024
7be78ad
Validate rabbitmq pool options
pcapriotti Nov 22, 2024
1b9d71a
Add CHANGELOG entry
pcapriotti Nov 22, 2024
dfe553a
Regenerate nix packages
pcapriotti Nov 25, 2024
8dd651a
Rename connectionLimit → numDictSlices
pcapriotti Nov 25, 2024
11b0326
Fix connection creation bracket
pcapriotti Nov 25, 2024
56e26e1
Remove unnecessary type annotation
pcapriotti Nov 25, 2024
ba6528f
Replace explicit `async` with `concurrently`
pcapriotti Nov 25, 2024
79fb211
Add rabbitmq username and password to cannon env
pcapriotti Nov 25, 2024
32bc290
Fix rabbitmq CA secret in cannon
pcapriotti Nov 26, 2024
564d10b
fixup! Fix rabbitmq CA secret in cannon
pcapriotti Nov 26, 2024
0747ac1
Remove unnecessary uses of withModifiedBackend
pcapriotti Nov 25, 2024
b9e2fc1
Add rabbit-mq mount for cannon in integration
pcapriotti Nov 27, 2024
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
1 change: 1 addition & 0 deletions changelog.d/5-internal/cannon-rabbitmq-pool
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Introduce RabbitMQ connection pool in cannon
2 changes: 1 addition & 1 deletion charts/cannon/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data:
enableTls: {{ .enableTls }}
insecureSkipVerifyTls: {{ .insecureSkipVerifyTls }}
{{- if .tlsCaSecretRef }}
caCert: /etc/wire/gundeck/rabbitmq-ca/{{ .tlsCaSecretRef.key }}
caCert: /etc/wire/cannon/rabbitmq-ca/{{ .tlsCaSecretRef.key }}
{{- end }}
{{- end }}

Expand Down
14 changes: 14 additions & 0 deletions charts/cannon/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Secret
metadata:
name: cannon
labels:
app: cannon
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
rabbitmqUsername: {{ .Values.secrets.rabbitmq.username | b64enc | quote }}
rabbitmqPassword: {{ .Values.secrets.rabbitmq.password | b64enc | quote }}

20 changes: 20 additions & 0 deletions charts/cannon/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ spec:
{{ toYaml .Values.resources | indent 12 }}
{{- end }}
- name: cannon
env:
- name: RABBITMQ_USERNAME
valueFrom:
secretKeyRef:
name: cannon
key: rabbitmqUsername
- name: RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: cannon
key: rabbitmqPassword
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- if eq (include "includeSecurityContext" .) "true" }}
securityContext:
Expand All @@ -102,6 +113,10 @@ spec:
mountPath: /etc/wire/cannon/externalHost
- name: cannon-config
mountPath: /etc/wire/cannon/conf
{{- if .Values.config.rabbitmq.tlsCaSecretRef }}
- name: rabbitmq-ca
mountPath: "/etc/wire/cannon/rabbitmq-ca/"
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.internalPort }}
Expand Down Expand Up @@ -155,3 +170,8 @@ spec:
secret:
secretName: {{ .Values.service.nginz.tls.secretName }}
{{- end }}
{{- if .Values.config.rabbitmq.tlsCaSecretRef }}
- name: rabbitmq-ca
secret:
secretName: {{ .Values.config.rabbitmq.tlsCaSecretRef.name }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/integration/templates/integration-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ spec:
- name: rabbitmq-ca
mountPath: /etc/wire/gundeck/rabbitmq-ca

- name: rabbitmq-ca
mountPath: /etc/wire/cannon/rabbitmq-ca

{{- if eq (include "useCassandraTLS" .Values.config) "true" }}
- name: "integration-cassandra"
mountPath: "/certs"
Expand Down
Loading