Skip to content

Commit 8497361

Browse files
committed
Rename
Signed-off-by: Ambika Nair <[email protected]>
1 parent e186707 commit 8497361

File tree

6 files changed

+64
-64
lines changed

6 files changed

+64
-64
lines changed

api/v1alpha1/recoverstalevolume_types.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
2424
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
2525

26-
// FixStaleVolumeSpec defines the desired state of FixStaleVolume
26+
// RestoreStaleVolumeSpec defines the desired state of RestoreStaleVolume
2727

28-
type FixStaleVolumeSpec struct {
28+
type RestoreStaleVolumeSpec struct {
2929
NoOfLogLines int64 `json:"noOfLogLines,omitempty"`
3030
Deployment []DeploymentData `json:"deploymentData,omitempty"`
3131
}
@@ -35,33 +35,33 @@ type DeploymentData struct {
3535
DeploymentNamespace string `json:"deploymentNamespace,omitempty"`
3636
}
3737

38-
// FixStaleVolumeStatus defines the observed state of FixStaleVolume
39-
type FixStaleVolumeStatus struct {
38+
// RestoreStaleVolumeStatus defines the observed state of RestoreStaleVolume
39+
type RestoreStaleVolumeStatus struct {
4040
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
4141
// Important: Run "make" to regenerate code after modifying this file
4242
}
4343

4444
//+kubebuilder:object:root=true
4545
//+kubebuilder:subresource:status
4646

47-
// FixStaleVolume is the Schema for the recoverstalevolumes API
48-
type FixStaleVolume struct {
47+
// RestoreStaleVolume is the Schema for the recoverstalevolumes API
48+
type RestoreStaleVolume struct {
4949
metav1.TypeMeta `json:",inline"`
5050
metav1.ObjectMeta `json:"metadata,omitempty"`
5151

52-
Spec FixStaleVolumeSpec `json:"spec,omitempty"`
53-
Status FixStaleVolumeStatus `json:"status,omitempty"`
52+
Spec RestoreStaleVolumeSpec `json:"spec,omitempty"`
53+
Status RestoreStaleVolumeStatus `json:"status,omitempty"`
5454
}
5555

5656
//+kubebuilder:object:root=true
5757

58-
// FixStaleVolumeList contains a list of FixStaleVolume
59-
type FixStaleVolumeList struct {
58+
// RestoreStaleVolumeList contains a list of RestoreStaleVolume
59+
type RestoreStaleVolumeList struct {
6060
metav1.TypeMeta `json:",inline"`
6161
metav1.ListMeta `json:"metadata,omitempty"`
62-
Items []FixStaleVolume `json:"items"`
62+
Items []RestoreStaleVolume `json:"items"`
6363
}
6464

6565
func init() {
66-
SchemeBuilder.Register(&FixStaleVolume{}, &FixStaleVolumeList{})
66+
SchemeBuilder.Register(&RestoreStaleVolume{}, &RestoreStaleVolumeList{})
6767
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/objectdriver.csi.ibm.com_restorestalevolumes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec:
5252
type: integer
5353
type: object
5454
status:
55-
description: FixStaleVolumeStatus defines the observed state of FixStaleVolume
55+
description: RestoreStaleVolumeStatus defines the observed state of RestoreStaleVolume
5656
type: object
5757
type: object
5858
served: true

config/rbac/role.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,48 +126,48 @@ rules:
126126
verbs:
127127
- update
128128
- apiGroups:
129-
- objectdriver.csi.ibm.com
129+
- monitoring.coreos.com
130130
resources:
131-
- restorestalevolumes
131+
- servicemonitors
132132
verbs:
133133
- create
134-
- delete
135134
- get
136-
- list
137-
- patch
138-
- update
139-
- watch
140135
- apiGroups:
141136
- objectdriver.csi.ibm.com
142137
resources:
143-
- restorestalevolumes/finalizers
138+
- '*'
144139
verbs:
145-
- update
140+
- '*'
146141
- apiGroups:
147142
- objectdriver.csi.ibm.com
148143
resources:
149-
- restorestalevolumes/status
144+
- ibmobjectcsis
150145
verbs:
146+
- create
147+
- delete
151148
- get
149+
- list
152150
- patch
153151
- update
152+
- watch
154153
- apiGroups:
155-
- monitoring.coreos.com
154+
- objectdriver.csi.ibm.com
156155
resources:
157-
- servicemonitors
156+
- ibmobjectcsis/finalizers
158157
verbs:
159-
- create
160-
- get
158+
- update
161159
- apiGroups:
162160
- objectdriver.csi.ibm.com
163161
resources:
164-
- '*'
162+
- ibmobjectcsis/status
165163
verbs:
166-
- '*'
164+
- get
165+
- patch
166+
- update
167167
- apiGroups:
168168
- objectdriver.csi.ibm.com
169169
resources:
170-
- ibmobjectcsis
170+
- restorestalevolumes
171171
verbs:
172172
- create
173173
- delete
@@ -179,13 +179,13 @@ rules:
179179
- apiGroups:
180180
- objectdriver.csi.ibm.com
181181
resources:
182-
- ibmobjectcsis/finalizers
182+
- restorestalevolumes/finalizers
183183
verbs:
184184
- update
185185
- apiGroups:
186186
- objectdriver.csi.ibm.com
187187
resources:
188-
- ibmobjectcsis/status
188+
- restorestalevolumes/status
189189
verbs:
190190
- get
191191
- patch

controllers/restorestalevolume_controller.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import (
3737
csiv1alpha1 "github.ibm.com/alchemy-containers/ibm-object-csi-driver-operator/api/v1alpha1"
3838
)
3939

40-
// FixStaleVolumeReconciler reconciles a FixStaleVolume object
41-
type FixStaleVolumeReconciler struct {
40+
// RestoreStaleVolumeReconciler reconciles a RestoreStaleVolume object
41+
type RestoreStaleVolumeReconciler struct {
4242
client.Client
4343
Scheme *runtime.Scheme
4444
}
@@ -56,26 +56,26 @@ var transportEndpointError = "transport endpoint is not connected"
5656
// Reconcile is part of the main kubernetes reconciliation loop which aims to
5757
// move the current state of the cluster closer to the desired state.
5858
// TODO(user): Modify the Reconcile function to compare the state specified by
59-
// the FixStaleVolume object against the actual cluster state, and then
59+
// the RestoreStaleVolume object against the actual cluster state, and then
6060
// perform operations to make the cluster state reflect the state specified by
6161
// the user.
6262
//
6363
// For more details, check Reconcile and its Result here:
6464
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
65-
func (r *FixStaleVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
65+
func (r *RestoreStaleVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
6666
reqLogger := staleVolLog.WithValues("Request.Namespace", req.Namespace, "Request.Name", req.Name)
67-
reqLogger.Info("Reconciling FixStaleVolume")
67+
reqLogger.Info("Reconciling RestoreStaleVolume")
6868

69-
// Fetch FixStaleVolume instance
70-
instance := &csiv1alpha1.FixStaleVolume{}
69+
// Fetch RestoreStaleVolume instance
70+
instance := &csiv1alpha1.RestoreStaleVolume{}
7171
err := r.Get(ctx, req.NamespacedName, instance)
7272
if err != nil {
7373
if k8serr.IsNotFound(err) {
74-
reqLogger.Info("FixStaleVolume resource not found. Ignoring since object must be deleted")
74+
reqLogger.Info("RestoreStaleVolume resource not found. Ignoring since object must be deleted")
7575
return ctrl.Result{}, nil
7676
}
7777
// Error reading the object.
78-
reqLogger.Error(err, "failed to get FixStaleVolume resource")
78+
reqLogger.Error(err, "failed to get RestoreStaleVolume resource")
7979
return ctrl.Result{}, err
8080
}
8181

@@ -262,9 +262,9 @@ func (r *FixStaleVolumeReconciler) Reconcile(ctx context.Context, req ctrl.Reque
262262
}
263263

264264
// SetupWithManager sets up the controller with the Manager.
265-
func (r *FixStaleVolumeReconciler) SetupWithManager(mgr ctrl.Manager) error {
265+
func (r *RestoreStaleVolumeReconciler) SetupWithManager(mgr ctrl.Manager) error {
266266
return ctrl.NewControllerManagedBy(mgr).
267-
For(&csiv1alpha1.FixStaleVolume{}).
267+
For(&csiv1alpha1.RestoreStaleVolume{}).
268268
Complete(r)
269269
}
270270

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ func main() {
109109
setupLog.Error(err, "unable to create controller", "controller", "IBMObjectCSI")
110110
os.Exit(1)
111111
}
112-
if err = (&controllers.FixStaleVolumeReconciler{
112+
if err = (&controllers.RestoreStaleVolumeReconciler{
113113
Client: mgr.GetClient(),
114114
Scheme: mgr.GetScheme(),
115115
}).SetupWithManager(mgr); err != nil {
116-
setupLog.Error(err, "unable to create controller", "controller", "FixStaleVolume")
116+
setupLog.Error(err, "unable to create controller", "controller", "RestoreStaleVolume")
117117
os.Exit(1)
118118
}
119119
//+kubebuilder:scaffold:builder

0 commit comments

Comments
 (0)