refactor: rewrite n8n manifests as clean GitOps specs, remove server-exported fields
This commit is contained in:
+44
-61
@@ -1,84 +1,67 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
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
|
||||
namespace: n8n
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app: n8n
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kubectl.kubernetes.io/restartedAt: '2026-04-09T17:05:44Z'
|
||||
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: git.chemavx.xyz/chemavx/n8n:d171ce68
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: n8n
|
||||
ports:
|
||||
- containerPort: 5678
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
- mountPath: /home/node/.n8n
|
||||
name: n8n-data
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
runAsUser: 1000
|
||||
terminationGracePeriodSeconds: 30
|
||||
containers:
|
||||
- name: n8n
|
||||
image: git.chemavx.xyz/chemavx/n8n:d171ce68
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 5678
|
||||
env:
|
||||
- name: N8N_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: n8n-secret
|
||||
key: encryption-key
|
||||
- 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
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: n8n-data
|
||||
mountPath: /home/node/.n8n
|
||||
volumes:
|
||||
- name: n8n-data
|
||||
persistentVolumeClaim:
|
||||
claimName: n8n-pvc
|
||||
|
||||
- name: n8n-data
|
||||
persistentVolumeClaim:
|
||||
claimName: n8n-pvc
|
||||
|
||||
+16
-20
@@ -1,29 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
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
|
||||
namespace: n8n
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: n8n.chemavx.xyz
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: n8n
|
||||
port:
|
||||
number: 5678
|
||||
path: /
|
||||
pathType: Prefix
|
||||
- host: n8n.chemavx.xyz
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: n8n
|
||||
port:
|
||||
number: 5678
|
||||
tls:
|
||||
- hosts:
|
||||
- n8n.chemavx.xyz
|
||||
secretName: n8n-tls
|
||||
|
||||
- hosts:
|
||||
- n8n.chemavx.xyz
|
||||
secretName: n8n-tls
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
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
|
||||
namespace: n8n
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storageClassName: local-path
|
||||
volumeMode: Filesystem
|
||||
volumeName: n8n-pv
|
||||
|
||||
|
||||
+4
-13
@@ -4,19 +4,10 @@ metadata:
|
||||
name: n8n
|
||||
namespace: n8n
|
||||
spec:
|
||||
clusterIP: 10.43.176.217
|
||||
clusterIPs:
|
||||
- 10.43.176.217
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ipFamilyPolicy: SingleStack
|
||||
ports:
|
||||
- port: 5678
|
||||
protocol: TCP
|
||||
targetPort: 5678
|
||||
selector:
|
||||
app: n8n
|
||||
sessionAffinity: None
|
||||
ports:
|
||||
- port: 5678
|
||||
protocol: TCP
|
||||
targetPort: 5678
|
||||
type: ClusterIP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user