Skip to content

Commit

Permalink
fix(revert): revert "fix: empty string of backup.status.size"
Browse files Browse the repository at this point in the history
This reverts commit fb0a416.

The original fix doesn't initialize backup.status.size to "0".

Longhorn 10358

Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Feb 11, 2025
1 parent b7700c2 commit 88f3f8e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 68 deletions.
3 changes: 0 additions & 3 deletions k8s/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,6 @@ spec:
description: The address of the replica that runs snapshot backup.
type: string
size:
default: "0"
description: The snapshot size.
type: string
snapshotCreatedAt:
Expand Down Expand Up @@ -999,8 +998,6 @@ spec:
volumeSize:
description: The volume size.
type: string
required:
- size
type: object
type: object
served: true
Expand Down
2 changes: 1 addition & 1 deletion k8s/pkg/apis/longhorn/v1beta2/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type BackupStatus struct {
// +optional
BackupCreatedAt string `json:"backupCreatedAt"`
// The snapshot size.
// +kubebuilder:default="0"
// +optional
Size string `json:"size"`
// The labels of snapshot backup.
// +optional
Expand Down
13 changes: 0 additions & 13 deletions upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/longhorn/longhorn-manager/upgrade/v16xto170"
"github.com/longhorn/longhorn-manager/upgrade/v170to171"
"github.com/longhorn/longhorn-manager/upgrade/v17xto180"
"github.com/longhorn/longhorn-manager/upgrade/v18xto190"
"github.com/longhorn/longhorn-manager/upgrade/v1beta1"

longhorn "github.com/longhorn/longhorn-manager/k8s/pkg/apis/longhorn/v1beta2"
Expand Down Expand Up @@ -284,12 +283,6 @@ func doResourceUpgrade(namespace string, lhClient *lhclientset.Clientset, kubeCl
return err
}
}
if semver.Compare(lhVersionBeforeUpgrade, "v1.9.0") < 0 {
logrus.Info("Walking through the resource upgrade path v1.8.x to v1.9.0")
if err := v18xto190.UpgradeResources(namespace, lhClient, kubeClient, resourceMaps); err != nil {
return err
}
}
if err := upgradeutil.UpdateResources(namespace, lhClient, resourceMaps); err != nil {
return err
}
Expand Down Expand Up @@ -323,12 +316,6 @@ func doResourceUpgrade(namespace string, lhClient *lhclientset.Clientset, kubeCl
return err
}
}
if semver.Compare(lhVersionBeforeUpgrade, "v1.9.0") < 0 {
logrus.Info("Walking through the resource status upgrade path v1.8.x to v1.9.0")
if err := v18xto190.UpgradeResourcesStatus(namespace, lhClient, kubeClient, resourceMaps); err != nil {
return err
}
}
if err := upgradeutil.UpdateResourcesStatus(namespace, lhClient, resourceMaps); err != nil {
return err
}
Expand Down
51 changes: 0 additions & 51 deletions upgrade/v18xto190/upgrade.go

This file was deleted.

0 comments on commit 88f3f8e

Please sign in to comment.