-
Notifications
You must be signed in to change notification settings - Fork 275
feat: implement CreateVolume
#53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Delete is supported now right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pls fix this later. |
||
volumeBindingMode: Immediate | ||
mountOptions: | ||
- hard | ||
- nfsvers=4.1 |
Uh oh!
There was an error while loading. Please reload this page.