SMTP settings and Grafana alerts on Nextcloud Talk
This commit is contained in:
parent
9d5e904d52
commit
875530beca
10
files/message-nextcloud-talk.sh
Normal file
10
files/message-nextcloud-talk.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
message="$(echo $1| sed 's/.*"message":"\(.*\).."}/\1/')"
|
||||
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "OCS-APIRequest: true" \
|
||||
https://nextcloud.eom.dev/ocs/v2.php/apps/spreed/api/v1/chat/x3wy62mb \
|
||||
-u Grafana:$GRAFANA_ADMIN_PASSWORD \
|
||||
-d "{\"token\": \"x3wy62mb\", \"message\": \"$message\"}"
|
@ -17,6 +17,8 @@
|
||||
release_namespace: gitea
|
||||
create_namespace: true
|
||||
values:
|
||||
image:
|
||||
pullPolicy: Always
|
||||
service:
|
||||
ssh:
|
||||
type: LoadBalancer
|
||||
@ -65,6 +67,14 @@
|
||||
service:
|
||||
DISABLE_REGISTRATION: true
|
||||
DEFAULT_ALLOW_CREATE_ORGANIZATION: false
|
||||
mailer:
|
||||
ENABLED: true
|
||||
SMTP_ADDR: mail.eom.dev
|
||||
SMTP_PORT: 587
|
||||
USER: gitea
|
||||
PASSWD: "{{ gitea_admin_password }}"
|
||||
FROM: Gitea <gitea@eom.dev>
|
||||
ENVELOPE_FROM: gitea@eom.dev
|
||||
redis:
|
||||
enabled: true
|
||||
global:
|
||||
|
@ -24,8 +24,8 @@
|
||||
enabled: true
|
||||
user: grafana
|
||||
password: "{{ grafana_admin_password }}"
|
||||
host: postfix.eom.dev
|
||||
fromAddress: grafana@postfix.eom.dev
|
||||
host: mail.eom.dev:587
|
||||
fromAddress: grafana@eom.dev
|
||||
fromName: Grafana
|
||||
ldap:
|
||||
enabled: true
|
||||
|
@ -3,4 +3,4 @@
|
||||
- name: Deploy
|
||||
include_tasks: "{{ item }}"
|
||||
loop:
|
||||
- mail.yaml
|
||||
- webhookd.yaml
|
||||
|
64
tasks/webhookd.yaml
Normal file
64
tasks/webhookd.yaml
Normal file
@ -0,0 +1,64 @@
|
||||
---
|
||||
# tasks file for webhookd
|
||||
- name: Create ConfigMap for Webhookd scripts
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: scripts
|
||||
namespace: grafana
|
||||
data:
|
||||
message-nextcloud-talk.sh: "{{ lookup('file', 'message-nextcloud-talk.sh') }}"
|
||||
|
||||
- name: Create a Deployment for Webhookd
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webhookd
|
||||
namespace: grafana
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webhookd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: webhookd
|
||||
spec:
|
||||
containers:
|
||||
- name: webhookd
|
||||
image: ncarlier/webhookd
|
||||
volumeMounts:
|
||||
- name: scripts
|
||||
mountPath: /scripts
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: GRAFANA_ADMIN_PASSWORD
|
||||
value: "{{ grafana_admin_password }}"
|
||||
volumes:
|
||||
- name: scripts
|
||||
configMap:
|
||||
name: scripts
|
||||
defaultMode: 0777
|
||||
|
||||
- name: Expose Webhookd Deployment as a Service
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: webhookd
|
||||
namespace: grafana
|
||||
spec:
|
||||
selector:
|
||||
app: webhookd
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
name: http
|
||||
type: ClusterIP
|
Loading…
Reference in New Issue
Block a user