🚀 local-path-provisioner

This commit is contained in:
auricom
2023-11-15 19:25:34 +01:00
parent 0744b16b57
commit 6ff46ee7ae
6 changed files with 116 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ resources:
- ./external-secrets/ks.yaml - ./external-secrets/ks.yaml
- ./intel-device-plugin/ks.yaml - ./intel-device-plugin/ks.yaml
- ./kubelet-csr-approver/ks.yaml - ./kubelet-csr-approver/ks.yaml
- ./local-path-provisioner/ks.yaml
- ./metrics-server/ks.yaml - ./metrics-server/ks.yaml
- ./node-feature-discovery/ks.yaml - ./node-feature-discovery/ks.yaml
- ./reloader/ks.yaml - ./reloader/ks.yaml

View File

@@ -0,0 +1,74 @@
---
# 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: &app local-path-provisioner
namespace: kube-system
spec:
interval: 30m
chart:
spec:
chart: ./deploy/chart/local-path-provisioner
sourceRef:
kind: GitRepository
name: local-path-provisioner
namespace: flux-system
maxHistory: 2
install:
createNamespace: true
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
replicaCount: 2
helperImage:
repository: public.ecr.aws/docker/library/busybox
tag: latest
storageClass:
defaultClass: false
nodePathMap:
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES
paths: ["/var/lib/kubernetes/storage"]
# 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}

View File

@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/kustomization.json
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kube-system
resources:
- ./helmrelease.yaml

View File

@@ -0,0 +1,16 @@
---
# 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: cluster-apps-local-path-provisioner
namespace: flux-system
spec:
path: ./kubernetes/apps/kube-system/local-path-provisioner/app
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
interval: 30m
retryInterval: 1m
timeout: 3m

View File

@@ -24,6 +24,7 @@ resources:
- ./intel.yaml - ./intel.yaml
- ./jetstack.yaml - ./jetstack.yaml
- ./kyverno.yaml - ./kyverno.yaml
- ./local-path-provisioner.yaml
- ./metrics-server.yaml - ./metrics-server.yaml
- ./node-feature-discovery.yaml - ./node-feature-discovery.yaml
- ./piraeus.yaml - ./piraeus.yaml

View File

@@ -0,0 +1,17 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/source.toolkit.fluxcd.io/gitrepository_v1.json
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.24
ignore: |
# exclude all
/*
# include kubernetes directory
!/deploy/chart/local-path-provisioner