2020-06-05 18:54:07 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: node-red
|
|
|
|
namespace: node-red
|
|
|
|
annotations:
|
|
|
|
kube-1password: to62npgx5vvlknphuytg7qgrny
|
|
|
|
kube-1password/vault: Kubernetes
|
|
|
|
kube-1password/secret-text-key: settings.js
|
|
|
|
type: Opaque
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: node-red
|
|
|
|
namespace: node-red
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
targetPort: web
|
|
|
|
name: web
|
|
|
|
selector:
|
|
|
|
app: node-red
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: node-red
|
|
|
|
namespace: node-red
|
|
|
|
spec:
|
2024-04-06 13:55:46 +00:00
|
|
|
replicas: 1
|
2023-09-04 09:42:28 +00:00
|
|
|
strategy:
|
2023-09-04 09:44:02 +00:00
|
|
|
type: Recreate
|
2020-06-05 18:54:07 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: node-red
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: node-red
|
|
|
|
spec:
|
|
|
|
securityContext:
|
|
|
|
fsGroup: 1000
|
|
|
|
initContainers:
|
|
|
|
- name: config-copy
|
|
|
|
image: bash:latest
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
args:
|
|
|
|
- -c
|
|
|
|
- |
|
|
|
|
cp /config/settings.js /data/
|
|
|
|
volumeMounts:
|
|
|
|
- name: config
|
|
|
|
mountPath: /config/settings.js
|
|
|
|
subPath: settings.js
|
|
|
|
- name: data
|
|
|
|
mountPath: /data
|
2024-02-09 17:19:05 +00:00
|
|
|
- name: update-native-modules
|
2024-12-17 03:09:08 +00:00
|
|
|
image: nodered/node-red:4.0.6-18
|
2024-02-09 17:19:05 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
command:
|
|
|
|
- bash
|
|
|
|
- -c
|
|
|
|
- |
|
|
|
|
cd /data
|
|
|
|
npm rebuild
|
2024-12-07 14:04:27 +00:00
|
|
|
npm install tldts
|
2024-02-09 17:19:05 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: data
|
|
|
|
mountPath: /data
|
2020-06-05 18:54:07 +00:00
|
|
|
containers:
|
|
|
|
- name: web
|
2024-12-17 03:09:08 +00:00
|
|
|
image: nodered/node-red:4.0.6-18
|
2020-06-05 18:54:07 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
ports:
|
|
|
|
- containerPort: 1880
|
|
|
|
name: web
|
|
|
|
volumeMounts:
|
|
|
|
- name: data
|
|
|
|
mountPath: /data
|
|
|
|
volumes:
|
|
|
|
- name: config
|
|
|
|
secret:
|
|
|
|
secretName: node-red
|
|
|
|
- name: data
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: node-red
|
|
|
|
---
|
2021-10-16 06:31:19 +00:00
|
|
|
apiVersion: networking.k8s.io/v1
|
2020-06-05 18:54:07 +00:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: node-red
|
|
|
|
namespace: node-red
|
|
|
|
annotations:
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
2021-10-16 08:46:06 +00:00
|
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
2020-06-05 18:54:07 +00:00
|
|
|
spec:
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- nodered.cluster.fun
|
|
|
|
secretName: node-red-ingress
|
|
|
|
rules:
|
|
|
|
- host: nodered.cluster.fun
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
2021-10-16 06:31:19 +00:00
|
|
|
pathType: ImplementationSpecific
|
2020-06-05 18:54:07 +00:00
|
|
|
backend:
|
2021-10-16 06:31:19 +00:00
|
|
|
service:
|
|
|
|
name: node-red
|
|
|
|
port:
|
|
|
|
number: 80
|