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
+77 -88

No files matched your search

-10
View File
@@ -67,16 +67,6 @@
}, },
"separateMinorPatch": true "separateMinorPatch": true
}, },
{
"description": "Local Path Provisioner Group",
"groupName": "Local Path Provisioner",
"matchPackagePatterns": ["local-path-provisioner"],
"matchDatasources": ["docker", "github-tags"],
"group": {
"commitMessageTopic": "{{{groupName}}} group"
},
"separateMinorPatch": true
},
{ {
"description": "System Upgrade Controller Group", "description": "System Upgrade Controller Group",
"groupName": "System Upgrade Controller", "groupName": "System Upgrade Controller",
+1 -1
View File
@@ -502,7 +502,7 @@ To browse or get ideas on applications people are running, community member [@wh
#### Storage #### Storage
The included CSI (`local-path-provisioner`) is a great start for storage but soon you might find you need more features like replicated block storage, or to connect to a NFS/SMB/iSCSI server. If you need any of those features be sure to check out the projects like [rook-ceph](https://github.com/rook/rook), [longhorn](https://github.com/longhorn/longhorn), [openebs](https://github.com/openebs/openebs), [democratic-csi](https://github.com/democratic-csi/democratic-csi), [csi-driver-nfs](https://github.com/kubernetes-csi/csi-driver-nfs), The included CSI (democratic-csi in local-hostpath mode) is a great start for storage but soon you might find you need more features like replicated block storage, or to connect to a NFS/SMB/iSCSI server. If you need any of those features be sure to check out the projects like [rook-ceph](https://github.com/rook/rook), [longhorn](https://github.com/longhorn/longhorn), [openebs](https://github.com/openebs/openebs), [democratic-csi](https://github.com/democratic-csi/democratic-csi), [csi-driver-nfs](https://github.com/kubernetes-csi/csi-driver-nfs),
and [synology-csi](https://github.com/SynologyOpenSource/synology-csi). and [synology-csi](https://github.com/SynologyOpenSource/synology-csi).
#### Authenticate Flux over SSH #### Authenticate Flux over SSH
@@ -168,6 +168,6 @@ spec:
- *host - *host
persistence: persistence:
enabled: true enabled: true
storageClassName: local-path storageClassName: local-hostpath
testFramework: testFramework:
enabled: false enabled: false
@@ -116,7 +116,7 @@ data:
storageSpec: storageSpec:
volumeClaimTemplate: volumeClaimTemplate:
spec: spec:
storageClassName: local-path storageClassName: local-hostpath
resources: resources:
requests: requests:
storage: 10Gi storage: 10Gi
@@ -17,7 +17,7 @@ k3s_server:
disable: disable:
- coredns # Disable coredns - replaced with Coredns Helm Chart - coredns # Disable coredns - replaced with Coredns Helm Chart
- flannel # Disable flannel - replaced with Cilium Helm Chart - flannel # Disable flannel - replaced with Cilium Helm Chart
- local-storage # Disable local-path-provisioner - installed with Flux - local-storage # Disable local-path-provisioner - replaced with democratic-csi
- metrics-server # Disable metrics-server - installed with Flux - metrics-server # Disable metrics-server - installed with Flux
- servicelb # Disable servicelb - replaced with Cilium Helm Chart - servicelb # Disable servicelb - replaced with Cilium Helm Chart
- traefik # Disable traefik - replaced with ingress-nginx and installed with Flux - traefik # Disable traefik - replaced with ingress-nginx and installed with Flux
@@ -7,12 +7,12 @@ spec:
interval: 30m interval: 30m
chart: chart:
spec: spec:
chart: ./deploy/chart/local-path-provisioner chart: democratic-csi
version: 0.14.3
sourceRef: sourceRef:
kind: GitRepository name: democratic-csi
name: local-path-provisioner kind: HelmRepository
namespace: flux-system namespace: flux-system
maxHistory: 2
install: install:
remediation: remediation:
retries: 3 retries: 3
@@ -23,51 +23,54 @@ spec:
uninstall: uninstall:
keepHistory: false keepHistory: false
values: values:
image: fullnameOverride: local-path-provisioner
repository: docker.io/rancher/local-path-provisioner controller:
tag: v0.0.26 strategy: node
helperImage: externalProvisioner:
repository: public.ecr.aws/docker/library/busybox image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.3
tag: latest extraArgs:
storageClass: - --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 defaultClass: false
nodePathMap: reclaimPolicy: Delete
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES volumeBindingMode: WaitForFirstConsumer
paths: ["{{ bootstrap_local_path_provisioner_path | default('/var/lib/rancher/k3s/storage', true) }}"] allowVolumeExpansion: true
# NOTE: Do not enable Flux variable substitution on this HelmRelease driver:
configmap: config:
setup: |- driver: local-hostpath
#!/bin/sh local-hostpath:
while getopts "m:s:p:" opt shareBasePath: &storagePath "{{ bootstrap_local_path_provisioner_path | default('/var/lib/rancher/k3s/local-hostpath', true) }}"
do controllerBasePath: *storagePath
case $opt in dirPermissionsMode: "0770"
p) dirPermissionsUser: 0
absolutePath=$OPTARG dirPermissionsGroup: 0
;; node:
s) driver:
sizeInBytes=$OPTARG image: ghcr.io/democratic-csi/democratic-csi:v1.8.4
;; extraVolumeMounts:
m) - name: local-hostpath
volMode=$OPTARG mountPath: *storagePath
;; mountPropagation: Bidirectional
esac extraVolumes:
done - name: local-hostpath
mkdir -m 0777 -p ${absolutePath} hostPath:
chmod 701 ${absolutePath}/.. path: *storagePath
teardown: |- type: DirectoryOrCreate
#!/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}
@@ -1,5 +1,4 @@
--- ---
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources: []
- ./local-path-provisioner.yaml
@@ -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 - ./cilium.yaml
- ./coredns.yaml - ./coredns.yaml
- ./csi-driver-nfs.yaml - ./csi-driver-nfs.yaml
- ./democratic-csi.yaml
- ./external-dns.yaml - ./external-dns.yaml
- ./grafana.yaml - ./grafana.yaml
- ./hajimari.yaml - ./hajimari.yaml
@@ -4,4 +4,4 @@ kind: Kustomization
resources: resources:
- ./git - ./git
- ./helm - ./helm
# - ./oci - ./oci
Whitespace-only changes.
@@ -0,0 +1,4 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
+2 -4
View File
@@ -62,10 +62,8 @@ bootstrap_cluster_cidr: 10.42.0.0/16
# (Advanced) For ipv6 use format 10.43.0.0/16,fd78:c889:47fb:e0::/112 # (Advanced) For ipv6 use format 10.43.0.0/16,fd78:c889:47fb:e0::/112
bootstrap_service_cidr: 10.43.0.0/16 bootstrap_service_cidr: 10.43.0.0/16
# (Advanced) Path for local-path-provisioner to use for storage on ALL nodes # (Advanced) Path for democratic-csi local-hostpath to use for storage on ALL nodes
# If changing this value to anything other than the default bootstrap_local_path_provisioner_path: /var/lib/rancher/k3s/local-hostpath
# make sure the path exists and is owned by root:root with 701 permissions
bootstrap_local_path_provisioner_path: /var/lib/rancher/k3s/storage
# Node information # Node information
bootstrap_nodes: bootstrap_nodes: