From e7ea7d4934e858da209a27f0575f1684b0518189 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 12 Jan 2025 09:56:42 -0500 Subject: [PATCH] feat: add includes dir Signed-off-by: Devin Buhl --- .../actions-runner-system/kustomization.yaml | 2 +- .../apps/cert-manager/kustomization.yaml | 2 +- kubernetes/apps/default/kustomization.yaml | 3 +- .../apps/external-secrets/kustomization.yaml | 2 +- .../apps/flux-system/kustomization.yaml | 2 +- .../apps/kube-system/kustomization.yaml | 2 +- kubernetes/apps/kyverno/kustomization.yaml | 2 +- .../kyverno/policies/volsync-movers.yaml | 10 ++--- kubernetes/apps/network/kustomization.yaml | 2 +- .../apps/observability/kustomization.yaml | 2 +- .../apps/openebs-system/kustomization.yaml | 2 +- kubernetes/apps/rook-ceph/kustomization.yaml | 2 +- .../apps/volsync-system/kustomization.yaml | 2 +- .../flux => includes/alerts}/alert.yaml | 0 .../alerts}/kustomization.yaml | 0 .../flux => includes/alerts}/provider.yaml | 0 kubernetes/includes/kustomization.yaml | 6 +++ .../includes/volsync/kustomization.yaml | 6 +++ kubernetes/includes/volsync/pvc.yaml | 38 +++++++++++++++++++ .../templates/volsync/kustomization.yaml | 2 +- .../volsync/{claim.yaml => pvc.yaml} | 0 21 files changed, 68 insertions(+), 19 deletions(-) rename kubernetes/{templates/flux => includes/alerts}/alert.yaml (100%) rename kubernetes/{templates/flux => includes/alerts}/kustomization.yaml (100%) rename kubernetes/{templates/flux => includes/alerts}/provider.yaml (100%) create mode 100644 kubernetes/includes/kustomization.yaml create mode 100644 kubernetes/includes/volsync/kustomization.yaml create mode 100644 kubernetes/includes/volsync/pvc.yaml rename kubernetes/templates/volsync/{claim.yaml => pvc.yaml} (100%) diff --git a/kubernetes/apps/actions-runner-system/kustomization.yaml b/kubernetes/apps/actions-runner-system/kustomization.yaml index 71548361806ba..9a49325ac915c 100644 --- a/kubernetes/apps/actions-runner-system/kustomization.yaml +++ b/kubernetes/apps/actions-runner-system/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./gha-runner-scale-set-controller/ks.yaml - ./gha-runner-scale-set/ks.yaml diff --git a/kubernetes/apps/cert-manager/kustomization.yaml b/kubernetes/apps/cert-manager/kustomization.yaml index 22e7433af2da8..2d9e8f261cb76 100644 --- a/kubernetes/apps/cert-manager/kustomization.yaml +++ b/kubernetes/apps/cert-manager/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./cert-manager/ks.yaml transformers: diff --git a/kubernetes/apps/default/kustomization.yaml b/kubernetes/apps/default/kustomization.yaml index bc6e7645a4dd5..ae18ecc9731a3 100644 --- a/kubernetes/apps/default/kustomization.yaml +++ b/kubernetes/apps/default/kustomization.yaml @@ -5,7 +5,8 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts + - ../../includes/volsync # Flux-Kustomizations - ./atuin/ks.yaml - ./autobrr/ks.yaml diff --git a/kubernetes/apps/external-secrets/kustomization.yaml b/kubernetes/apps/external-secrets/kustomization.yaml index e0ad59967172d..d5bd9d2aa1d46 100644 --- a/kubernetes/apps/external-secrets/kustomization.yaml +++ b/kubernetes/apps/external-secrets/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./external-secrets/ks.yaml - ./onepassword-connect/ks.yaml diff --git a/kubernetes/apps/flux-system/kustomization.yaml b/kubernetes/apps/flux-system/kustomization.yaml index 6d86b9ce16904..bde3b49f3ee12 100644 --- a/kubernetes/apps/flux-system/kustomization.yaml +++ b/kubernetes/apps/flux-system/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./flux-operator/ks.yaml transformers: diff --git a/kubernetes/apps/kube-system/kustomization.yaml b/kubernetes/apps/kube-system/kustomization.yaml index 2d8315cdf70a0..12d78ece5536b 100644 --- a/kubernetes/apps/kube-system/kustomization.yaml +++ b/kubernetes/apps/kube-system/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./cilium/ks.yaml - ./coredns/ks.yaml diff --git a/kubernetes/apps/kyverno/kustomization.yaml b/kubernetes/apps/kyverno/kustomization.yaml index 3c1d13e7437b5..b781914e87397 100644 --- a/kubernetes/apps/kyverno/kustomization.yaml +++ b/kubernetes/apps/kyverno/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./kyverno/ks.yaml transformers: diff --git a/kubernetes/apps/kyverno/kyverno/policies/volsync-movers.yaml b/kubernetes/apps/kyverno/kyverno/policies/volsync-movers.yaml index f4e057161db99..2ef575217fcbe 100644 --- a/kubernetes/apps/kyverno/kyverno/policies/volsync-movers.yaml +++ b/kubernetes/apps/kyverno/kyverno/policies/volsync-movers.yaml @@ -36,9 +36,8 @@ spec: mountPath: /repository volumes: - name: repository - nfs: - server: expanse.internal - path: /mnt/eros/Volsync + persistentVolumeClaim: + claimName: volsync-nfs - name: mutate-volsync-dst-movers match: any: @@ -61,6 +60,5 @@ spec: mountPath: /repository volumes: - name: repository - nfs: - server: expanse.internal - path: /mnt/eros/Volsync + persistentVolumeClaim: + claimName: volsync-nfs diff --git a/kubernetes/apps/network/kustomization.yaml b/kubernetes/apps/network/kustomization.yaml index d61ca935ce113..592f699ac2e09 100644 --- a/kubernetes/apps/network/kustomization.yaml +++ b/kubernetes/apps/network/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./cloudflare-ddns/ks.yaml - ./cloudflared/ks.yaml diff --git a/kubernetes/apps/observability/kustomization.yaml b/kubernetes/apps/observability/kustomization.yaml index 9a7ec2b6b61c8..1b4b2f489c452 100644 --- a/kubernetes/apps/observability/kustomization.yaml +++ b/kubernetes/apps/observability/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./blackbox-exporter/ks.yaml # - ./cupdate/ks.yaml diff --git a/kubernetes/apps/openebs-system/kustomization.yaml b/kubernetes/apps/openebs-system/kustomization.yaml index edf7815431546..8b4a177050128 100644 --- a/kubernetes/apps/openebs-system/kustomization.yaml +++ b/kubernetes/apps/openebs-system/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./openebs/ks.yaml transformers: diff --git a/kubernetes/apps/rook-ceph/kustomization.yaml b/kubernetes/apps/rook-ceph/kustomization.yaml index 64452136fc9f9..080bf160aff13 100644 --- a/kubernetes/apps/rook-ceph/kustomization.yaml +++ b/kubernetes/apps/rook-ceph/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./rook-ceph/ks.yaml transformers: diff --git a/kubernetes/apps/volsync-system/kustomization.yaml b/kubernetes/apps/volsync-system/kustomization.yaml index 4d7d1a19c5497..6d165a209e122 100644 --- a/kubernetes/apps/volsync-system/kustomization.yaml +++ b/kubernetes/apps/volsync-system/kustomization.yaml @@ -5,7 +5,7 @@ kind: Kustomization resources: # Pre Flux-Kustomizations - ./namespace.yaml - - ../../templates/flux + - ../../includes/alerts # Flux-Kustomizations - ./snapshot-controller/ks.yaml - ./volsync/ks.yaml diff --git a/kubernetes/templates/flux/alert.yaml b/kubernetes/includes/alerts/alert.yaml similarity index 100% rename from kubernetes/templates/flux/alert.yaml rename to kubernetes/includes/alerts/alert.yaml diff --git a/kubernetes/templates/flux/kustomization.yaml b/kubernetes/includes/alerts/kustomization.yaml similarity index 100% rename from kubernetes/templates/flux/kustomization.yaml rename to kubernetes/includes/alerts/kustomization.yaml diff --git a/kubernetes/templates/flux/provider.yaml b/kubernetes/includes/alerts/provider.yaml similarity index 100% rename from kubernetes/templates/flux/provider.yaml rename to kubernetes/includes/alerts/provider.yaml diff --git a/kubernetes/includes/kustomization.yaml b/kubernetes/includes/kustomization.yaml new file mode 100644 index 0000000000000..9a9b327efc48c --- /dev/null +++ b/kubernetes/includes/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: flux-system +resources: [] diff --git a/kubernetes/includes/volsync/kustomization.yaml b/kubernetes/includes/volsync/kustomization.yaml new file mode 100644 index 0000000000000..7a275d3c442d3 --- /dev/null +++ b/kubernetes/includes/volsync/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./pvc.yaml diff --git a/kubernetes/includes/volsync/pvc.yaml b/kubernetes/includes/volsync/pvc.yaml new file mode 100644 index 0000000000000..8134c72c921e0 --- /dev/null +++ b/kubernetes/includes/volsync/pvc.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: volsync-nfs +provisioner: nfs +parameters: + archiveOnDelete: "false" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: volsync-nfs +spec: + storageClassName: volsync-nfs + capacity: + storage: 1Mi # Size does not matter + accessModes: ["ReadWriteMany"] + persistentVolumeReclaimPolicy: Retain + nfs: + server: expanse.internal + path: /mnt/eros/Volsync + mountOptions: + - nfsvers=4.2 + - hard=True + - nconnect=16 + - noatime=True +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: volsync-nfs +spec: + accessModes: ["ReadWriteMany"] + storageClassName: volsync-nfs + resources: + requests: + storage: 1Mi # Size does not matter diff --git a/kubernetes/templates/volsync/kustomization.yaml b/kubernetes/templates/volsync/kustomization.yaml index 768d43bf847a8..9091167d6773b 100644 --- a/kubernetes/templates/volsync/kustomization.yaml +++ b/kubernetes/templates/volsync/kustomization.yaml @@ -3,6 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ./claim.yaml - ./nfs.yaml + - ./pvc.yaml - ./r2.yaml diff --git a/kubernetes/templates/volsync/claim.yaml b/kubernetes/templates/volsync/pvc.yaml similarity index 100% rename from kubernetes/templates/volsync/claim.yaml rename to kubernetes/templates/volsync/pvc.yaml