Compare commits
1 Commits
main
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd334f25eb |
@@ -44,6 +44,7 @@ ArgoCD homelab project
|
|||||||
| **jellyfin** | [](https://ag.hexor.cy/applications/argocd/jellyfin) |
|
| **jellyfin** | [](https://ag.hexor.cy/applications/argocd/jellyfin) |
|
||||||
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
||||||
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
||||||
|
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
||||||
| **ollama** | [](https://ag.hexor.cy/applications/argocd/ollama) |
|
| **ollama** | [](https://ag.hexor.cy/applications/argocd/ollama) |
|
||||||
| **paperless** | [](https://ag.hexor.cy/applications/argocd/paperless) |
|
| **paperless** | [](https://ag.hexor.cy/applications/argocd/paperless) |
|
||||||
| **pasarguard** | [](https://ag.hexor.cy/applications/argocd/pasarguard) |
|
| **pasarguard** | [](https://ag.hexor.cy/applications/argocd/pasarguard) |
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ spec:
|
|||||||
password: "{{ .psql | trim }}"
|
password: "{{ .psql | trim }}"
|
||||||
username: "n8n"
|
username: "n8n"
|
||||||
encryptionkey: "{{ .enc_pass | trim }}"
|
encryptionkey: "{{ .enc_pass | trim }}"
|
||||||
runnertoken: "{{ .runner_token | trim }}"
|
|
||||||
data:
|
data:
|
||||||
- secretKey: psql
|
- secretKey: psql
|
||||||
sourceRef:
|
sourceRef:
|
||||||
@@ -36,15 +35,4 @@ spec:
|
|||||||
decodingStrategy: None
|
decodingStrategy: None
|
||||||
metadataPolicy: None
|
metadataPolicy: None
|
||||||
key: 18c92d73-9637-4419-8642-7f7b308460cb
|
key: 18c92d73-9637-4419-8642-7f7b308460cb
|
||||||
property: fields[0].value
|
property: fields[0].value
|
||||||
- secretKey: runner_token
|
|
||||||
sourceRef:
|
|
||||||
storeRef:
|
|
||||||
name: vaultwarden-login
|
|
||||||
kind: ClusterSecretStore
|
|
||||||
remoteRef:
|
|
||||||
conversionStrategy: Default
|
|
||||||
decodingStrategy: None
|
|
||||||
metadataPolicy: None
|
|
||||||
key: 18c92d73-9637-4419-8642-7f7b308460cb
|
|
||||||
property: fields[1].value
|
|
||||||
@@ -1,18 +1,19 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
# Updated: Fixed n8n volume permissions issue
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- external-secrets.yaml
|
- external-secrets.yaml
|
||||||
- storage.yaml
|
- plain/
|
||||||
- rbac.yaml
|
|
||||||
- redis-deployment.yaml
|
|
||||||
- redis-service.yaml
|
|
||||||
- deployment-main.yaml
|
|
||||||
- deployment-worker.yaml
|
|
||||||
- service.yaml
|
|
||||||
- ingress.yaml
|
|
||||||
|
|
||||||
helmCharts:
|
helmCharts:
|
||||||
|
# - name: n8n
|
||||||
|
# repo: https://community-charts.github.io/helm-charts
|
||||||
|
# version: 1.16.28
|
||||||
|
# releaseName: n8n
|
||||||
|
# namespace: n8n
|
||||||
|
# valuesFile: values-n8n.yaml
|
||||||
|
# includeCRDs: true
|
||||||
- name: yacy
|
- name: yacy
|
||||||
repo: https://gt.hexor.cy/api/packages/ab/helm
|
repo: https://gt.hexor.cy/api/packages/ab/helm
|
||||||
version: 0.1.2
|
version: 0.1.2
|
||||||
@@ -20,6 +21,3 @@ helmCharts:
|
|||||||
namespace: n8n
|
namespace: n8n
|
||||||
valuesFile: values-yacy.yaml
|
valuesFile: values-yacy.yaml
|
||||||
includeCRDs: true
|
includeCRDs: true
|
||||||
|
|
||||||
commonLabels:
|
|
||||||
app.kubernetes.io/name: n8n
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ spec:
|
|||||||
app: n8n
|
app: n8n
|
||||||
component: main
|
component: main
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: n8n
|
|
||||||
containers:
|
containers:
|
||||||
- name: n8n
|
- name: n8n
|
||||||
image: docker.n8n.io/n8nio/n8n:latest
|
image: docker.n8n.io/n8nio/n8n:latest
|
||||||
@@ -26,12 +25,8 @@ spec:
|
|||||||
- containerPort: 5678
|
- containerPort: 5678
|
||||||
name: http
|
name: http
|
||||||
env:
|
env:
|
||||||
- name: HOME
|
|
||||||
value: "/home/node"
|
|
||||||
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: NODES_EXCLUDE
|
|
||||||
value: "[]"
|
|
||||||
- name: N8N_HOST
|
- name: N8N_HOST
|
||||||
value: "n8n.hexor.cy"
|
value: "n8n.hexor.cy"
|
||||||
- name: N8N_PORT
|
- name: N8N_PORT
|
||||||
@@ -75,11 +70,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: credentials
|
name: credentials
|
||||||
key: encryptionkey
|
key: encryptionkey
|
||||||
- name: N8N_RUNNERS_AUTH_TOKEN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: credentials
|
|
||||||
key: runnertoken
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
mountPath: /home/node/.n8n
|
mountPath: /home/node/.n8n
|
||||||
@@ -114,4 +104,4 @@ spec:
|
|||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
app: n8n
|
app: n8n
|
||||||
component: worker
|
component: worker
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: n8n
|
app: n8n
|
||||||
@@ -18,28 +18,21 @@ spec:
|
|||||||
app: n8n
|
app: n8n
|
||||||
component: worker
|
component: worker
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: n8n
|
|
||||||
containers:
|
containers:
|
||||||
- name: n8n-worker
|
- name: n8n-worker
|
||||||
image: docker.n8n.io/n8nio/n8n:latest
|
image: docker.n8n.io/n8nio/n8n:latest
|
||||||
command: ["n8n", "worker"]
|
command: ["n8n", "worker"]
|
||||||
env:
|
env:
|
||||||
- name: HOME
|
|
||||||
value: "/home/node"
|
|
||||||
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: N8N_RUNNERS_ENABLED
|
- name: N8N_RUNNERS_ENABLED
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: N8N_RUNNERS_MODE
|
- name: N8N_RUNNERS_MODE
|
||||||
value: "external"
|
value: "external"
|
||||||
- name: N8N_PORT
|
|
||||||
value: "80"
|
|
||||||
- name: EXECUTIONS_MODE
|
- name: EXECUTIONS_MODE
|
||||||
value: "queue"
|
value: "queue"
|
||||||
- name: QUEUE_BULL_REDIS_HOST
|
- name: QUEUE_BULL_REDIS_HOST
|
||||||
value: "n8n-redis"
|
value: "n8n-redis"
|
||||||
- name: N8N_RUNNERS_TASK_BROKER_URI
|
|
||||||
value: "http://n8n:80"
|
|
||||||
- name: NODE_ENV
|
- name: NODE_ENV
|
||||||
value: "production"
|
value: "production"
|
||||||
- name: GENERIC_TIMEZONE
|
- name: GENERIC_TIMEZONE
|
||||||
@@ -67,11 +60,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: credentials
|
name: credentials
|
||||||
key: encryptionkey
|
key: encryptionkey
|
||||||
- name: N8N_RUNNERS_AUTH_TOKEN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: credentials
|
|
||||||
key: runnertoken
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
mountPath: /home/node/.n8n
|
mountPath: /home/node/.n8n
|
||||||
@@ -100,4 +88,4 @@ spec:
|
|||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
15
k8s/apps/n8n/plain/kustomization.yaml
Normal file
15
k8s/apps/n8n/plain/kustomization.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- storage.yaml
|
||||||
|
- redis-deployment.yaml
|
||||||
|
- redis-service.yaml
|
||||||
|
- deployment-main.yaml
|
||||||
|
- deployment-worker.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
|
||||||
|
commonLabels:
|
||||||
|
app.kubernetes.io/name: n8n
|
||||||
|
app.kubernetes.io/instance: n8n-plain
|
||||||
12
k8s/apps/n8n/plain/storage.yaml
Normal file
12
k8s/apps/n8n/plain/storage.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: n8n-data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: nfs-csi
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
@@ -1,37 +1,71 @@
|
|||||||
---
|
---
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: n8n
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-clusterrole
|
name: n8n-readonly
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups: [""]
|
||||||
- ""
|
resources:
|
||||||
|
- pods
|
||||||
|
- services
|
||||||
|
- endpoints
|
||||||
|
- persistentvolumeclaims
|
||||||
|
- persistentvolumes
|
||||||
|
- configmaps
|
||||||
|
- secrets
|
||||||
|
- nodes
|
||||||
|
- namespaces
|
||||||
|
- events
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["apps"]
|
||||||
resources:
|
resources:
|
||||||
- pods
|
- deployments
|
||||||
- jobs
|
- replicasets
|
||||||
- cronjobs
|
- statefulsets
|
||||||
- deployments
|
- daemonsets
|
||||||
- statefulsets
|
verbs: ["get", "list", "watch"]
|
||||||
verbs:
|
- apiGroups: ["networking.k8s.io"]
|
||||||
- get
|
resources:
|
||||||
- list
|
- ingresses
|
||||||
- watch
|
- networkpolicies
|
||||||
- create
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["extensions"]
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["autoscaling"]
|
||||||
|
resources:
|
||||||
|
- horizontalpodautoscalers
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["batch"]
|
||||||
|
resources:
|
||||||
|
- jobs
|
||||||
|
- cronjobs
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["metrics.k8s.io"]
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- nodes
|
||||||
|
verbs: ["get", "list"]
|
||||||
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources:
|
||||||
|
- storageclasses
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["policy"]
|
||||||
|
resources:
|
||||||
|
- poddisruptionbudgets
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-clusterrolebinding
|
name: n8n-readonly
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: n8n-clusterrole
|
name: n8n-readonly
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: n8n
|
name: n8n-readonly
|
||||||
namespace: n8n
|
namespace: n8n
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-data
|
name: n8n-home
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
storageClassName: longhorn
|
storageClassName: nfs-csi
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
|
|||||||
86
k8s/apps/n8n/values-n8n.yaml
Normal file
86
k8s/apps/n8n/values-n8n.yaml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: master.tail2fe2d.ts.net
|
||||||
|
|
||||||
|
|
||||||
|
db:
|
||||||
|
type: postgresdb
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
|
||||||
|
# Configure health probes for slow startup
|
||||||
|
main:
|
||||||
|
extraEnvVars:
|
||||||
|
NODES_EXCLUDE: "[]"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 512m
|
||||||
|
memory: 512Mi
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
existingClaim: n8n-home
|
||||||
|
mountPath: /home/node/.n8n
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 10
|
||||||
|
failureThreshold: 6
|
||||||
|
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz/readiness
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 10
|
||||||
|
|
||||||
|
|
||||||
|
worker:
|
||||||
|
mode: regular
|
||||||
|
|
||||||
|
webhook:
|
||||||
|
url: https://n8n.hexor.cy
|
||||||
|
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
existingEncryptionKeySecret: credentials
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
automount: true
|
||||||
|
annotations: {}
|
||||||
|
name: "n8n-readonly"
|
||||||
|
|
||||||
|
externalPostgresql:
|
||||||
|
existingSecret: credentials
|
||||||
|
host: "psql.psql.svc"
|
||||||
|
username: "n8n"
|
||||||
|
database: "n8n"
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
className: traefik
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
traefik.ingress.kubernetes.io/router.middlewares: kube-system-https-redirect@kubernetescrd
|
||||||
|
|
||||||
|
hosts:
|
||||||
|
- host: n8n.hexor.cy
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: n8n-tls
|
||||||
|
hosts:
|
||||||
|
- '*.hexor.cy'
|
||||||
|
|
||||||
@@ -21,4 +21,4 @@ yacy:
|
|||||||
network.unit.dhtredundancy.senior: "1"
|
network.unit.dhtredundancy.senior: "1"
|
||||||
index.receive.allow: "false"
|
index.receive.allow: "false"
|
||||||
index.distribute.allow: "false"
|
index.distribute.allow: "false"
|
||||||
crawl.response.timeout: "10000"
|
crawl.response.timeout: "10000"
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: longhorn
|
|
||||||
namespace: argocd
|
|
||||||
spec:
|
|
||||||
project: core
|
|
||||||
destination:
|
|
||||||
namespace: longhorn
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
source:
|
|
||||||
repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git
|
|
||||||
targetRevision: HEAD
|
|
||||||
path: k8s/core/longhorn
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
prune: true
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
|
|
||||||
#resources:
|
|
||||||
# - app.yaml
|
|
||||||
|
|
||||||
helmCharts:
|
|
||||||
- name: longhorn
|
|
||||||
repo: https://charts.longhorn.io
|
|
||||||
version: 1.11.0
|
|
||||||
releaseName: longhorn
|
|
||||||
namespace: longhorn
|
|
||||||
valuesFile: values.yaml
|
|
||||||
includeCRDs: true
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
longhornUI:
|
|
||||||
replicas: 1
|
|
||||||
persistence:
|
|
||||||
reclaimPolicy: "Retain"
|
|
||||||
Reference in New Issue
Block a user