apiVersion: apps/v1
kind: Deployment
metadata:
  name: nodered
  namespace: nodered
spec:
  selector:
    matchLabels:
      app: nodered
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: nodered
    spec:
      securityContext:
        fsGroup: 1000
      containers:
      - image: nodered/node-red:1.2.9-12
        name: nodered
        securityContext:
          privileged: true
        env:
        - name: TZ
          value: "Europe/Stockholm"
        - name: PUID
          value: "1000"
        ports:
        - containerPort: 1880
          name: http
        volumeMounts:
        - name: nodered-pv
          mountPath: /data
      volumes:
      - name: nodered-pv
        persistentVolumeClaim:
          claimName: nodered-pvc
