From 677445fdaa9d7c49aaacc02615f97765bc64880d Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Mon, 3 Apr 2023 00:47:24 -0400 Subject: [PATCH] Add local-path-provisioner just in case --- cluster/core/storage/kustomization.yaml | 5 +- .../storage/local-path-provisioner/helm.yaml | 82 +++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 cluster/core/storage/local-path-provisioner/helm.yaml diff --git a/cluster/core/storage/kustomization.yaml b/cluster/core/storage/kustomization.yaml index c85f8d1..b19655b 100644 --- a/cluster/core/storage/kustomization.yaml +++ b/cluster/core/storage/kustomization.yaml @@ -1,4 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -resources: -- ./longhorn \ No newline at end of file +resources: [] +#- ./longhorn +#- ./local-path-provisioner \ No newline at end of file diff --git a/cluster/core/storage/local-path-provisioner/helm.yaml b/cluster/core/storage/local-path-provisioner/helm.yaml new file mode 100644 index 0000000..56767b7 --- /dev/null +++ b/cluster/core/storage/local-path-provisioner/helm.yaml @@ -0,0 +1,82 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: GitRepository +metadata: + name: local-path-provisioner + namespace: flux-system +spec: + interval: 1m + url: https://github.com/rancher/local-path-provisioner.git + ref: + tag: v0.0.24 +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: local-path-provisioner + namespace: kube-system +spec: + interval: 15m + chart: + spec: + chart: ./deploy/chart/local-path-provisioner + sourceRef: + kind: GitRepository + name: local-path-provisioner + namespace: flux-system + maxHistory: 3 + install: + createNamespace: true + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + retries: 3 + uninstall: + keepHistory: false + values: + helperImage: + repository: public.ecr.aws/docker/library/busybox + tag: latest + storageClass: + defaultClass: false + nodePathMap: + - node: DEFAULT_PATH_FOR_NON_LISTED_NODES + paths: ["/var/lib/rancher/k3s/storage"] + # Note: Do not enable Flux variable substitution on this HelmRelease + configmap: + setup: |- + #!/bin/sh + while getopts "m:s:p:" opt + do + case $opt in + p) + absolutePath=$OPTARG + ;; + s) + sizeInBytes=$OPTARG + ;; + m) + volMode=$OPTARG + ;; + esac + done + mkdir -m 0777 -p ${absolutePath} + chmod 701 ${absolutePath}/.. + teardown: |- + #!/bin/sh + while getopts "m:s:p:" opt + do + case $opt in + p) + absolutePath=$OPTARG + ;; + s) + sizeInBytes=$OPTARG + ;; + m) + volMode=$OPTARG + ;; + esac + done + rm -rf ${absolutePath} \ No newline at end of file