homelab/archive/2022.07.bxl-k3s-pi/apps/hass/nodered.yaml

95 lines
1.7 KiB
YAML
Raw Normal View History

2023-04-16 15:04:06 +02:00
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: node-red
namespace: hass
labels:
app: node-red
spec:
storageClassName: longhorn-static
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-red
namespace: hass
labels:
app: node-red
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
app: node-red
template:
metadata:
labels:
app: node-red
spec:
containers:
- name: node-red
image: nodered/node-red:latest
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: Europe/Paris
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: node-red
---
apiVersion: v1
kind: Service
metadata:
name: node-red
namespace: hass
spec:
type: ClusterIP
selector:
app: node-red
ports:
- name: http
port: 1880
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: node-red
namespace: hass
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "bhasherca-k3s-issuer"
cert-manager.io/common-name: "node-red.bhasher.com"
nginx.ingress.kubernetes.io/auth-signin: https://idp.bhasher.com
nginx.ingress.kubernetes.io/auth-url: https://idp.bhasher.com/api/verify
spec:
tls:
- hosts:
- node-red.bhasher.com
secretName: node-red-tls
rules:
- host: node-red.bhasher.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: node-red
port:
number: 1880