From 4e9c7e89966201d90d4a680089393540dd135e91 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Tue, 21 Mar 2023 10:00:17 +0800 Subject: [PATCH] feat: add external-snapshotter Signed-off-by: JJGadgets --- .../Biohazard/2-config/5-deploy.yaml | 11 ++++++ .../1-external-snapshotter/1-crds.yaml | 36 ++++++++++++++++++ .../1-external-snapshotter/2-controller.yaml | 37 +++++++++++++++++++ .../1-external-snapshotter/kustomization.yaml | 6 +++ 4 files changed, 90 insertions(+) create mode 100644 kube/3-deploy/1-core/02-storage/1-external-snapshotter/1-crds.yaml create mode 100644 kube/3-deploy/1-core/02-storage/1-external-snapshotter/2-controller.yaml create mode 100644 kube/3-deploy/1-core/02-storage/1-external-snapshotter/kustomization.yaml diff --git a/kube/1-clusters/Biohazard/2-config/5-deploy.yaml b/kube/1-clusters/Biohazard/2-config/5-deploy.yaml index e69dbed6..fb645497 100644 --- a/kube/1-clusters/Biohazard/2-config/5-deploy.yaml +++ b/kube/1-clusters/Biohazard/2-config/5-deploy.yaml @@ -22,6 +22,15 @@ spec: path: ./kube/3-deploy/1-core/01-networking/cilium dependsOn: [] --- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: biohazard-1-core-02-storage-1-external-snapshotter + namespace: flux-system +spec: + path: ./kube/3-deploy/1-core/02-storage/1-external-snapshotter + dependsOn: [] +--- apiVersion: source.toolkit.fluxcd.io/v1beta2 kind: HelmRepository metadata: @@ -49,6 +58,7 @@ metadata: spec: path: ./kube/3-deploy/1-core/02-storage/rook-ceph/app dependsOn: + - name: biohazard-1-core-02-storage-1-external-snapshotter - name: biohazard-1-core-02-storage-rook-ceph-crds --- apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 @@ -59,6 +69,7 @@ metadata: spec: path: ./kube/3-deploy/1-core/02-storage/rook-ceph/cluster dependsOn: + - name: biohazard-1-core-02-storage-1-external-snapshotter - name: biohazard-1-core-02-storage-rook-ceph-app --- apiVersion: source.toolkit.fluxcd.io/v1beta2 diff --git a/kube/3-deploy/1-core/02-storage/1-external-snapshotter/1-crds.yaml b/kube/3-deploy/1-core/02-storage/1-external-snapshotter/1-crds.yaml new file mode 100644 index 00000000..c560f0f8 --- /dev/null +++ b/kube/3-deploy/1-core/02-storage/1-external-snapshotter/1-crds.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: GitRepository +metadata: + name: external-snapshotter-crds + namespace: flux-system +spec: + interval: 10m0s + url: https://github.com/kubernetes-csi/external-snapshotter.git + ref: + branch: release-6.2 + ignore: | + # exclude all to whitelist + /* + # include CR + !/client/config/crd +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: external-snapshotter-crds + namespace: flux-system + labels: # for my repo's Fluxtomization patching, can be ignored for those passing by + kustomization.flux.home.arpa/name: "flux" + kustomization.flux.home.arpa/default: "false" + kustomization.flux.home.arpa/helmpatches: "false" + substitution.flux.home.arpa/disabled: "true" + prune.flux.home.arpa/disabled: "true" +spec: + interval: 5m + prune: false + wait: true + sourceRef: + kind: GitRepository + name: external-snapshotter-crds + dependsOn: [] diff --git a/kube/3-deploy/1-core/02-storage/1-external-snapshotter/2-controller.yaml b/kube/3-deploy/1-core/02-storage/1-external-snapshotter/2-controller.yaml new file mode 100644 index 00000000..9fad2b52 --- /dev/null +++ b/kube/3-deploy/1-core/02-storage/1-external-snapshotter/2-controller.yaml @@ -0,0 +1,37 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: GitRepository +metadata: + name: external-snapshotter-controller + namespace: flux-system +spec: + interval: 10m0s + url: https://github.com/kubernetes-csi/external-snapshotter.git + ref: + branch: release-6.2 + ignore: | + # exclude all to whitelist + /* + # include controller + !/deploy/kubernetes/snapshot-controller +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: external-snapshotter-controller + namespace: flux-system + labels: # for my repo's Fluxtomization patching, can be ignored for those passing by + kustomization.flux.home.arpa/name: "flux" + kustomization.flux.home.arpa/default: "false" + kustomization.flux.home.arpa/helmpatches: "false" + substitution.flux.home.arpa/disabled: "true" + prune.flux.home.arpa/disabled: "true" +spec: + interval: 5m + prune: false + wait: true + sourceRef: + kind: GitRepository + name: external-snapshotter-controller + dependsOn: + - name: external-snapshotter-crds diff --git a/kube/3-deploy/1-core/02-storage/1-external-snapshotter/kustomization.yaml b/kube/3-deploy/1-core/02-storage/1-external-snapshotter/kustomization.yaml new file mode 100644 index 00000000..18030b7f --- /dev/null +++ b/kube/3-deploy/1-core/02-storage/1-external-snapshotter/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - 1-crds.yaml + - 2-controller.yaml