Skip to content

Commit

Permalink
feat: add default action result queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ambersun1234 committed Dec 16, 2024
1 parent 9b1fa53 commit c7e0fd1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
33 changes: 33 additions & 0 deletions charts/agh3/templates/base/rabbitmq-secret.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,39 @@ stringData:
) }}
username: {{ .Values.rabbitmq.connection.user }}
password: {{ print $password | quote }}
load_definition.json: |
{
"users": [
{
"name": "{{ .Values.rabbitmq.connection.user }}",
"password": {{ print $password | quote }},
"tags": "administrator"
}
],
"queues":[
{
"name": "{{ .Values.rabbitmq.queueName }}",
"vhost":"/",
"durable":true,
"auto_delete":false,
"arguments":{}
}
],
"vhosts": [
{
"name": "/"
}
],
"permissions": [
{
"user": "{{ .Values.rabbitmq.connection.user }}",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
}
]
}
uri: {{ include "rabbitmq-connection-string"
(
dict
Expand Down
2 changes: 2 additions & 0 deletions charts/agh3/templates/captain/captain-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ spec:
secretKeyRef:
name: {{ .Values.captain.secret.minio.secretName }}
key: capt-minio-password
- name: RABBITMQ_QUEUE
value: {{ .Values.rabbitmq.queueName }}
- name: RABBITMQ_Conn
valueFrom:
secretKeyRef:
Expand Down
10 changes: 2 additions & 8 deletions charts/agh3/templates/controller/controller-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ spec:
secretKeyRef:
name: {{ .Values.controller.secret.minio.secretName }}
key: executor-minio-password
- name: RABBITMQ_QUEUE
value: {{ .Values.rabbitmq.queueName }}
- name: RABBITMQ_Conn
valueFrom:
secretKeyRef:
Expand All @@ -78,14 +80,6 @@ spec:
{{- if .Values.controller.extraEnv }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraEnv "context" $) | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /mq_health_check
port: 9050
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 10
failureThreshold: 3
resources:
requests:
memory: "256Mi"
Expand Down
5 changes: 5 additions & 0 deletions charts/agh3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ redis:
## @section RabbitMQ parameters
##
rabbitmq:
## @param rabbitmq.queueName Name of the RabbitMQ queue
queueName: action_crd_result
loadDefinition:
enabled: true
existingSecret: agh-rabbitmq-secret
connection:
## @param rabbitmq.connection.type Choose to use external RabbitMQ or internal RabbitMQ
## internal` or `external` in string
Expand Down

0 comments on commit c7e0fd1

Please sign in to comment.