This commit is contained in:
2025-05-22 19:30:40 -05:00
parent d2a8749f78
commit f5dfe59e9c
9 changed files with 588 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: n8n-config-secret
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: n8n-config-secret
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
secretStoreRef:
kind: ClusterSecretStore
name: vault
data:
- secretKey: key
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /cl01tl/n8n/config
metadataPolicy: None
property: key
---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: n8n-postgresql-17-cluster-backup-secret
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: n8n-postgresql-17-cluster-backup-secret
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
secretStoreRef:
kind: ClusterSecretStore
name: vault
data:
- secretKey: ACCESS_KEY_ID
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /digital-ocean/home-infra/postgres-backups
metadataPolicy: None
property: access
- secretKey: ACCESS_SECRET_KEY
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /digital-ocean/home-infra/postgres-backups
metadataPolicy: None
property: secret

View File

@@ -0,0 +1,47 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: http-route-n8n
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: http-route-n8n
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: traefik-gateway
namespace: traefik
hostnames:
- n8n.alexlebens.net
rules:
- matches:
- path:
type: PathPrefix
value: /
- path:
type: PathPrefix
value: /webhook-test/
backendRefs:
- group: ''
kind: Service
name: n8n-main
port: 80
weight: 100
- matches:
- path:
type: PathPrefix
value: /webhook/
- path:
type: PathPrefix
value: /webhook-waiting/
- path:
type: PathPrefix
value: /form/
backendRefs:
- group: ''
kind: Service
name: n8n-webhook
port: 80
weight: 100

View File

@@ -0,0 +1,61 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: n8n-main
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: n8n-main
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: n8n-main
app.kubernetes.io/instance: {{ .Release.Name }}
endpoints:
- port: http
interval: 3m
scrapeTimeout: 1m
path: /metrics
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: n8n-worker
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: n8n-worker
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: n8n-worker
app.kubernetes.io/instance: {{ .Release.Name }}
endpoints:
- port: http
interval: 3m
scrapeTimeout: 1m
path: /metrics
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: n8n-webhook
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: n8n-webhook
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: n8n-webhook
app.kubernetes.io/instance: {{ .Release.Name }}
endpoints:
- port: http
interval: 3m
scrapeTimeout: 1m
path: /metrics