Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
Signed-off-by: stoneshi-yunify <[email protected]>
  • Loading branch information
stoneshi-yunify committed Sep 10, 2024
1 parent 2537319 commit 0ea5e64
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions config/examples/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
"storage.kubesphere.io/nfs-static-provision": "true"
"storage.kubesphere.io/nfs-server": "example.nfs.server"
"storage.kubesphere.io/nfs-path": "/a/b/c"
name: pvc-nfs
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: ""
volumeMode: Filesystem
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rules:
- apiGroups:
- ""
resources:
- events
- persistentvolumeclaims
- persistentvolumes
verbs:
Expand Down
1 change: 1 addition & 0 deletions internal/controller/persistentvolume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type PersistentVolumeReconciler struct {
Recorder record.EventRecorder
}

// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=persistentvolumes,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=persistentvolumes/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=core,resources=persistentvolumes/finalizers,verbs=update
Expand Down
1 change: 1 addition & 0 deletions internal/controller/persistentvolumeclaim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type PersistentVolumeClaimReconciler struct {
Recorder record.EventRecorder
}

// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims/finalizers,verbs=update
Expand Down

0 comments on commit 0ea5e64

Please sign in to comment.