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