Added Webhookd to Grafana
This commit is contained in:
parent
875530beca
commit
811c3b01a0
10
files/nextcloud-talk-gitea-webhook.sh
Normal file
10
files/nextcloud-talk-gitea-webhook.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 Gitea:$GITEA_ADMIN_PASSWORD \
|
||||
-d "{\"token\": \"x3wy62mb\", \"message\": \"$message\"}"
|
@ -3,4 +3,4 @@
|
||||
- name: Deploy
|
||||
include_tasks: "{{ item }}"
|
||||
loop:
|
||||
- webhookd.yaml
|
||||
- nextcloud.yaml
|
||||
|
@ -17,6 +17,9 @@
|
||||
release_namespace: nextcloud
|
||||
create_namespace: true
|
||||
values:
|
||||
image:
|
||||
pullPolicy: Always
|
||||
tag: latest
|
||||
nextcloud:
|
||||
host: nextcloud.eom.dev
|
||||
username: nextcloud_admin
|
||||
@ -25,6 +28,7 @@
|
||||
proxy.config.php: |-
|
||||
<?php
|
||||
$CONFIG = array (
|
||||
'overwriteprotocol' => 'https',
|
||||
'trusted_proxies' => array(
|
||||
0 => '127.0.0.1',
|
||||
1 => '10.0.0.0/8',
|
||||
@ -53,11 +57,15 @@
|
||||
database: nextcloud
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 4Ti
|
||||
size: 8Ti
|
||||
metrics:
|
||||
enabled: true
|
||||
cronjob:
|
||||
enabled: true
|
||||
redis:
|
||||
enabled: true
|
||||
auth:
|
||||
password: "{{ redis_auth_password }}"
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
|
@ -7,9 +7,11 @@
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: scripts
|
||||
namespace: grafana
|
||||
namespace: webhookd
|
||||
data:
|
||||
message-nextcloud-talk.sh: "{{ lookup('file', 'message-nextcloud-talk.sh') }}"
|
||||
nextcloud-talk-gitea-webhook.sh: "{{ lookup('file', 'nextcloud-talk-gitea-webhook.sh') }}"
|
||||
nextcloud-talk-grafana-webhook.sh: "{{ lookup('file', 'nextcloud-talk-grafana-webhook.sh') }}"
|
||||
nextcloud-talk-minecraft-webhook.sh: "{{ lookup('file', 'nextcloud-talk-minecraft-webhook.sh') }}"
|
||||
|
||||
- name: Create a Deployment for Webhookd
|
||||
k8s:
|
||||
@ -18,7 +20,7 @@
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webhookd
|
||||
namespace: grafana
|
||||
namespace: webhookd
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -38,6 +40,8 @@
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: GITEA_ADMIN_PASSWORD
|
||||
value: "{{ gitea_admin_password }}"
|
||||
- name: GRAFANA_ADMIN_PASSWORD
|
||||
value: "{{ grafana_admin_password }}"
|
||||
volumes:
|
||||
@ -53,7 +57,7 @@
|
||||
kind: Service
|
||||
metadata:
|
||||
name: webhookd
|
||||
namespace: grafana
|
||||
namespace: webhookd
|
||||
spec:
|
||||
selector:
|
||||
app: webhookd
|
||||
|
Loading…
Reference in New Issue
Block a user