kubernetes-sigs / nfs-ganesha-server-and-external-provisioner

NFS Ganesha Server and Volume Provisioner.
Apache License 2.0
427 stars 144 forks source link

NFS share is not created when PVC and PV are not created via app/deploymentset. #103

Closed ganniterix closed 2 years ago

ganniterix commented 2 years ago

I have deployed the NFS service and it works when volumes are automatically created with the volumeClaimTemplate. An NFS share is generated and all is fine. However, when I create a PVC and PV, it does not seem to generate the relative NFS share.

Storage class

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mynfs-nfs
mountOptions:
- vers=4.1
provisioner: mynfs/nfs
reclaimPolicy: Delete
volumeBindingMode: Immediate

PV (create with and without provisioner_id, no change)

apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 30Gi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: pvc-storage
    namespace: shares
  nfs:
    path: /export/storage
    server: 10.158.1.1
  persistentVolumeReclaimPolicy: Retain
  storageClassName: mynfs-nfs
  volumeMode: Filesystem

PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-storage
  namespace: shares
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 30Gi
  storageClassName: mynfs-nfs
  volumeMode: Filesystem
  volumeName: storage

I did notice that the EXPORT section is not present when getting the yaml details of the volume, and also vfs.conf is not updated.

EDIT

The path mentioned above, /export/storage is also not created. It seems the whole folder, and export initialization is skipped.

kvaps commented 2 years ago

Why are you trying to create PV manually? nfs-server-provisioner should do this automatically

ganniterix commented 2 years ago

Because I want to create a volume, that is to be shared as an NFS share externally, and I would like to not have a name that is like pvc-***.

kvaps commented 2 years ago

I have worries that this will not work. nfs-server-provisioner generates config for each PVC, then exports it, then creates PV. This is main workflow.

ganniterix commented 2 years ago

Does this mean that there is no way to manually set the name of a share?

kvaps commented 2 years ago

yes, currently there in no such opportunity

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

DekelDevunet commented 2 years ago

@kvaps How can one set up PV if he disabled StorageClass?

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 2 years ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner/issues/103#issuecomment-1287233847): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.