Skip to content

Commit 4a31920

Browse files
committed
address review comments
Signed-off-by: Ashima-Ashima1 <[email protected]>
1 parent f97a81d commit 4a31920

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

api/v1alpha1/recoverstalevolume_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ import (
2626

2727
// RecoverStaleVolumeSpec defines the desired state of RecoverStaleVolume
2828
type RecoverStaleVolumeSpec struct {
29-
NoOfLogLines int64 `json:"noOfLogLines,omitempty"`
30-
Data []NamespacedDeploymentData `json:"data,omitempty"`
29+
LogHistory int64 `json:"logHistory,omitempty"`
30+
Data []NamespacedDeploymentData `json:"data"`
3131
}
3232

3333
// NamespacedDeploymentData ...
3434
type NamespacedDeploymentData struct {
35-
Namespace string `json:"namespace,omitempty"`
36-
Deployments []string `json:"applications,omitempty"`
35+
Namespace string `json:"namespace"`
36+
Deployments []string `json:"deployments,omitempty"`
3737
}
3838

3939
// RecoverStaleVolumeStatus defines the observed state of RecoverStaleVolume

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,21 @@ spec:
4444
items:
4545
description: NamespacedDeploymentData ...
4646
properties:
47-
applications:
47+
deployments:
4848
items:
4949
type: string
5050
type: array
5151
namespace:
5252
type: string
53+
required:
54+
- namespace
5355
type: object
5456
type: array
55-
noOfLogLines:
57+
logHistory:
5658
format: int64
5759
type: integer
60+
required:
61+
- data
5862
type: object
5963
status:
6064
description: RecoverStaleVolumeStatus defines the observed state of RecoverStaleVolume

controllers/recoverstalevolume_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (r *RecoverStaleVolumeReconciler) Reconcile(ctx context.Context, req ctrl.R
8585
return ctrl.Result{}, err
8686
}
8787

88-
var logTailLines = instance.Spec.NoOfLogLines
88+
var logTailLines = instance.Spec.LogHistory
8989
if logTailLines == 0 {
9090
logTailLines = int64(constants.DefaultLogTailLines)
9191
}

0 commit comments

Comments
 (0)