From 9892d4bc2eba45257c16e6d8bad4fe4ecb938b7d Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sun, 7 May 2023 13:57:58 +0200 Subject: [PATCH] feat(manifests): Add base configuration --- manifests/database.yaml | 29 +++++++++++++++++++++++++++++ manifests/deployment.yaml | 22 ++++++++++++++++++++++ manifests/kustomization.yaml | 5 +++++ manifests/namespace.yaml | 4 ++++ 4 files changed, 60 insertions(+) create mode 100644 manifests/database.yaml create mode 100644 manifests/deployment.yaml create mode 100644 manifests/kustomization.yaml create mode 100644 manifests/namespace.yaml diff --git a/manifests/database.yaml b/manifests/database.yaml new file mode 100644 index 0000000..831d752 --- /dev/null +++ b/manifests/database.yaml @@ -0,0 +1,29 @@ +kind: "postgresql" +apiVersion: "acid.zalan.do/v1" + +metadata: + name: "homeassistant" + nameapce: "home-automation" + labels: + teams: acid + +spec: + teamId: "acid" + postgresql: + version: "15" + numberOfInstances: 1 + volume: + size: "1Gi" + storageClass: "flat-storage-class" + users: + hassio: [] + databases: + hassio: hassio + allowedSourceRanges: + resources: + requests: + cpu: 100m + memory: 100mi + limits: + cpu: 500m + memory: 500mi diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml new file mode 100644 index 0000000..3236123 --- /dev/null +++ b/manifests/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: homeassistant + name: homeassistant + namespace: home-automation +spec: + selector: + matchLabels: + app: homeassistant + template: + metadata: + labels: + app: homeassistant + spec: + containers: + - name: homeassistant + image: ghcr.io/home-assistant/home-assistant:stable + volumeMounts: + - mountPath: "/config" + name: hassio-storage diff --git a/manifests/kustomization.yaml b/manifests/kustomization.yaml new file mode 100644 index 0000000..88a04b5 --- /dev/null +++ b/manifests/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - deployment.yaml diff --git a/manifests/namespace.yaml b/manifests/namespace.yaml new file mode 100644 index 0000000..d577fe4 --- /dev/null +++ b/manifests/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: home-automation