Skip to content

Commit

Permalink
Merge pull request #48 from nb-ohad/config-reconcile
Browse files Browse the repository at this point in the history
ClientProfile reconcile
  • Loading branch information
Madhu-1 authored Aug 2, 2024
2 parents 233fc9f + 85dda60 commit 70e00b8
Show file tree
Hide file tree
Showing 9 changed files with 402 additions and 76 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/cephconnection_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type CephConnectionSpec struct {
Monitors []string `json:"monitors"`

//+kubebuilder:validation:Optional
ReadAffinity ReadAffinitySpec `json:"readAffinity,omitempty"`
ReadAffinity *ReadAffinitySpec `json:"readAffinity,omitempty"`

//+kubebuilder:validation:Optional
//+kubebuilder:validation:Minimum:=1
Expand Down
6 changes: 5 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Driver")
os.Exit(1)
}
if err = (&controller.ConfigReconciler{
if err = (&controller.ClientProfileReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Config")
setupLog.Error(err, "unable to create controller", "controller", "ClientProfile")
os.Exit(1)
}
if err = (&controller.ClientProfileMappingReconciler{
Expand Down
20 changes: 17 additions & 3 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ rules:
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -47,6 +52,15 @@ rules:
- patch
- update
- watch
- apiGroups:
- csi.ceph.io
resources:
- cephconnections
verbs:
- get
- list
- update
- watch
- apiGroups:
- csi.ceph.io
resources:
Expand Down Expand Up @@ -76,7 +90,7 @@ rules:
- apiGroups:
- csi.ceph.io
resources:
- configs
- clientprofiles
verbs:
- create
- delete
Expand All @@ -88,13 +102,13 @@ rules:
- apiGroups:
- csi.ceph.io
resources:
- configs/finalizers
- clientprofiles/finalizers
verbs:
- update
- apiGroups:
- csi.ceph.io
resources:
- configs/status
- clientprofiles/status
verbs:
- get
- patch
Expand Down
Loading

0 comments on commit 70e00b8

Please sign in to comment.