🚀 local-path-provisioner

This commit is contained in:
auricom
2024-01-25 01:12:17 +01:00
parent 66e14cdbea
commit 05e8b34b3a
6 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app democratic-csi-local-path
namespace: flux-system
spec:
targetNamespace: kube-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: "./kubernetes/apps/kube-system/democratic-csi/local-path"
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app

View File

@@ -0,0 +1,81 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: local-path-provisioner
spec:
interval: 30m
chart:
spec:
chart: democratic-csi
version: 0.14.5
sourceRef:
name: democratic-csi
kind: HelmRepository
namespace: flux-system
values:
csiDriver:
name: "org.democratic-csi.local-hostpath"
attachRequired: false
storageCapacity: true # With storage capacity tracking, the scheduler filters out nodes which do not have enough capacity.
fsGroupPolicy: File # fsGroupChangePolicy
storageClasses:
- name: local-hostpath
defaultClass: false
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
# distributed support is not yet ready for expansion
allowVolumeExpansion: false
volumeSnapshotClasses:
- name: local-hostpath
deletionPolicy: Delete
parameters:
dummy: {}
controller:
enabled: true
strategy: node
externalAttacher:
enabled: false
externalProvisioner:
enabled: true
image: registry.k8s.io/sig-storage/csi-provisioner:v4.0.0
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
externalSnapshotter:
enabled: true
extraArgs:
- --leader-election=false
- --node-deployment=true
node:
driver:
extraVolumeMounts:
- name: local-hostpath
mountPath: /var/mnt/sata/demo-csi-local-path
mountPropagation: Bidirectional
driverRegistrar:
enabled: true
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0
extraVolumes:
- name: local-hostpath
hostPath:
path: /var/mnt/sata/demo-csi-local-path
type: DirectoryOrCreate
driver:
config:
driver: local-hostpath
instance_id:
local-hostpath:
shareBasePath: "/var/mnt/sata/demo-csi-local-path"
controllerBasePath: "/var/mnt/sata/demo-csi-local-path"
dirPermissionsMode: "0770"
dirPermissionsUser: 0
dirPermissionsGroup: 0

View File

@@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

View File

@@ -7,6 +7,7 @@ resources:
- ./namespace.yaml
# Flux-Kustomizations
- ./cilium/ks.yaml
- ./democratic-csi/ks.yaml
- ./descheduler/ks.yaml
- ./external-secrets/ks.yaml
- ./intel-device-plugin/ks.yaml