adding local path provisioner for low complexity and fast read/write volumes for now.

This commit is contained in:
Joseph Hanson 2023-11-27 12:44:06 -06:00
parent fd0228c5f9
commit ef7da6eb75
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
5 changed files with 140 additions and 0 deletions

View file

@ -0,0 +1,19 @@
---
# 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: &appname democratic-csi-local-path
namespace: flux-system
spec:
targetNamespace: system
commonMetadata:
labels:
app.kubernetes.io/name: *appname
path: "./kubernetes/apps/system/democratic-csi/local-path"
sourceRef:
kind: GitRepository
name: valinor
interval: 10m
prune: true
wait: true

View file

@ -0,0 +1,88 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: local-path-provisioner
spec:
interval: 30m
chart:
spec:
chart: democratic-csi
version: 0.14.2
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:v3.6.2
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/lpnvme/demo-csi-local-path
mountPropagation: Bidirectional
driverRegistrar:
enabled: true
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.1
extraVolumes:
- name: local-hostpath
hostPath:
path: /var/mnt/lpnvme/demo-csi-local-path
type: DirectoryOrCreate
driver:
config:
driver: local-hostpath
instance_id:
local-hostpath:
shareBasePath: "/var/mnt/lpnvme/demo-csi-local-path"
controllerBasePath: "/var/mnt/lpnvme/demo-csi-local-path"
dirPermissionsMode: "0770"
dirPermissionsUser: 0
dirPermissionsGroup: 0

View file

@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

View file

@ -0,0 +1,11 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: democratic-csi
namespace: flux-system
spec:
interval: 30m
url: https://democratic-csi.github.io/charts/
timeout: 3m

View file

@ -75,6 +75,10 @@ nodes:
talosImageURL: factory.talos.dev/installer/96f8c146a67c80daad900d3fc1a6976fe11062321eee9ab6ae2a6aea88b2d26e talosImageURL: factory.talos.dev/installer/96f8c146a67c80daad900d3fc1a6976fe11062321eee9ab6ae2a6aea88b2d26e
installDiskSelector: installDiskSelector:
busPath: /pci0000:00/0000:00:03.1/0000:27:00.0/nvme/nvme0/nvme0n1 busPath: /pci0000:00/0000:00:03.1/0000:27:00.0/nvme/nvme0/nvme0n1
machineDisks:
- device: /dev/disk/by-id/nvme-SAMSUNG_MZVLB512HBJQ-00000_S4GENX0N424497
partitions:
- mountpoint: /var/mnt/lpnvme
networkInterfaces: networkInterfaces:
- interface: enp35s0 - interface: enp35s0
dhcp: true dhcp: true
@ -88,6 +92,18 @@ nodes:
- network: 10.2.0.0/16 - network: 10.2.0.0/16
gateway: 10.2.1.1 # The route's gateway (if empty, creates link scope route). gateway: 10.2.1.1 # The route's gateway (if empty, creates link scope route).
metric: 2048 metric: 2048
patches:
- |-
machine:
kubelet:
extraMounts:
- destination: /var/mnt/lpnvme
type: bind
source: /var/mnt/lpnvme
options:
- rbind
- rshared
- rw
# VM on Bare-metal EX44 Proxmox pve - 13th Gen Intel(R) Core(TM) i5-13500 - 64GB RAM # VM on Bare-metal EX44 Proxmox pve - 13th Gen Intel(R) Core(TM) i5-13500 - 64GB RAM
# - hostname: orome.hsn.dev # - hostname: orome.hsn.dev
# disableSearchDomain: true # disableSearchDomain: true