⬆️ zwave-js-ui app template v2

This commit is contained in:
auricom
2023-10-28 15:41:53 +02:00
parent 0d5af606ea
commit 36fc54604f
6 changed files with 91 additions and 70 deletions

View File

@@ -10,7 +10,7 @@ spec:
chart: chart:
spec: spec:
chart: app-template chart: app-template
version: 1.5.1 version: 2.0.3
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: bjw-s name: bjw-s
@@ -27,22 +27,18 @@ spec:
uninstall: uninstall:
keepHistory: false keepHistory: false
values: values:
controllers:
main:
type: statefulset
annotations:
reloader.stakater.com/auto: "true"
containers:
main:
image: image:
repository: ghcr.io/zwave-js/zwave-js-ui repository: ghcr.io/zwave-js/zwave-js-ui
tag: 9.3.0 tag: 9.3.0
env: env:
TZ: "${TIMEZONE}" TZ: ${TIMEZONE}
service:
main:
ports:
http:
port: &port 8091
websocket:
enabled: true
port: 3000
serviceMonitor:
main:
enabled: true
probes: probes:
liveness: &probes liveness: &probes
enabled: true enabled: true
@@ -50,7 +46,7 @@ spec:
spec: spec:
httpGet: httpGet:
path: /health path: /health
port: *port port: &port 8091
initialDelaySeconds: 0 initialDelaySeconds: 0
periodSeconds: 10 periodSeconds: 10
timeoutSeconds: 1 timeoutSeconds: 1
@@ -58,10 +54,39 @@ spec:
readiness: *probes readiness: *probes
startup: startup:
enabled: false enabled: false
securityContext:
privileged: true
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
memory: 512Mi
pod:
nodeSelector:
aeotec.feature.node.kubernetes.io/zwave: "true"
statefulset:
volumeClaimTemplates:
- name: config
accessMode: ReadWriteOnce
size: 1Gi
storageClass: rook-ceph-block
globalMounts:
- path: /usr/src/app/store
service:
main:
ports:
http:
port: *port
websocket:
port: 3000
serviceMonitor:
main:
enabled: true # requires https://github.com/kvaster/zwavejs-prom
ingress: ingress:
main: main:
enabled: true enabled: true
ingressClassName: "nginx" className: "nginx"
annotations: annotations:
auth.home.arpa/enabled: "true" auth.home.arpa/enabled: "true"
hajimari.io/icon: mdi:z-wave hajimari.io/icon: mdi:z-wave
@@ -70,34 +95,29 @@ spec:
paths: paths:
- path: / - path: /
pathType: Prefix pathType: Prefix
service:
name: main
port: http
tls: tls:
- hosts: - hosts:
- *host - *host
pod:
nodeSelector:
aeotec.feature.node.kubernetes.io/zwave: "true"
statefulset:
volumeClaimTemplates:
- name: config
accessMode: ReadWriteOnce
size: 1Gi
storageClass: ceph-block
globalMounts:
- path: /usr/src/app/store
securityContext: securityContext:
privileged: true privileged: true
persistence: persistence:
config:
enabled: true
existingClaim: zwavejs2mqtt-config
mountPath: /usr/src/app/store
usb: usb:
enabled: true
type: hostPath type: hostPath
hostPath: /dev/serial/by-id/usb-0658_0200-if00 hostPath: /dev/serial/by-id/usb-0658_0200-if00
hostPathType: CharDevice hostPathType: CharDevice
mountPath: /dev/ttyUSB0 globalMounts:
resources: - path: /dev/serial/by-id/usb-0658_0200-if00
requests:
cpu: 10m
memory: 100Mi
limits:
memory: 500Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: feature.node.kubernetes.io/custom-zwave
operator: In
values:
- "true"

View File

@@ -7,4 +7,3 @@ resources:
- ./gatus.yaml - ./gatus.yaml
- ./helmrelease.yaml - ./helmrelease.yaml
- ./volsync.yaml - ./volsync.yaml
- ./volume.yaml

View File

@@ -3,19 +3,19 @@
apiVersion: external-secrets.io/v1beta1 apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret kind: ExternalSecret
metadata: metadata:
name: zwavejs2mqtt-restic name: zwave-js-ui-restic
namespace: default namespace: default
spec: spec:
secretStoreRef: secretStoreRef:
kind: ClusterSecretStore kind: ClusterSecretStore
name: onepassword-connect name: onepassword-connect
target: target:
name: zwavejs2mqtt-restic-secret name: zwave-js-ui-restic-secret
creationPolicy: Owner creationPolicy: Owner
template: template:
engineVersion: v2 engineVersion: v2
data: data:
RESTIC_REPOSITORY: '{{ .REPOSITORY_TEMPLATE }}/zwavejs2mqtt' RESTIC_REPOSITORY: '{{ .REPOSITORY_TEMPLATE }}/zwave-js-ui'
RESTIC_PASSWORD: '{{ .RESTIC_PASSWORD }}' RESTIC_PASSWORD: '{{ .RESTIC_PASSWORD }}'
AWS_ACCESS_KEY_ID: '{{ .AWS_ACCESS_KEY_ID }}' AWS_ACCESS_KEY_ID: '{{ .AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '{{ .AWS_SECRET_ACCESS_KEY }}' AWS_SECRET_ACCESS_KEY: '{{ .AWS_SECRET_ACCESS_KEY }}'
@@ -27,16 +27,16 @@ spec:
apiVersion: volsync.backube/v1alpha1 apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource kind: ReplicationSource
metadata: metadata:
name: zwavejs2mqtt name: zwave-js-ui
namespace: default namespace: default
spec: spec:
sourcePVC: zwavejs2mqtt-config sourcePVC: config-zwave-js-ui-0
trigger: trigger:
schedule: "0 7 * * *" schedule: "0 7 * * *"
restic: restic:
copyMethod: Snapshot copyMethod: Snapshot
pruneIntervalDays: 7 pruneIntervalDays: 7
repository: zwavejs2mqtt-restic-secret repository: zwave-js-ui-restic-secret
cacheCapacity: 10Gi cacheCapacity: 10Gi
volumeSnapshotClassName: csi-ceph-blockpool volumeSnapshotClassName: csi-ceph-blockpool
storageClassName: rook-ceph-block storageClassName: rook-ceph-block

View File

@@ -1,17 +0,0 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: zwavejs2mqtt-config
namespace: default
labels:
app.kubernetes.io/name: &name zwave-js-ui
app.kubernetes.io/instance: *name
snapshot.home.arpa/enabled: "true"
spec:
accessModes:
- ReadWriteOnce
storageClassName: rook-ceph-block
resources:
requests:
storage: 1Gi

View File

@@ -0,0 +1,18 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/nfd.k8s-sigs.io/nodefeaturerule_v1alpha1.json
apiVersion: nfd.k8s-sigs.io/v1alpha1
kind: NodeFeatureRule
metadata:
name: aeotec-zwave-device
spec:
rules:
- # Aeotec Z-Stick Gen5+
name: aeotec.zwave
labels:
aeotec.feature.node.kubernetes.io/zwave: "true"
matchFeatures:
- feature: usb.device
matchExpressions:
class: { op: In, value: ["02"] }
vendor: { op: In, value: ["0658"] }
device: { op: In, value: ["0200"] }

View File

@@ -4,4 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namespace: kube-system namespace: kube-system
resources: resources:
- ./aeotec-zwave-device.yaml
- ./google-coral-device.yaml - ./google-coral-device.yaml