FMN: add Matrix pod
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
a1019b0e4a
commit
301902bed8
3 changed files with 115 additions and 0 deletions
|
@ -21,3 +21,5 @@ items:
|
||||||
{{ load_file('sender-email.toml') | indent(6) }}
|
{{ load_file('sender-email.toml') | indent(6) }}
|
||||||
sender-irc.toml: |-
|
sender-irc.toml: |-
|
||||||
{{ load_file('sender-irc.toml') | indent(6) }}
|
{{ load_file('sender-irc.toml') | indent(6) }}
|
||||||
|
sender-matrix.toml: |-
|
||||||
|
{{ load_file('sender-matrix.toml') | indent(6) }}
|
||||||
|
|
|
@ -411,6 +411,71 @@ spec:
|
||||||
---
|
---
|
||||||
apiVersion: apps.openshift.io/v1
|
apiVersion: apps.openshift.io/v1
|
||||||
kind: DeploymentConfig
|
kind: DeploymentConfig
|
||||||
|
metadata:
|
||||||
|
name: sender-matrix
|
||||||
|
labels:
|
||||||
|
app: fmn
|
||||||
|
spec:
|
||||||
|
# Not sure how many concurrent connections are supported by Matrix with the
|
||||||
|
# same token. Let's just have one for now.
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
app: fmn
|
||||||
|
deploymentconfig: sender-matrix
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
app: fmn
|
||||||
|
deploymentconfig: sender-matrix
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sender-matrix
|
||||||
|
imagePullPolicy: Always
|
||||||
|
volumeMounts:
|
||||||
|
- name: etc-fmn
|
||||||
|
mountPath: "/etc/fmn"
|
||||||
|
readOnly: true
|
||||||
|
- name: fedora-messaging-ca-volume
|
||||||
|
mountPath: /etc/pki/fedora-messaging/ca
|
||||||
|
readOnly: true
|
||||||
|
- name: fedora-messaging-key-volume
|
||||||
|
mountPath: /etc/pki/fedora-messaging/key
|
||||||
|
readOnly: true
|
||||||
|
- name: fedora-messaging-crt-volume
|
||||||
|
mountPath: /etc/pki/fedora-messaging/crt
|
||||||
|
readOnly: true
|
||||||
|
env:
|
||||||
|
- name: APP_SCRIPT
|
||||||
|
value: ".s2i/run-sender-matrix.sh"
|
||||||
|
volumes:
|
||||||
|
- name: etc-fmn
|
||||||
|
configMap:
|
||||||
|
name: fmn
|
||||||
|
- name: fedora-messaging-ca-volume
|
||||||
|
secret:
|
||||||
|
secretName: fedora-messaging-ca
|
||||||
|
- name: fedora-messaging-key-volume
|
||||||
|
secret:
|
||||||
|
secretName: fedora-messaging-key
|
||||||
|
- name: fedora-messaging-crt-volume
|
||||||
|
secret:
|
||||||
|
secretName: fedora-messaging-crt
|
||||||
|
triggers:
|
||||||
|
- type: ConfigChange
|
||||||
|
- type: ImageChange
|
||||||
|
imageChangeParams:
|
||||||
|
automatic: true
|
||||||
|
containerNames:
|
||||||
|
- sender-matrix
|
||||||
|
from:
|
||||||
|
kind: ImageStreamTag
|
||||||
|
name: fmn:latest
|
||||||
|
---
|
||||||
|
apiVersion: apps.openshift.io/v1
|
||||||
|
kind: DeploymentConfig
|
||||||
metadata:
|
metadata:
|
||||||
name: redis
|
name: redis
|
||||||
labels:
|
labels:
|
||||||
|
|
48
roles/openshift-apps/fmn/templates/sender-matrix.toml
Normal file
48
roles/openshift-apps/fmn/templates/sender-matrix.toml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# A sample configuration for the FMN sender. This file is in the TOML format.
|
||||||
|
|
||||||
|
amqp_url = "amqps://fmn{{ env_suffix }}:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Ffmn"
|
||||||
|
queue = "matrix"
|
||||||
|
|
||||||
|
[tls]
|
||||||
|
ca_cert = "/etc/pki/fedora-messaging/ca/cacert.pem"
|
||||||
|
certfile = "/etc/pki/fedora-messaging/crt/fmn-cert.pem"
|
||||||
|
keyfile = "/etc/pki/fedora-messaging/key/fmn-key.pem"
|
||||||
|
|
||||||
|
[handler]
|
||||||
|
class = "fmn.sender.matrix:MatrixHandler"
|
||||||
|
host = "https://fedora.ems.host"
|
||||||
|
user_id = "@notifs-{% if env == 'staging' %}stg-{% endif %}bot:fedora.im"
|
||||||
|
token = "{{ (env == 'production')|ternary(fmn_prod_matrix_token, fmn_stg_matrix_token }}"
|
||||||
|
|
||||||
|
[log_config]
|
||||||
|
version = 1
|
||||||
|
disable_existing_loggers = true
|
||||||
|
|
||||||
|
[log_config.formatters.simple]
|
||||||
|
format = "[%(levelname)s %(name)s] %(message)s"
|
||||||
|
|
||||||
|
[log_config.handlers.console]
|
||||||
|
class = "logging.StreamHandler"
|
||||||
|
formatter = "simple"
|
||||||
|
stream = "ext://sys.stdout"
|
||||||
|
|
||||||
|
[log_config.loggers.fmn]
|
||||||
|
level = "DEBUG"
|
||||||
|
propagate = false
|
||||||
|
handlers = ["console"]
|
||||||
|
|
||||||
|
# AIO-Pika is the underlying AMQP client library. When debugging you may want to
|
||||||
|
# lower this log level.
|
||||||
|
[log_config.loggers.aio_pika]
|
||||||
|
level = "WARNING"
|
||||||
|
propagate = false
|
||||||
|
handlers = ["console"]
|
||||||
|
|
||||||
|
[log_config.loggers.nio]
|
||||||
|
level = "DEBUG"
|
||||||
|
propagate = false
|
||||||
|
handlers = ["console"]
|
||||||
|
|
||||||
|
[log_config.root]
|
||||||
|
level = "ERROR"
|
||||||
|
handlers = ["console"]
|
Loading…
Add table
Add a link
Reference in a new issue