Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stoneshi-yunify authored Sep 11, 2024
1 parent c43e597 commit 52914b1
Showing 1 changed file with 44 additions and 9 deletions.
53 changes: 44 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ make deploy
```

### Test
Create a PVC and check if it can be automatically bound. Take [this](./config/samples/PVC.yaml) for example.
Create a PVC and check if it can be automatically bound. Take [this](./config/samples/pvc.yaml) for example.

### Undeploy
To uninstall the controller:
Expand All @@ -37,19 +37,54 @@ make undeploy
```

## Events
PV creation events will be issued targeting the PVC object.
PV create/update events will be issued targeting the PVC object.

e.g.
```sh
$ kubectl describe pvc pvc-nfs
Name: pvc-nfs
Namespace: default
...
StorageClass:
Status: Pending
Volume: pvc-f6c5a1c9-cbfc-4994-8079-956024db8e52
Labels: <none>
Annotations: storage.kubesphere.io/nfs-path: aaa
storage.kubesphere.io/nfs-server: test.nfs.server.com
storage.kubesphere.io/nfs-static-provision: true
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 0
Access Modes:
VolumeMode: Filesystem
Used By: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ParsePVFailed 30s (x14 over 71s) nfs-pv-static-provisioner failed to parse pv from pvc, error: annotation storage.kubesphere.io/nfs-path not found or has invalid value
Normal FailedBinding 6s (x6 over 71s) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
Normal VolumeNameUpdated 6s nfs-pv-static-provisioner volumeName updated successfully
Warning CreatePVFailed 3s (x10 over 6s) nfs-pv-static-provisioner failed to create pv pvc-091ecc93-698e-4421-b758-d4883a786aea, error: PersistentVolume "pvc-091ecc93-698e-4421-b758-d4883a786aea" is invalid: spec.nfs.path: Invalid value: "aaa": must be an absolute path
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 9s persistentvolume-controller no persistent volumes available for this claim and no storage class is set
Normal VolumeNameUpdated 9s nfs-pv-static-provisioner volumeName updated successfully
Warning CreatePVFailed 4s (x11 over 9s) nfs-pv-static-provisioner failed to create pv pvc-f6c5a1c9-cbfc-4994-8079-956024db8e52, error: PersistentVolume "pvc-f6c5a1c9-cbfc-4994-8079-956024db8e52" is invalid: spec.nfs.path: Invalid value: "aaa": must be an absolute path
```

```sh
$ kubectl describe pvc pvc-nfs
Name: pvc-nfs
Namespace: default
StorageClass:
Status: Bound
Volume: pvc-f6f9747e-3479-4664-a32f-268b2c62f0bd
Labels: <none>
Annotations: pv.kubernetes.io/bind-completed: yes
storage.kubesphere.io/nfs-path: /a/b
storage.kubesphere.io/nfs-server: test.nfs.server.com
storage.kubesphere.io/nfs-static-provision: true
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 1Gi
Access Modes: RWX
VolumeMode: Filesystem
Used By: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 12s persistentvolume-controller no persistent volumes available for this claim and no storage class is set
Normal VolumeNameUpdated 12s nfs-pv-static-provisioner volumeName updated successfully
Normal PVCreated 12s nfs-pv-static-provisioner pv pvc-f6f9747e-3479-4664-a32f-268b2c62f0bd created successfully
```

0 comments on commit 52914b1

Please sign in to comment.