feat!: replace rancher/local-path-provisioner with democratic-csi in local-hostpath mode

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2023-12-27 14:23:29 -05:00
1 parent 79c7dd7ed1
commit 44da0c1022
14 files changed
+78 -89

No files matched your search

@@ -7,12 +7,12 @@ spec:
interval: 30m
chart:
spec:
chart: ./deploy/chart/local-path-provisioner
chart: democratic-csi
version: 0.14.3
sourceRef:
kind: GitRepository
name: local-path-provisioner
name: democratic-csi
kind: HelmRepository
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
@@ -23,51 +23,54 @@ spec:
uninstall:
keepHistory: false
values:
image:
repository: docker.io/rancher/local-path-provisioner
tag: v0.0.26
helperImage:
repository: public.ecr.aws/docker/library/busybox
tag: latest
storageClass:
defaultClass: false
nodePathMap:
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES
paths: ["{{ bootstrap_local_path_provisioner_path | default('/var/lib/rancher/k3s/storage', true) }}"]
# 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}
fullnameOverride: local-path-provisioner
controller:
strategy: node
externalProvisioner:
image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.3
extraArgs:
- --leader-election=false
- --node-deployment=true
- --node-deployment-immediate-binding=false
- --feature-gates=Topology=true
- --strict-topology=true
- --enable-capacity=true
- --capacity-ownerref-level=1
externalResizer:
enabled: false
externalAttacher:
enabled: false
externalSnapshotter:
enabled: false
csiDriver:
name: local-hostpath.cluster.local
storageCapacity: true
attachRequired: false
fsGroupPolicy: File
storageClasses:
- name: local-hostpath
defaultClass: false
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
driver:
config:
driver: local-hostpath
local-hostpath:
shareBasePath: &storagePath "{{ bootstrap_local_path_provisioner_path | default('/var/lib/rancher/k3s/local-hostpath', true) }}"
controllerBasePath: *storagePath
dirPermissionsMode: "0770"
dirPermissionsUser: 0
dirPermissionsGroup: 0
node:
driver:
image: ghcr.io/democratic-csi/democratic-csi:v1.8.4
extraVolumeMounts:
- name: local-hostpath
mountPath: *storagePath
mountPropagation: Bidirectional
extraVolumes:
- name: local-hostpath
hostPath:
path: *storagePath
type: DirectoryOrCreate
@@ -1,5 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./local-path-provisioner.yaml
resources: []
@@ -1,16 +0,0 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: local-path-provisioner
namespace: flux-system
spec:
interval: 30m
url: https://github.com/rancher/local-path-provisioner
ref:
tag: v0.0.26
ignore: |
# exclude all
/*
# include kubernetes directory
!/deploy/chart/local-path-provisioner
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/source.toolkit.fluxcd.io/helmrepository_v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: democratic-csi
namespace: flux-system
spec:
interval: 1h
url: https://democratic-csi.github.io/charts/
@@ -8,6 +8,7 @@ resources:
- ./cilium.yaml
- ./coredns.yaml
- ./csi-driver-nfs.yaml
- ./democratic-csi.yaml
- ./external-dns.yaml
- ./grafana.yaml
- ./hajimari.yaml
@@ -4,4 +4,4 @@ kind: Kustomization
resources:
- ./git
- ./helm
# - ./oci
- ./oci
Whitespace-only changes.
@@ -0,0 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []