refactor: rewrite n8n manifests as clean GitOps specs, remove server-exported fields
This commit is contained in:
+18
-35
@@ -1,43 +1,42 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
deployment.kubernetes.io/revision: '2'
|
|
||||||
kubectl.kubernetes.io/last-applied-configuration: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"name":"n8n","namespace":"n8n"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"n8n"}},"template":{"metadata":{"labels":{"app":"n8n"}},"spec":{"containers":[{"env":[{"name":"N8N_ENCRYPTION_KEY","valueFrom":{"secretKeyRef":{"key":"encryption-key","name":"n8n-secret"}}},{"name":"N8N_HOST","value":"n8n.chemavx.xyz"},{"name":"N8N_PORT","value":"5678"},{"name":"N8N_PROTOCOL","value":"https"},{"name":"WEBHOOK_URL","value":"https://n8n.chemavx.xyz/"},{"name":"N8N_USER_FOLDER","value":"/home/node/.n8n"},{"name":"NODE_FUNCTION_ALLOW_EXTERNAL","value":"*"},{"name":"GENERIC_TIMEZONE","value":"Europe/Madrid"},{"name":"DB_TYPE","value":"sqlite"},{"name":"DB_SQLITE_DATABASE","value":"/home/node/.n8n/database.sqlite"}],"image":"n8nio/n8n:latest","name":"n8n","ports":[{"containerPort":5678}],"resources":{"limits":{"cpu":"500m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"256Mi"}},"volumeMounts":[{"mountPath":"/home/node/.n8n","name":"n8n-data"}]}],"securityContext":{"fsGroup":1000,"runAsUser":1000},"volumes":[{"name":"n8n-data","persistentVolumeClaim":{"claimName":"n8n-pvc"}}]}}}}
|
|
||||||
|
|
||||||
'
|
|
||||||
name: n8n
|
name: n8n
|
||||||
namespace: n8n
|
namespace: n8n
|
||||||
spec:
|
spec:
|
||||||
progressDeadlineSeconds: 600
|
|
||||||
replicas: 1
|
replicas: 1
|
||||||
revisionHistoryLimit: 10
|
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: n8n
|
app: n8n
|
||||||
strategy:
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxSurge: 25%
|
maxSurge: 25%
|
||||||
maxUnavailable: 25%
|
maxUnavailable: 25%
|
||||||
type: RollingUpdate
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
kubectl.kubernetes.io/restartedAt: '2026-04-09T17:05:44Z'
|
|
||||||
labels:
|
labels:
|
||||||
app: n8n
|
app: n8n
|
||||||
spec:
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1000
|
||||||
|
runAsUser: 1000
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- name: n8n
|
||||||
|
image: git.chemavx.xyz/chemavx/n8n:d171ce68
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- containerPort: 5678
|
||||||
|
env:
|
||||||
- name: N8N_ENCRYPTION_KEY
|
- name: N8N_ENCRYPTION_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
key: encryption-key
|
|
||||||
name: n8n-secret
|
name: n8n-secret
|
||||||
|
key: encryption-key
|
||||||
- name: N8N_HOST
|
- name: N8N_HOST
|
||||||
value: n8n.chemavx.xyz
|
value: n8n.chemavx.xyz
|
||||||
- name: N8N_PORT
|
- name: N8N_PORT
|
||||||
value: '5678'
|
value: "5678"
|
||||||
- name: N8N_PROTOCOL
|
- name: N8N_PROTOCOL
|
||||||
value: https
|
value: https
|
||||||
- name: WEBHOOK_URL
|
- name: WEBHOOK_URL
|
||||||
@@ -45,40 +44,24 @@ spec:
|
|||||||
- name: N8N_USER_FOLDER
|
- name: N8N_USER_FOLDER
|
||||||
value: /home/node/.n8n
|
value: /home/node/.n8n
|
||||||
- name: NODE_FUNCTION_ALLOW_EXTERNAL
|
- name: NODE_FUNCTION_ALLOW_EXTERNAL
|
||||||
value: '*'
|
value: "*"
|
||||||
- name: GENERIC_TIMEZONE
|
- name: GENERIC_TIMEZONE
|
||||||
value: Europe/Madrid
|
value: Europe/Madrid
|
||||||
- name: DB_TYPE
|
- name: DB_TYPE
|
||||||
value: sqlite
|
value: sqlite
|
||||||
- name: DB_SQLITE_DATABASE
|
- name: DB_SQLITE_DATABASE
|
||||||
value: /home/node/.n8n/database.sqlite
|
value: /home/node/.n8n/database.sqlite
|
||||||
image: git.chemavx.xyz/chemavx/n8n:d171ce68
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
name: n8n
|
|
||||||
ports:
|
|
||||||
- containerPort: 5678
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
|
||||||
cpu: 500m
|
|
||||||
memory: 1Gi
|
|
||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 256Mi
|
memory: 256Mi
|
||||||
terminationMessagePath: /dev/termination-log
|
limits:
|
||||||
terminationMessagePolicy: File
|
cpu: 500m
|
||||||
|
memory: 1Gi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /home/node/.n8n
|
- name: n8n-data
|
||||||
name: n8n-data
|
mountPath: /home/node/.n8n
|
||||||
dnsPolicy: ClusterFirst
|
|
||||||
restartPolicy: Always
|
|
||||||
schedulerName: default-scheduler
|
|
||||||
securityContext:
|
|
||||||
fsGroup: 1000
|
|
||||||
runAsUser: 1000
|
|
||||||
terminationGracePeriodSeconds: 30
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: n8n-data
|
- name: n8n-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: n8n-pvc
|
claimName: n8n-pvc
|
||||||
|
|
||||||
|
|||||||
+6
-10
@@ -1,29 +1,25 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
||||||
kubectl.kubernetes.io/last-applied-configuration: '{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"cert-manager.io/cluster-issuer":"letsencrypt-prod","traefik.ingress.kubernetes.io/router.entrypoints":"websecure"},"name":"n8n","namespace":"n8n"},"spec":{"ingressClassName":"traefik","rules":[{"host":"n8n.chemavx.xyz","http":{"paths":[{"backend":{"service":{"name":"n8n","port":{"number":5678}}},"path":"/","pathType":"Prefix"}]}}],"tls":[{"hosts":["n8n.chemavx.xyz"],"secretName":"n8n-tls"}]}}
|
|
||||||
|
|
||||||
'
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
||||||
name: n8n
|
name: n8n
|
||||||
namespace: n8n
|
namespace: n8n
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: traefik
|
ingressClassName: traefik
|
||||||
rules:
|
rules:
|
||||||
- host: n8n.chemavx.xyz
|
- host: n8n.chemavx.xyz
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- backend:
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
service:
|
service:
|
||||||
name: n8n
|
name: n8n
|
||||||
port:
|
port:
|
||||||
number: 5678
|
number: 5678
|
||||||
path: /
|
|
||||||
pathType: Prefix
|
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- n8n.chemavx.xyz
|
- n8n.chemavx.xyz
|
||||||
secretName: n8n-tls
|
secretName: n8n-tls
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
|
||||||
kubectl.kubernetes.io/last-applied-configuration: '{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"name":"n8n-pvc","namespace":"n8n"},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"local-path","volumeName":"n8n-pv"}}
|
|
||||||
|
|
||||||
'
|
|
||||||
pv.kubernetes.io/bind-completed: 'yes'
|
|
||||||
name: n8n-pvc
|
name: n8n-pvc
|
||||||
namespace: n8n
|
namespace: n8n
|
||||||
spec:
|
spec:
|
||||||
@@ -15,6 +10,4 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
storageClassName: local-path
|
storageClassName: local-path
|
||||||
volumeMode: Filesystem
|
|
||||||
volumeName: n8n-pv
|
volumeName: n8n-pv
|
||||||
|
|
||||||
|
|||||||
+2
-11
@@ -4,19 +4,10 @@ metadata:
|
|||||||
name: n8n
|
name: n8n
|
||||||
namespace: n8n
|
namespace: n8n
|
||||||
spec:
|
spec:
|
||||||
clusterIP: 10.43.176.217
|
selector:
|
||||||
clusterIPs:
|
app: n8n
|
||||||
- 10.43.176.217
|
|
||||||
internalTrafficPolicy: Cluster
|
|
||||||
ipFamilies:
|
|
||||||
- IPv4
|
|
||||||
ipFamilyPolicy: SingleStack
|
|
||||||
ports:
|
ports:
|
||||||
- port: 5678
|
- port: 5678
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 5678
|
targetPort: 5678
|
||||||
selector:
|
|
||||||
app: n8n
|
|
||||||
sessionAffinity: None
|
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user