Add localpath provisioner.
This commit is contained in:
parent
08ac08c6a8
commit
02bd06defc
5 changed files with 120 additions and 0 deletions
9
kubernetes/apps/storage/kustomization.yaml
Normal file
9
kubernetes/apps/storage/kustomization.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
# Pre Flux-Kustomizations
|
||||||
|
- ./namespace.yaml
|
||||||
|
# Flux-Kustomizations
|
||||||
|
- ./local-path-provisioner/ks.yaml
|
|
@ -0,0 +1,77 @@
|
||||||
|
---
|
||||||
|
# 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
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
cleanupOnFail: true
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
uninstall:
|
||||||
|
keepHistory: false
|
||||||
|
values:
|
||||||
|
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 /mnt/localpath
|
||||||
|
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
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ./helmrelease.yaml
|
21
kubernetes/apps/storage/local-path-provisioner/ks.yaml
Normal file
21
kubernetes/apps/storage/local-path-provisioner/ks.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
# 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 local-path-provisioner
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
targetNamespace: storage
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./kubernetes/apps/storage/local-path-provisioner/app
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: homelab
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
7
kubernetes/apps/storage/namespace.yaml
Normal file
7
kubernetes/apps/storage/namespace.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: storage
|
||||||
|
labels:
|
||||||
|
kustomize.toolkit.fluxcd.io/prune: disabled
|
Loading…
Reference in a new issue