From b3fe51e9da6ef461a7dd1732e9342b6f5623a48a Mon Sep 17 00:00:00 2001 From: Joe Monk Date: Sun, 18 Aug 2024 22:29:58 +0100 Subject: [PATCH] Change pvc set up to local storage --- apps/sonarr/kustomization.yaml | 9 +++++---- apps/sonarr/pvc.yaml | 8 ++++++++ clusters/kairos/monitoring/grafana/helmrelease.yaml | 2 +- clusters/kairos/monitoring/kustomization.yaml | 6 +++--- clusters/kairos/monitoring/loki/helmrelease.yaml | 2 +- clusters/kairos/storage/kustomization.yaml | 4 ++++ clusters/kairos/storage/storageclass.yaml | 9 +++++++++ kairos_config.yaml => kairos-config.yaml | 0 readme.md | 2 +- 9 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 apps/sonarr/pvc.yaml create mode 100644 clusters/kairos/storage/kustomization.yaml create mode 100644 clusters/kairos/storage/storageclass.yaml rename kairos_config.yaml => kairos-config.yaml (100%) diff --git a/apps/sonarr/kustomization.yaml b/apps/sonarr/kustomization.yaml index 0d0270c..239af0a 100644 --- a/apps/sonarr/kustomization.yaml +++ b/apps/sonarr/kustomization.yaml @@ -1,6 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -# resources: -# - deployment.yaml -# - service.yaml -# - ingress.yaml \ No newline at end of file +resources: +- pvc.yaml +- deployment.yaml +- service.yaml +- ingress.yaml \ No newline at end of file diff --git a/apps/sonarr/pvc.yaml b/apps/sonarr/pvc.yaml new file mode 100644 index 0000000..9b1a576 --- /dev/null +++ b/apps/sonarr/pvc.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: sonarr-pvc +spec: + accessModes: + - ReadWriteOncePod + storageClassName: local-storage \ No newline at end of file diff --git a/clusters/kairos/monitoring/grafana/helmrelease.yaml b/clusters/kairos/monitoring/grafana/helmrelease.yaml index f41ad15..ef35fcc 100644 --- a/clusters/kairos/monitoring/grafana/helmrelease.yaml +++ b/clusters/kairos/monitoring/grafana/helmrelease.yaml @@ -16,4 +16,4 @@ spec: values: persistence: enabled: true - storageClassName: longhorn \ No newline at end of file + storageClassName: local-storage \ No newline at end of file diff --git a/clusters/kairos/monitoring/kustomization.yaml b/clusters/kairos/monitoring/kustomization.yaml index 23371e7..51cf8b8 100644 --- a/clusters/kairos/monitoring/kustomization.yaml +++ b/clusters/kairos/monitoring/kustomization.yaml @@ -4,6 +4,6 @@ namespace: monitoring resources: - namespace.yaml - helmrepo.yaml -# - ./loki -# - ./promtail -# - ./grafana \ No newline at end of file +- ./loki +- ./promtail +- ./grafana \ No newline at end of file diff --git a/clusters/kairos/monitoring/loki/helmrelease.yaml b/clusters/kairos/monitoring/loki/helmrelease.yaml index f976928..96af506 100644 --- a/clusters/kairos/monitoring/loki/helmrelease.yaml +++ b/clusters/kairos/monitoring/loki/helmrelease.yaml @@ -45,7 +45,7 @@ spec: minio: enabled: true persistence: - storageClass: longhorn + storageClass: local-storage # Zero out replica counts of other deployment modes singleBinary: diff --git a/clusters/kairos/storage/kustomization.yaml b/clusters/kairos/storage/kustomization.yaml new file mode 100644 index 0000000..f27e332 --- /dev/null +++ b/clusters/kairos/storage/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- storageclass.yaml \ No newline at end of file diff --git a/clusters/kairos/storage/storageclass.yaml b/clusters/kairos/storage/storageclass.yaml new file mode 100644 index 0000000..e5b9aaf --- /dev/null +++ b/clusters/kairos/storage/storageclass.yaml @@ -0,0 +1,9 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-storage +provisioner: rancher.io/local-path +parameters: + nodePath: /usr/local + pathPattern: "{{ .PVC.Namespace }}/{{ .PVC.Name }}" +reclaimPolicy: Retain \ No newline at end of file diff --git a/kairos_config.yaml b/kairos-config.yaml similarity index 100% rename from kairos_config.yaml rename to kairos-config.yaml diff --git a/readme.md b/readme.md index d184af0..b26f9a0 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ - Burn to usb - Boot from usb, live install and go to the config webui - Add the public keys to the config (from ~/.ssh - `ssh-keygen -t ed25519 -C "joemonk@hotmail.co.uk"`) -- Put the kairos_config in, check the shutdown button and let it install +- Put the kairos-config in, check the shutdown button and let it install - Remove the usb, ssh in with using the specific private key (i.e. from ~/.ssh - `ssh -i ./kairos kairos@192.168.1.101` or add the following to ~/.ssh/config to just use `ssh 192.168.1.101`) ```