Skip to content

Commit

Permalink
feat(infrastructure): add nfs PVC provisioner
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo committed Sep 29, 2023
1 parent 8a50ad6 commit b803022
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: nfs-server-provisioner
namespace: flux-system
spec:
interval: 60m
url: https://kubernetes-sigs.github.io/nfs-ganesha-server-and-external-provisioner/
5 changes: 3 additions & 2 deletions infrastructure/_base/sources/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- git-repo-prometheus-operator.yaml
- helm-repo-bitnami.yaml
- helm-repo-rook.yaml
- helm-repo-ingress-nginx.yaml
- git-repo-prometheus-operator.yaml
- helm-repo-nfs-server-provisioner.yaml
- helm-repo-rook.yaml
1 change: 1 addition & 0 deletions infrastructure/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ resources:
- ../_base
- nginx
- rook-ceph
- nfs-pvc-provisioner
5 changes: 5 additions & 0 deletions infrastructure/prod/nfs-pvc-provisioner/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- release.yaml
10 changes: 10 additions & 0 deletions infrastructure/prod/nfs-pvc-provisioner/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: nfs
annotations:
scheduler.alpha.kubernetes.io/defaultTolerations:
'[{"operator": "Equal", "effect": "NoSchedule", "key": "dedicated",
"value": "test-infra"}]'
scheduler.alpha.kubernetes.io/node-selector: enable-ci=true
38 changes: 38 additions & 0 deletions infrastructure/prod/nfs-pvc-provisioner/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: nfs-server-provisioner
namespace: nfs
spec:
dependsOn:
- name: rook-ceph-cluster
namespace: rook-ceph
chart:
spec:
chart: nfs-server-provisioner
sourceRef:
kind: HelmRepository
name: nfs-server-provisioner
namespace: flux-system
version: "1.8.0"
interval: 1h0m0s
install:
remediation:
retries: 3
values:
replicaCount: 1
image:
repository: registry.k8s.io/sig-storage/nfs-provisioner
tag: v4.0.8
persistence:
enabled: true
storageClass: ceph-block
accessMode: ReadWriteOnce
size: 1Ti
nodeSelector:
kubernetes.io/arch: amd64
resources:
limits:
cpu: "2"
memory: 8Gi

0 comments on commit b803022

Please sign in to comment.