add nfs-provisioner with sensible path template
This commit is contained in:
parent
571aebe78d
commit
eff07665de
20
infrastructure/nfs-provisioner/README.md
Normal file
20
infrastructure/nfs-provisioner/README.md
Normal file
@ -0,0 +1,20 @@
|
||||
## How to use
|
||||
This deployment exposes a `StorageClass` named `nfs-client` that can be used to create `PersistentVolumeClaim` resources:
|
||||
|
||||
|
||||
```
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: test-claim
|
||||
namespace: test-namespace
|
||||
spec:
|
||||
storageClassName: nfs-client
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Mi
|
||||
```
|
||||
|
||||
This will create a new folder in the NFS server under `<base-path>/test-namespace/test-claim` and mount it.
|
12
infrastructure/nfs-provisioner/kustomization.yaml
Normal file
12
infrastructure/nfs-provisioner/kustomization.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: nfs-provisioner
|
||||
|
||||
resources:
|
||||
- github.com/kubernetes-sigs/nfs-subdir-external-provisioner//deploy
|
||||
- namespace.yaml
|
||||
|
||||
patches:
|
||||
- path: nfs_values.yaml
|
||||
- path: storageclass_values.yaml
|
4
infrastructure/nfs-provisioner/namespace.yaml
Normal file
4
infrastructure/nfs-provisioner/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: placeholder
|
21
infrastructure/nfs-provisioner/nfs_values.yaml
Normal file
21
infrastructure/nfs-provisioner/nfs_values.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: nfs-client-provisioner
|
||||
name: nfs-client-provisioner
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: nfs-client-provisioner
|
||||
env:
|
||||
- name: NFS_SERVER
|
||||
value: 192.168.1.157
|
||||
- name: NFS_PATH
|
||||
value: /export/kluster/
|
||||
volumes:
|
||||
- name: nfs-client-root
|
||||
nfs:
|
||||
server: 192.168.1.157
|
||||
path: /export/kluster/
|
7
infrastructure/nfs-provisioner/storageclass_values.yaml
Normal file
7
infrastructure/nfs-provisioner/storageclass_values.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: nfs-client
|
||||
parameters:
|
||||
archiveOnDelete: "true"
|
||||
pathPattern: "${.PVC.namespace}/${.PVC.name}"
|
@ -11,6 +11,7 @@ resources:
|
||||
|
||||
# infrastructure apps
|
||||
- projects.yaml
|
||||
- nfs-provisioner/
|
||||
- backup/
|
||||
- pg-ha/
|
||||
- gitea/
|
||||
|
18
kluster-deployments/nfs-provisioner/application.yaml
Normal file
18
kluster-deployments/nfs-provisioner/application.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: nfs-provisioner-application
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: infrastructure
|
||||
source:
|
||||
repoURL: git@github.com:moll-re/bootstrap-k3s-infra.git
|
||||
targetRevision: main
|
||||
path: infrastructure/nfs-provisioner/
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: nfs-provisioner
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
4
kluster-deployments/nfs-provisioner/kustomization.yaml
Normal file
4
kluster-deployments/nfs-provisioner/kustomization.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- application.yaml
|
Loading…
x
Reference in New Issue
Block a user