-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement CreateVolume and DeleteVolume
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
- Loading branch information
1 parent
974337e
commit 93523b2
Showing
12 changed files
with
531 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: statefulset-nfs | ||
labels: | ||
app: nginx | ||
spec: | ||
serviceName: statefulset-nfs | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
nodeSelector: | ||
"kubernetes.io/os": linux | ||
containers: | ||
- name: statefulset-nfs | ||
image: mcr.microsoft.com/oss/nginx/nginx:1.17.3-alpine | ||
command: | ||
- "/bin/sh" | ||
- "-c" | ||
- while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done | ||
volumeMounts: | ||
- name: persistent-storage | ||
mountPath: /mnt/nfs | ||
updateStrategy: | ||
type: RollingUpdate | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: persistent-storage | ||
annotations: | ||
volume.beta.kubernetes.io/storage-class: nfs-csi | ||
spec: | ||
accessModes: ["ReadWriteOnce"] | ||
resources: | ||
requests: | ||
storage: 10Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: nfs-csi | ||
provisioner: nfs.csi.k8s.io | ||
parameters: | ||
server: nfs-server.default.svc.cluster.local | ||
share: / | ||
reclaimPolicy: Retain # only retain is supported | ||
volumeBindingMode: Immediate | ||
mountOptions: | ||
- hard | ||
- nfsvers=4.1 |
Oops, something went wrong.