Compare commits
1 Commits
main
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd2dda509e |
@@ -19,35 +19,6 @@ spec:
|
|||||||
component: main
|
component: main
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: n8n
|
serviceAccountName: n8n
|
||||||
initContainers:
|
|
||||||
- name: install-tools
|
|
||||||
image: alpine:3.22
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
set -e
|
|
||||||
if [ -x /tools/kubectl ]; then
|
|
||||||
echo "kubectl already exists, skipping download"
|
|
||||||
/tools/kubectl version --client
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "Downloading kubectl..."
|
|
||||||
ARCH=$(uname -m)
|
|
||||||
case $ARCH in
|
|
||||||
x86_64) ARCH="amd64" ;;
|
|
||||||
aarch64) ARCH="arm64" ;;
|
|
||||||
esac
|
|
||||||
wget -O /tools/kubectl "https://dl.k8s.io/release/$(wget -qO- https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl"
|
|
||||||
chmod +x /tools/kubectl
|
|
||||||
/tools/kubectl version --client
|
|
||||||
volumeMounts:
|
|
||||||
- name: tools
|
|
||||||
mountPath: /tools
|
|
||||||
securityContext:
|
|
||||||
runAsUser: 1000
|
|
||||||
runAsGroup: 1000
|
|
||||||
runAsNonRoot: true
|
|
||||||
containers:
|
containers:
|
||||||
- name: n8n
|
- name: n8n
|
||||||
image: docker.n8n.io/n8nio/n8n:latest
|
image: docker.n8n.io/n8nio/n8n:latest
|
||||||
@@ -55,8 +26,6 @@ spec:
|
|||||||
- containerPort: 5678
|
- containerPort: 5678
|
||||||
name: http
|
name: http
|
||||||
env:
|
env:
|
||||||
- name: PATH
|
|
||||||
value: "/opt/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
||||||
- name: HOME
|
- name: HOME
|
||||||
value: "/home/node"
|
value: "/home/node"
|
||||||
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
||||||
@@ -114,15 +83,13 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
mountPath: /home/node/.n8n
|
mountPath: /home/node/.n8n
|
||||||
- name: tools
|
|
||||||
mountPath: /opt/tools
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 2000m
|
cpu: 100m
|
||||||
memory: 512Mi
|
memory: 128Mi
|
||||||
limits:
|
limits:
|
||||||
cpu: 4000m
|
cpu: 512m
|
||||||
memory: 2048Gi
|
memory: 512Mi
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
@@ -143,9 +110,6 @@ spec:
|
|||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: n8n-data
|
claimName: n8n-data
|
||||||
- name: tools
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: n8n-tools
|
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
app: n8n
|
app: n8n
|
||||||
component: worker
|
component: worker
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: n8n
|
app: n8n
|
||||||
@@ -24,12 +24,8 @@ spec:
|
|||||||
image: docker.n8n.io/n8nio/n8n:latest
|
image: docker.n8n.io/n8nio/n8n:latest
|
||||||
command: ["n8n", "worker"]
|
command: ["n8n", "worker"]
|
||||||
env:
|
env:
|
||||||
- name: PATH
|
|
||||||
value: "/opt/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
||||||
- name: HOME
|
- name: HOME
|
||||||
value: "/home/node"
|
value: "/home/node"
|
||||||
- name: NODES_EXCLUDE
|
|
||||||
value: "[]"
|
|
||||||
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: N8N_RUNNERS_ENABLED
|
- name: N8N_RUNNERS_ENABLED
|
||||||
@@ -79,15 +75,13 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
mountPath: /home/node/.n8n
|
mountPath: /home/node/.n8n
|
||||||
- name: tools
|
|
||||||
mountPath: /opt/tools
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 2000m
|
cpu: 100m
|
||||||
memory: 512Mi
|
memory: 256Mi
|
||||||
limits:
|
limits:
|
||||||
cpu: 4000m
|
cpu: 1000m
|
||||||
memory: 2048Gi
|
memory: 1Gi
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
exec:
|
||||||
command:
|
command:
|
||||||
@@ -102,9 +96,6 @@ spec:
|
|||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: n8n-data
|
claimName: n8n-data
|
||||||
- name: tools
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: n8n-tools
|
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- external-secrets.yaml
|
|
||||||
- storage.yaml
|
- storage.yaml
|
||||||
- rbac.yaml
|
- rbac.yaml
|
||||||
- redis-deployment.yaml
|
- redis-deployment.yaml
|
||||||
|
|||||||
@@ -9,27 +9,19 @@ kind: ClusterRole
|
|||||||
metadata:
|
metadata:
|
||||||
name: n8n-clusterrole
|
name: n8n-clusterrole
|
||||||
rules:
|
rules:
|
||||||
# Core API group ("")
|
- apiGroups:
|
||||||
- apiGroups: [""]
|
- ""
|
||||||
resources: ["*"]
|
resources:
|
||||||
verbs: ["get", "list", "watch"]
|
- pods
|
||||||
|
- jobs
|
||||||
# Common built-in API groups
|
- cronjobs
|
||||||
- apiGroups: ["apps", "batch", "autoscaling", "extensions", "policy"]
|
- deployments
|
||||||
resources: ["*"]
|
- statefulsets
|
||||||
verbs: ["get", "list", "watch"]
|
verbs:
|
||||||
|
- get
|
||||||
- apiGroups: ["networking.k8s.io", "rbac.authorization.k8s.io", "apiextensions.k8s.io"]
|
- list
|
||||||
resources: ["*"]
|
- watch
|
||||||
verbs: ["get", "list", "watch"]
|
- create
|
||||||
|
|
||||||
- apiGroups: ["coordination.k8s.io", "discovery.k8s.io", "events.k8s.io"]
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
|
|
||||||
- apiGroups: ["storage.k8s.io", "admissionregistration.k8s.io", "authentication.k8s.io", "authorization.k8s.io"]
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["get", "list", "watch"]
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
|||||||
@@ -6,19 +6,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
storageClassName: longhorn
|
storageClassName: nfs-csi
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: n8n-tools
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteMany
|
|
||||||
storageClassName: longhorn
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 20Gi
|
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
longhornUI:
|
longhornUI:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
persistence:
|
|
||||||
reclaimPolicy: "Retain"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user