eindelijk weer eens een push

This commit is contained in:
allard
2026-05-31 16:07:30 +02:00
parent 01cff8e165
commit ff21c258e0
2747 changed files with 302316 additions and 131101 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"name": "Harbor Webhook",
"webhookId": "harbor",
"transformationFunction": "try { const repo=data.repository||{}; const resources=(data.event_data && data.event_data.resources)||[]; let msg=`📦 Repository: ${repo.namespace||''}/${repo.name||''}\n📝 Type: ${data.type||''}\n👤 Operator: ${data.operator||''}\n`; if(resources.length>0){ msg+=`\n💠 Resources:\n`; resources.forEach((r,idx)=>{ msg+=`\n🔹 Resource ${idx+1}:\n`; msg+=` 🏷 Tag: ${r.tag||''}\n`; msg+=` 🆔 Digest: ${r.digest||''}\n`; msg+=` 🌐 URL: ${r.resource_url||''}\n`; }); } result={plain:msg, version:'v2'}; } catch(e){ result={plain:`Error processing webhook: ${e.message}`, version:'v2'}; }"
}
+5
View File
@@ -0,0 +1,5 @@
{
"name": "Harbor Webhook",
"webhookId": "harbor",
"transformationFunction": "const repo = data.repository || {}; const resources = (data.event_data && data.event_data.resources) || []; let msg = ''; msg += '📦 Repository: ' + (repo.namespace || '') + '/' + (repo.name || '') + '\\n'; msg += '📝 Type: ' + (data.type || '') + '\\n'; msg += '👤 Operator: ' + (data.operator || '') + '\\n'; msg += '\\n'; msg += '💠 Resources:\\n'; resources.forEach((r, i) => { msg += '\\n'; msg += '🔹 Resource ' + (i + 1) + '\\n'; msg += '🏷 Tag: ' + (r.tag || '') + '\\n'; msg += '🆔 Digest: ' + (r.digest || '') + '\\n'; msg += '🌐 URL: ' + (r.resource_url || '') + '\\n'; }); result = { plain: msg, version: 'v2' };"
}
@@ -0,0 +1,16 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: hookshot-lp.allarddcs.nl-tls
namespace: matrix
spec:
dnsNames:
- hookshot-lp.allarddcs.nl
issuerRef:
group: cert-manager.io
kind: ClusterIssuer
name: letsencrypt
secretName: hookshot.allarddcs.nl-tls
usages:
- digital signature
- key encipherment
+148
View File
@@ -0,0 +1,148 @@
# ===========================
# Hookshot Deployment
# ===========================
apiVersion: apps/v1
kind: Deployment
metadata:
name: matrix-hookshot
namespace: matrix
spec:
replicas: 1
selector:
matchLabels:
app: matrix-hookshot
template:
metadata:
labels:
app: matrix-hookshot
spec:
containers:
- name: hookshot
image: halfshot/matrix-hookshot:latest
imagePullPolicy: Always
ports:
- containerPort: 9000 # webhooks
- containerPort: 9001 # metrics
- containerPort: 9002 # widgets
- containerPort: 9003 # appservice
env:
# tell hookshot where to find files
- name: CONFIG_PATH
value: /data/config.yml
- name: REGISTRATION_PATH
value: /data/registration.yml
- name: TRANSFORM_PATH
value: /data/transformationFunction.js
volumeMounts:
- name: hookshot-data
mountPath: /data
- name: hookshot-registration
mountPath: /data/registration.yml
subPath: registration.yml
volumes:
- name: hookshot-data
persistentVolumeClaim:
claimName: hookshot-pvc
- name: hookshot-registration
secret:
secretName: matrix-hookshot-registration
---
# ===========================
# Hookshot Service
# ===========================
apiVersion: v1
kind: Service
metadata:
name: matrix-hookshot
namespace: matrix
spec:
selector:
app: matrix-hookshot
ports:
- name: webhooks
port: 9000
targetPort: 9000
- name: metrics
port: 9001
targetPort: 9000
- name: widgets
port: 9002
targetPort: 9000
- name: appservice
port: 9003
targetPort: 9003
- name: matrix
port: 9993
targetPort: 9993
---
# ===========================
# Hookshot IngressRoute
# ===========================
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: matrix-hookshot-http
namespace: matrix
spec:
entryPoints:
- web
routes:
- match: Host(`hookshot-lp.allarddcs.nl`) && PathPrefix(`/webhook`)
kind: Rule
services:
- name: matrix-hookshot
port: 9000
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: matrix-hookshot-tls
namespace: matrix
spec:
entryPoints:
- websecure
routes:
- match: Host(`hookshot-lp.allarddcs.nl`) && PathPrefix(`/webhook`)
kind: Rule
services:
- name: matrix-hookshot
port: 9000
tls:
secretName: hookshot.allarddcs.nl-tls
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: hookshot-pv
spec:
storageClassName: ""
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
mountOptions:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.111
path: /mnt/nfs_share/hookshot
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hookshot-pvc
namespace: matrix
spec:
storageClassName: ""
volumeName: hookshot-pv
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
+1
View File
@@ -0,0 +1 @@
c31f7a18d3d2d79bd7a03e2794d966317155c409699cb6fd0922023cf45f9c3b
+42
View File
@@ -0,0 +1,42 @@
# ===========================
# Redis Deployment
# ===========================
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: matrix
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7-alpine
ports:
- containerPort: 6379
---
# ===========================
# Redis Service
# ===========================
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: matrix
spec:
selector:
app: redis
ports:
- port: 6379
targetPort: 6379