Skip to content

Commit

Permalink
add common reason unknown
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Nov 1, 2024
1 parent 4bf511d commit ff5d0e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions api/core/v1alpha2/vdcondition/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const (
// Lost indicates that the underlying PersistentVolumeClaim has been lost and the `VirtualDisk` can no longer be used.
Lost ReadyReason = "PVCLost"

ResizedReasonUnknown ResizedReason = "Unknown"
// ResizingNotRequested indicates that the resize operation has not been requested yet.
ResizingNotRequested ResizedReason = "NotRequested"
// InProgress indicates that the resize request has been detected and the operation is currently in progress.
Expand All @@ -78,7 +77,6 @@ const (
// ResizingNotAvailable indicates that the resize operation is not available for now.
ResizingNotAvailable SnapshottingReason = "NotAvailable"

SnapshottingReasonUnknown SnapshottingReason = "Unknown"
// SnapshottingNotRequested indicates that the snapshotting operation has been successfully started and is in progress now.
SnapshottingNotRequested SnapshottingReason = "NotRequested"
// Snapshotting indicates that the snapshotting operation has been successfully started and is in progress now.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"

"github.com/deckhouse/virtualization-controller/pkg/controller/common"
"github.com/deckhouse/virtualization-controller/pkg/controller/conditions"
"github.com/deckhouse/virtualization-controller/pkg/controller/service"
"github.com/deckhouse/virtualization-controller/pkg/controller/supplements"
"github.com/deckhouse/virtualization-controller/pkg/logger"
Expand All @@ -51,7 +52,7 @@ func (h ResizingHandler) Handle(ctx context.Context, vd *virtv2.VirtualDisk) (re
condition = metav1.Condition{
Type: vdcondition.ResizedType,
Status: metav1.ConditionUnknown,
Reason: vdcondition.ResizedReasonUnknown,
Reason: conditions.ReasonUnknown.String(),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

"github.com/deckhouse/virtualization-controller/pkg/controller/conditions"
"github.com/deckhouse/virtualization-controller/pkg/controller/service"
virtv2 "github.com/deckhouse/virtualization/api/core/v1alpha2"
"github.com/deckhouse/virtualization/api/core/v1alpha2/vdcondition"
Expand All @@ -43,7 +44,7 @@ func (h SnapshottingHandler) Handle(ctx context.Context, vd *virtv2.VirtualDisk)
condition = metav1.Condition{
Type: vdcondition.SnapshottingType,
Status: metav1.ConditionUnknown,
Reason: vdcondition.SnapshottingReasonUnknown,
Reason: conditions.ReasonUnknown.String(),
}
}

Expand Down

0 comments on commit ff5d0e8

Please sign in to comment.