From 601675952f7db1c9ccdd3bd73dab62773c9afc98 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Thu, 17 Oct 2024 16:02:20 -0400 Subject: [PATCH] chore: move piwigo to volsync PVCs --- .../main/apps/default/kustomization.yaml | 2 +- .../piwigo/{ => app}/helm-release.yaml | 12 +++---- .../piwigo/{ => app}/kustomization.yaml | 1 + kubernetes/main/apps/default/piwigo/ks.yaml | 32 +++++++++++++++++++ 4 files changed, 38 insertions(+), 9 deletions(-) rename kubernetes/main/apps/default/piwigo/{ => app}/helm-release.yaml (88%) rename kubernetes/main/apps/default/piwigo/{ => app}/kustomization.yaml (54%) create mode 100644 kubernetes/main/apps/default/piwigo/ks.yaml diff --git a/kubernetes/main/apps/default/kustomization.yaml b/kubernetes/main/apps/default/kustomization.yaml index dcc134c..096f6f2 100644 --- a/kubernetes/main/apps/default/kustomization.yaml +++ b/kubernetes/main/apps/default/kustomization.yaml @@ -10,4 +10,4 @@ resources: - ./well-known-site - ./dendrite/ks.yaml - ./ganymede -- ./piwigo \ No newline at end of file +- ./piwigo/ks.yaml \ No newline at end of file diff --git a/kubernetes/main/apps/default/piwigo/helm-release.yaml b/kubernetes/main/apps/default/piwigo/app/helm-release.yaml similarity index 88% rename from kubernetes/main/apps/default/piwigo/helm-release.yaml rename to kubernetes/main/apps/default/piwigo/app/helm-release.yaml index cf71f92..10f9cf4 100644 --- a/kubernetes/main/apps/default/piwigo/helm-release.yaml +++ b/kubernetes/main/apps/default/piwigo/app/helm-release.yaml @@ -61,14 +61,10 @@ spec: port: http persistence: - config: - type: hostPath - hostPath: /mnt/MainPool/Kubernetes/piwigo/config + data: + existingClaim: piwigo globalMounts: - path: /config - - gallery: - type: hostPath - hostPath: /mnt/MainPool/Kubernetes/piwigo/gallery - globalMounts: + subPath: config - path: /gallery + subPath: gallery diff --git a/kubernetes/main/apps/default/piwigo/kustomization.yaml b/kubernetes/main/apps/default/piwigo/app/kustomization.yaml similarity index 54% rename from kubernetes/main/apps/default/piwigo/kustomization.yaml rename to kubernetes/main/apps/default/piwigo/app/kustomization.yaml index ea3145d..cc46271 100644 --- a/kubernetes/main/apps/default/piwigo/kustomization.yaml +++ b/kubernetes/main/apps/default/piwigo/app/kustomization.yaml @@ -1,4 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: +- ../../../../../common/templates/volsync - ./helm-release.yaml \ No newline at end of file diff --git a/kubernetes/main/apps/default/piwigo/ks.yaml b/kubernetes/main/apps/default/piwigo/ks.yaml new file mode 100644 index 0000000..a7b8508 --- /dev/null +++ b/kubernetes/main/apps/default/piwigo/ks.yaml @@ -0,0 +1,32 @@ +# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app piwigo + namespace: flux-system +spec: + timeout: 5m + interval: 10m + targetNamespace: default + path: ./kubernetes/main/apps/default/piwigo/app + prune: true + sourceRef: + kind: GitRepository + name: home-cluster + decryption: + provider: sops + secretRef: + name: sops-gpg + dependsOn: + - name: openebs + - name: openebs-sc + - name: volsync + postBuild: + substituteFrom: + - kind: ConfigMap + name: cluster-settings + - kind: Secret + name: cluster-secrets + substitute: + APP: *app + VOLSYNC_CAPACITY: 10Gi \ No newline at end of file