From 4837708c6b2ff2871d6cc85a9f6db0c96c021ae3 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sun, 22 Sep 2024 01:17:55 -0500 Subject: [PATCH] add zwave-js-ui --- kubernetes/apps/default/kustomization.yaml | 1 + .../apps/default/zwave/app/helmrelease.yaml | 97 +++++++++++++++++++ .../apps/default/zwave/app/kustomization.yaml | 8 ++ kubernetes/apps/default/zwave/ks.yaml | 28 ++++++ 4 files changed, 134 insertions(+) create mode 100644 kubernetes/apps/default/zwave/app/helmrelease.yaml create mode 100644 kubernetes/apps/default/zwave/app/kustomization.yaml create mode 100644 kubernetes/apps/default/zwave/ks.yaml diff --git a/kubernetes/apps/default/kustomization.yaml b/kubernetes/apps/default/kustomization.yaml index 987b68b5..5317ff44 100644 --- a/kubernetes/apps/default/kustomization.yaml +++ b/kubernetes/apps/default/kustomization.yaml @@ -24,3 +24,4 @@ resources: - ./sonarr/ks.yaml - ./tautulli/ks.yaml - ./unpackerr/ks.yaml + - ./zwave/ks.yaml diff --git a/kubernetes/apps/default/zwave/app/helmrelease.yaml b/kubernetes/apps/default/zwave/app/helmrelease.yaml new file mode 100644 index 00000000..0a782a7e --- /dev/null +++ b/kubernetes/apps/default/zwave/app/helmrelease.yaml @@ -0,0 +1,97 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: zwave +spec: + interval: 30m + chart: + spec: + chart: app-template + version: 3.4.0 + sourceRef: + kind: HelmRepository + name: bjw-s + namespace: flux-system + install: + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + strategy: rollback + retries: 3 + dependsOn: + - name: rook-ceph-cluster + namespace: rook-ceph + - name: volsync + namespace: volsync-system + values: + controllers: + zwave: + annotations: + reloader.stakater.com/auto: "true" + containers: + app: + image: + repository: ghcr.io/zwave-js/zwave-js-ui + tag: 9.19.0@sha256:a39688fb3c42733a036104842429a5ff44917594f28f9b24181a1c0873a850c4 + env: + TZ: America/Chicago + PORT: &port 80 + probes: + liveness: &probes + enabled: true + custom: true + spec: + httpGet: + path: /health + port: *port + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + readiness: *probes + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: { drop: ["ALL"] } + resources: + requests: + cpu: 10m + limits: + memory: 512Mi + defaultPodOptions: + securityContext: + runAsNonRoot: true + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + fsGroupChangePolicy: OnRootMismatch + seccompProfile: { type: RuntimeDefault } + service: + app: + controller: zwave + ports: + http: + port: *port + websocket: + port: 3000 + ingress: + app: + className: internal-nginx + hosts: + - host: "{{ .Release.Name }}.jahanson.tech" + paths: + - path: / + service: + identifier: app + port: http + persistence: + config: + existingClaim: zwave + globalMounts: + - path: /usr/src/app/store + tmp: + type: emptyDir diff --git a/kubernetes/apps/default/zwave/app/kustomization.yaml b/kubernetes/apps/default/zwave/app/kustomization.yaml new file mode 100644 index 00000000..bb7b7d5b --- /dev/null +++ b/kubernetes/apps/default/zwave/app/kustomization.yaml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml + - ../../../../templates/gatus/internal + - ../../../../templates/volsync diff --git a/kubernetes/apps/default/zwave/ks.yaml b/kubernetes/apps/default/zwave/ks.yaml new file mode 100644 index 00000000..4f9aa04a --- /dev/null +++ b/kubernetes/apps/default/zwave/ks.yaml @@ -0,0 +1,28 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app zwave + namespace: flux-system +spec: + targetNamespace: default + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./kubernetes/main/apps/default/zwave/app + prune: true + sourceRef: + kind: GitRepository + name: theshire + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m + postBuild: + substitute: + APP: *app + VOLSYNC_CAPACITY: 1Gi + VOLSYNC_ACCESSMODES: ReadWriteMany + VOLSYNC_STORAGECLASS: ceph-filesystem + VOLSYNC_SNAPSHOTCLASS: csi-ceph-filesystem