From 477df28686a5f4c5e872f6adec9dae47ceae382c Mon Sep 17 00:00:00 2001 From: auricom <27022259+auricom@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:39:13 +0200 Subject: [PATCH] feat: migrate to namespace home-automation --- .../emqx/helm-release.yaml | 2 +- .../emqx/kustomization.yaml | 0 .../frigate/helm-release.yaml | 2 +- .../frigate}/kustomization.yaml | 0 .../frigate/volume.yaml | 2 +- .../home-assistant/helm-release.yaml | 2 +- .../home-assistant}/kustomization.yaml | 0 .../home-assistant/volume.yaml | 2 +- .../kustomization.yaml | 2 - .../zigbee2mqtt/helm-release.yaml | 2 +- .../zigbee2mqtt}/kustomization.yaml | 0 .../zigbee2mqtt/volume.yaml | 2 +- .../zwavejs2mqtt/helm-release.yaml | 2 +- .../zwavejs2mqtt}/kustomization.yaml | 0 .../zwavejs2mqtt/volume.yaml | 2 +- cluster/apps/home/esphome/helm-release.yaml | 52 ----------- cluster/apps/home/esphome/volume.yaml | 15 ---- cluster/apps/home/node-red/helm-release.yaml | 87 ------------------- cluster/apps/home/node-red/volume.yaml | 15 ---- .../apps/home/zigbee2mqtt/kustomization.yaml | 5 -- .../apps/home/zwavejs2mqtt/kustomization.yaml | 5 -- cluster/apps/kustomization.yaml | 2 +- .../{home.yaml => home-automation.yaml} | 2 +- cluster/core/namespaces/kustomization.yaml | 2 +- 24 files changed, 12 insertions(+), 193 deletions(-) rename cluster/apps/{home => home-automation}/emqx/helm-release.yaml (98%) rename cluster/apps/{home => home-automation}/emqx/kustomization.yaml (100%) rename cluster/apps/{home => home-automation}/frigate/helm-release.yaml (99%) rename cluster/apps/{home/esphome => home-automation/frigate}/kustomization.yaml (100%) rename cluster/apps/{home => home-automation}/frigate/volume.yaml (89%) rename cluster/apps/{home => home-automation}/home-assistant/helm-release.yaml (99%) rename cluster/apps/{home/frigate => home-automation/home-assistant}/kustomization.yaml (100%) rename cluster/apps/{home => home-automation}/home-assistant/volume.yaml (89%) rename cluster/apps/{home => home-automation}/kustomization.yaml (85%) rename cluster/apps/{home => home-automation}/zigbee2mqtt/helm-release.yaml (98%) rename cluster/apps/{home/home-assistant => home-automation/zigbee2mqtt}/kustomization.yaml (100%) rename cluster/apps/{home => home-automation}/zigbee2mqtt/volume.yaml (89%) rename cluster/apps/{home => home-automation}/zwavejs2mqtt/helm-release.yaml (98%) rename cluster/apps/{home/node-red => home-automation/zwavejs2mqtt}/kustomization.yaml (100%) rename cluster/apps/{home => home-automation}/zwavejs2mqtt/volume.yaml (89%) delete mode 100644 cluster/apps/home/esphome/helm-release.yaml delete mode 100644 cluster/apps/home/esphome/volume.yaml delete mode 100644 cluster/apps/home/node-red/helm-release.yaml delete mode 100644 cluster/apps/home/node-red/volume.yaml delete mode 100644 cluster/apps/home/zigbee2mqtt/kustomization.yaml delete mode 100644 cluster/apps/home/zwavejs2mqtt/kustomization.yaml rename cluster/core/namespaces/{home.yaml => home-automation.yaml} (65%) diff --git a/cluster/apps/home/emqx/helm-release.yaml b/cluster/apps/home-automation/emqx/helm-release.yaml similarity index 98% rename from cluster/apps/home/emqx/helm-release.yaml rename to cluster/apps/home-automation/emqx/helm-release.yaml index 702e0df0c..c3c0f20e1 100644 --- a/cluster/apps/home/emqx/helm-release.yaml +++ b/cluster/apps/home-automation/emqx/helm-release.yaml @@ -3,7 +3,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: emqx - namespace: home + namespace: home-automation spec: interval: 5m chart: diff --git a/cluster/apps/home/emqx/kustomization.yaml b/cluster/apps/home-automation/emqx/kustomization.yaml similarity index 100% rename from cluster/apps/home/emqx/kustomization.yaml rename to cluster/apps/home-automation/emqx/kustomization.yaml diff --git a/cluster/apps/home/frigate/helm-release.yaml b/cluster/apps/home-automation/frigate/helm-release.yaml similarity index 99% rename from cluster/apps/home/frigate/helm-release.yaml rename to cluster/apps/home-automation/frigate/helm-release.yaml index 3d85c2400..ebb7ffd85 100644 --- a/cluster/apps/home/frigate/helm-release.yaml +++ b/cluster/apps/home-automation/frigate/helm-release.yaml @@ -3,7 +3,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: frigate - namespace: home + namespace: home-automation spec: interval: 5m chart: diff --git a/cluster/apps/home/esphome/kustomization.yaml b/cluster/apps/home-automation/frigate/kustomization.yaml similarity index 100% rename from cluster/apps/home/esphome/kustomization.yaml rename to cluster/apps/home-automation/frigate/kustomization.yaml diff --git a/cluster/apps/home/frigate/volume.yaml b/cluster/apps/home-automation/frigate/volume.yaml similarity index 89% rename from cluster/apps/home/frigate/volume.yaml rename to cluster/apps/home-automation/frigate/volume.yaml index 6bd9bbc57..00367648d 100644 --- a/cluster/apps/home/frigate/volume.yaml +++ b/cluster/apps/home-automation/frigate/volume.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: frigate-config - namespace: home + namespace: home-automation labels: kasten-io-snapshots: "enable" spec: diff --git a/cluster/apps/home/home-assistant/helm-release.yaml b/cluster/apps/home-automation/home-assistant/helm-release.yaml similarity index 99% rename from cluster/apps/home/home-assistant/helm-release.yaml rename to cluster/apps/home-automation/home-assistant/helm-release.yaml index 365e0a470..e687f61e9 100644 --- a/cluster/apps/home/home-assistant/helm-release.yaml +++ b/cluster/apps/home-automation/home-assistant/helm-release.yaml @@ -3,7 +3,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: home-assistant - namespace: home + namespace: home-automation spec: interval: 5m chart: diff --git a/cluster/apps/home/frigate/kustomization.yaml b/cluster/apps/home-automation/home-assistant/kustomization.yaml similarity index 100% rename from cluster/apps/home/frigate/kustomization.yaml rename to cluster/apps/home-automation/home-assistant/kustomization.yaml diff --git a/cluster/apps/home/home-assistant/volume.yaml b/cluster/apps/home-automation/home-assistant/volume.yaml similarity index 89% rename from cluster/apps/home/home-assistant/volume.yaml rename to cluster/apps/home-automation/home-assistant/volume.yaml index e5bf5d7c8..26042a469 100644 --- a/cluster/apps/home/home-assistant/volume.yaml +++ b/cluster/apps/home-automation/home-assistant/volume.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: hass-config - namespace: home + namespace: home-automation labels: kasten-io-snapshots: "enable" spec: diff --git a/cluster/apps/home/kustomization.yaml b/cluster/apps/home-automation/kustomization.yaml similarity index 85% rename from cluster/apps/home/kustomization.yaml rename to cluster/apps/home-automation/kustomization.yaml index 8cc347a01..92490affb 100644 --- a/cluster/apps/home/kustomization.yaml +++ b/cluster/apps/home-automation/kustomization.yaml @@ -2,9 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - emqx - - esphome - frigate - home-assistant - - node-red - zigbee2mqtt - zwavejs2mqtt diff --git a/cluster/apps/home/zigbee2mqtt/helm-release.yaml b/cluster/apps/home-automation/zigbee2mqtt/helm-release.yaml similarity index 98% rename from cluster/apps/home/zigbee2mqtt/helm-release.yaml rename to cluster/apps/home-automation/zigbee2mqtt/helm-release.yaml index ec0131018..111cc50f2 100644 --- a/cluster/apps/home/zigbee2mqtt/helm-release.yaml +++ b/cluster/apps/home-automation/zigbee2mqtt/helm-release.yaml @@ -3,7 +3,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: zigbee2mqtt - namespace: home + namespace: home-automation spec: interval: 5m chart: diff --git a/cluster/apps/home/home-assistant/kustomization.yaml b/cluster/apps/home-automation/zigbee2mqtt/kustomization.yaml similarity index 100% rename from cluster/apps/home/home-assistant/kustomization.yaml rename to cluster/apps/home-automation/zigbee2mqtt/kustomization.yaml diff --git a/cluster/apps/home/zigbee2mqtt/volume.yaml b/cluster/apps/home-automation/zigbee2mqtt/volume.yaml similarity index 89% rename from cluster/apps/home/zigbee2mqtt/volume.yaml rename to cluster/apps/home-automation/zigbee2mqtt/volume.yaml index d4ff948d9..917421a7f 100644 --- a/cluster/apps/home/zigbee2mqtt/volume.yaml +++ b/cluster/apps/home-automation/zigbee2mqtt/volume.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: zigbee2mqtt-config - namespace: home + namespace: home-automation labels: kasten-io-snapshots: "enable" spec: diff --git a/cluster/apps/home/zwavejs2mqtt/helm-release.yaml b/cluster/apps/home-automation/zwavejs2mqtt/helm-release.yaml similarity index 98% rename from cluster/apps/home/zwavejs2mqtt/helm-release.yaml rename to cluster/apps/home-automation/zwavejs2mqtt/helm-release.yaml index 9715024ac..7a631ba47 100644 --- a/cluster/apps/home/zwavejs2mqtt/helm-release.yaml +++ b/cluster/apps/home-automation/zwavejs2mqtt/helm-release.yaml @@ -3,7 +3,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: zwavejs2mqtt - namespace: home + namespace: home-automation spec: releaseName: zwavejs2mqtt interval: 5m diff --git a/cluster/apps/home/node-red/kustomization.yaml b/cluster/apps/home-automation/zwavejs2mqtt/kustomization.yaml similarity index 100% rename from cluster/apps/home/node-red/kustomization.yaml rename to cluster/apps/home-automation/zwavejs2mqtt/kustomization.yaml diff --git a/cluster/apps/home/zwavejs2mqtt/volume.yaml b/cluster/apps/home-automation/zwavejs2mqtt/volume.yaml similarity index 89% rename from cluster/apps/home/zwavejs2mqtt/volume.yaml rename to cluster/apps/home-automation/zwavejs2mqtt/volume.yaml index 9d5106d8a..8716e1e2b 100644 --- a/cluster/apps/home/zwavejs2mqtt/volume.yaml +++ b/cluster/apps/home-automation/zwavejs2mqtt/volume.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: zwavejs2mqtt-config - namespace: home + namespace: home-automation labels: kasten-io-snapshots: "enable" spec: diff --git a/cluster/apps/home/esphome/helm-release.yaml b/cluster/apps/home/esphome/helm-release.yaml deleted file mode 100644 index bbd3ae931..000000000 --- a/cluster/apps/home/esphome/helm-release.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 -kind: HelmRelease -metadata: - name: esphome - namespace: home -spec: - releaseName: esphome - interval: 5m - chart: - spec: - # renovate: registryUrl=https://k8s-at-home.com/charts/ - chart: esphome - version: 7.3.0 - sourceRef: - kind: HelmRepository - name: k8s-at-home-charts - namespace: flux-system - interval: 5m - values: - image: - repository: esphome/esphome - tag: 1.20.0 - env: - TZ: "Europe/Paris" - ESPHOME_DASHBOARD_USE_PING: true - hostNetwork: true - dnsPolicy: ClusterFirstWithHostNet - ingress: - main: - enabled: true - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/auth-url: "http://authelia.networking.svc.cluster.local/api/verify" - nginx.ingress.kubernetes.io/auth-signin: "https://login.${SECRET_CLUSTER_DOMAIN}/" - hosts: - - host: esphome.${SECRET_CLUSTER_DOMAIN} - paths: - - path: / - pathType: Prefix - tls: - - hosts: - - "esphome.${SECRET_CLUSTER_DOMAIN}" - service: - main: - annotations: - prometheus.io/probe: "true" - prometheus.io/protocol: http - persistence: - config: - enabled: true - existingClaim: esphome-config diff --git a/cluster/apps/home/esphome/volume.yaml b/cluster/apps/home/esphome/volume.yaml deleted file mode 100644 index 52e5cf28b..000000000 --- a/cluster/apps/home/esphome/volume.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: esphome-config - namespace: home - labels: - kasten-io-snapshots: "enable" -spec: - accessModes: - - ReadWriteOnce - storageClassName: rook-ceph-block - resources: - requests: - storage: 10Gi diff --git a/cluster/apps/home/node-red/helm-release.yaml b/cluster/apps/home/node-red/helm-release.yaml deleted file mode 100644 index 3c3e38abb..000000000 --- a/cluster/apps/home/node-red/helm-release.yaml +++ /dev/null @@ -1,87 +0,0 @@ ---- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 -kind: HelmRelease -metadata: - name: node-red - namespace: home -spec: - releaseName: node-red - interval: 5m - chart: - spec: - # renovate: registryUrl=https://k8s-at-home.com/charts/ - chart: node-red - version: 8.1.0 - sourceRef: - kind: HelmRepository - name: k8s-at-home-charts - namespace: flux-system - interval: 5m - values: - image: - repository: nodered/node-red - tag: 2.0.2-12-minimal - env: - TZ: "Europe/Paris" - NODE_RED_ENABLE_PROJECTS: "true" - NODE_RED_ENABLE_SAFE_MODE: "false" - podSecurityContext: - runAsUser: 1000 - runAsGroup: 1000 - fsGroup: 1000 - persistence: - data: - enabled: true - mountPath: /data - existingClaim: node-red-config - service: - main: - annotations: - prometheus.io/probe: "true" - prometheus.io/protocol: "http" - ingress: - main: - enabled: true - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/auth-url: "http://authelia.networking.svc.cluster.local/api/verify" - nginx.ingress.kubernetes.io/auth-signin: "https://login.${SECRET_CLUSTER_DOMAIN}/" - hosts: - - host: node-red.${SECRET_CLUSTER_DOMAIN} - paths: - - path: / - pathType: Prefix - tls: - - hosts: - - node-red.${SECRET_CLUSTER_DOMAIN} - addons: - codeserver: - enabled: true - image: - repository: codercom/code-server - tag: 3.10.2 - workingDir: "/data/projects" - args: - - --auth - - "none" - - --user-data-dir - - "/data/projects/.vscode" - - --extensions-dir - - "/data/projects/.vscode" - ingress: - enabled: true - annotations: - kubernetes.io/ingress.class: "nginx" - nginx.ingress.kubernetes.io/auth-url: "http://authelia.networking.svc.cluster.local/api/verify" - nginx.ingress.kubernetes.io/auth-signin: "https://login.${SECRET_CLUSTER_DOMAIN}/" - hosts: - - host: node-red-config.${SECRET_CLUSTER_DOMAIN} - paths: - - path: / - pathType: Prefix - tls: - - hosts: - - node-red-config.${SECRET_CLUSTER_DOMAIN} - volumeMounts: - - name: data - mountPath: /data diff --git a/cluster/apps/home/node-red/volume.yaml b/cluster/apps/home/node-red/volume.yaml deleted file mode 100644 index 15b33af4c..000000000 --- a/cluster/apps/home/node-red/volume.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: node-red-config - namespace: home - labels: - kasten-io-snapshots: "enable" -spec: - accessModes: - - ReadWriteOnce - storageClassName: rook-ceph-block - resources: - requests: - storage: 10Gi diff --git a/cluster/apps/home/zigbee2mqtt/kustomization.yaml b/cluster/apps/home/zigbee2mqtt/kustomization.yaml deleted file mode 100644 index 21f1d9e05..000000000 --- a/cluster/apps/home/zigbee2mqtt/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - helm-release.yaml - - volume.yaml diff --git a/cluster/apps/home/zwavejs2mqtt/kustomization.yaml b/cluster/apps/home/zwavejs2mqtt/kustomization.yaml deleted file mode 100644 index 21f1d9e05..000000000 --- a/cluster/apps/home/zwavejs2mqtt/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - helm-release.yaml - - volume.yaml diff --git a/cluster/apps/kustomization.yaml b/cluster/apps/kustomization.yaml index 8a880cd9d..c80348c42 100644 --- a/cluster/apps/kustomization.yaml +++ b/cluster/apps/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization resources: - data - development - - home + - home-automation - kasten-io - media - monitoring diff --git a/cluster/core/namespaces/home.yaml b/cluster/core/namespaces/home-automation.yaml similarity index 65% rename from cluster/core/namespaces/home.yaml rename to cluster/core/namespaces/home-automation.yaml index 0da6f90d5..7089fbdb4 100644 --- a/cluster/core/namespaces/home.yaml +++ b/cluster/core/namespaces/home-automation.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: Namespace metadata: - name: home + name: home-automation diff --git a/cluster/core/namespaces/kustomization.yaml b/cluster/core/namespaces/kustomization.yaml index 83ea24b96..e6e1debda 100644 --- a/cluster/core/namespaces/kustomization.yaml +++ b/cluster/core/namespaces/kustomization.yaml @@ -7,7 +7,7 @@ resources: - development.yaml - falco-system.yaml - flux-system.yaml - - home.yaml + - home-automation.yaml - kasten-io.yaml - kube-system.yaml - media.yaml