add n8n
This commit is contained in:
11
deploy/n8n/kustomization.yaml
Normal file
11
deploy/n8n/kustomization.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: n8n
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- n8n-claim0-persistentvolumeclaim.yaml
|
||||||
|
- n8n-ingress.yaml
|
||||||
|
- namespace.yaml
|
||||||
|
- n8n-deployment.yaml
|
||||||
|
- n8n-service.yaml
|
||||||
14
deploy/n8n/n8n-claim0-persistentvolumeclaim.yaml
Normal file
14
deploy/n8n/n8n-claim0-persistentvolumeclaim.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
service: n8n-claim0
|
||||||
|
name: n8n-claim0
|
||||||
|
namespace: n8n
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
78
deploy/n8n/n8n-deployment.yaml
Normal file
78
deploy/n8n/n8n-deployment.yaml
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
service: n8n
|
||||||
|
name: n8n
|
||||||
|
namespace: n8n
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
service: n8n
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
service: n8n
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: volume-permissions
|
||||||
|
image: busybox:1.36
|
||||||
|
command: ["sh", "-c", "chown 1000:1000 /data"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: n8n-claim0
|
||||||
|
mountPath: /data
|
||||||
|
containers:
|
||||||
|
- command:
|
||||||
|
- /bin/sh
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- sleep 5; n8n start
|
||||||
|
env:
|
||||||
|
- name: DB_TYPE
|
||||||
|
value: postgresdb
|
||||||
|
- name: DB_POSTGRESDB_HOST
|
||||||
|
value: postgres-base-rw.postgres.svc.cluster.local
|
||||||
|
- name: DB_POSTGRESDB_PORT
|
||||||
|
value: "5432"
|
||||||
|
- name: DB_POSTGRESDB_DATABASE
|
||||||
|
value: n8ndb
|
||||||
|
- name: DB_POSTGRESDB_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: n8n-db-secret
|
||||||
|
key: username
|
||||||
|
- name: DB_POSTGRESDB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: n8n-db-secret
|
||||||
|
key: password
|
||||||
|
- name: N8N_PROTOCOL
|
||||||
|
value: http
|
||||||
|
- name: N8N_PORT
|
||||||
|
value: "5678"
|
||||||
|
image: n8nio/n8n
|
||||||
|
name: n8n
|
||||||
|
ports:
|
||||||
|
- containerPort: 5678
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "250Mi"
|
||||||
|
limits:
|
||||||
|
memory: "500Mi"
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /home/node/.n8n
|
||||||
|
name: n8n-claim0
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: n8n-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: n8n-claim0
|
||||||
|
- name: n8n-secret
|
||||||
|
secret:
|
||||||
|
secretName: n8n-secret
|
||||||
|
- name: n8n-db-secret
|
||||||
|
secret:
|
||||||
|
secretName: n8n-db-secret
|
||||||
25
deploy/n8n/n8n-ingress.yaml
Normal file
25
deploy/n8n/n8n-ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: keycloak
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
# nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||||
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- n8n.prod.panic.haus
|
||||||
|
secretName: n8n-tls
|
||||||
|
rules:
|
||||||
|
- host: n8n.prod.panic.haus
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: n8n
|
||||||
|
port:
|
||||||
|
number: 5678
|
||||||
16
deploy/n8n/n8n-service.yaml
Normal file
16
deploy/n8n/n8n-service.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
service: n8n
|
||||||
|
name: n8n
|
||||||
|
namespace: n8n
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- name: "5678"
|
||||||
|
port: 5678
|
||||||
|
targetPort: 5678
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
service: n8n
|
||||||
4
deploy/n8n/namespace.yaml
Normal file
4
deploy/n8n/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: n8n
|
||||||
23
deploy/rocket-chat/values-custom.yaml
Normal file
23
deploy/rocket-chat/values-custom.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
image:
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
repository: registry.rocket.chat/rocketchat/rocket.chat
|
||||||
|
|
||||||
|
mongodb:
|
||||||
|
enabled: true # For testing, deploy a single MongoDB pod; consider an external MongoDB cluster for production.
|
||||||
|
auth:
|
||||||
|
passwords:
|
||||||
|
- rocketchat
|
||||||
|
rootPassword: rocketchatroot
|
||||||
|
|
||||||
|
microservices:
|
||||||
|
enabled: false # Set to false for a monolithic deployment
|
||||||
|
host: chat.panic.haus # Replace with your Rocket.Chat domain
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: nginx # Specify the installed ingress controller in the K8s cluster
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod # Replace with your ClusterIssuer name
|
||||||
|
tls:
|
||||||
|
- secretName: rckube # Use a different name if preferred
|
||||||
|
hosts:
|
||||||
|
- chat.panic.haus # Replace with your Rocket.Chat domain
|
||||||
Reference in New Issue
Block a user