mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-21 12:12:53 +00:00
Compare commits
5 Commits
dependabot
...
v1.15.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d4f147597 | ||
|
|
6f79c54dfa | ||
|
|
15ee6a4a58 | ||
|
|
d2dec9de8b | ||
|
|
7cd92a5aac |
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
# Velero binary build section
|
||||
FROM --platform=$BUILDPLATFORM golang:1.22-bookworm AS velero-builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.22.8-bookworm AS velero-builder
|
||||
|
||||
ARG GOPROXY
|
||||
ARG BIN
|
||||
@@ -47,7 +47,7 @@ RUN mkdir -p /output/usr/bin && \
|
||||
go clean -modcache -cache
|
||||
|
||||
# Restic binary build section
|
||||
FROM --platform=$BUILDPLATFORM golang:1.22-bookworm AS restic-builder
|
||||
FROM --platform=$BUILDPLATFORM golang:1.22.8-bookworm AS restic-builder
|
||||
|
||||
ARG BIN
|
||||
ARG TARGETOS
|
||||
@@ -70,7 +70,7 @@ RUN mkdir -p /output/usr/bin && \
|
||||
go clean -modcache -cache
|
||||
|
||||
# Velero image packing section
|
||||
FROM paketobuildpacks/run-jammy-tiny:latest
|
||||
FROM paketobuildpacks/run-jammy-tiny:0.2.52
|
||||
|
||||
LABEL maintainer="Xun Jiang <jxun@vmware.com>"
|
||||
|
||||
|
||||
2
Tiltfile
2
Tiltfile
@@ -52,7 +52,7 @@ git_sha = str(local("git rev-parse HEAD", quiet = True, echo_off = True)).strip(
|
||||
|
||||
tilt_helper_dockerfile_header = """
|
||||
# Tilt image
|
||||
FROM golang:1.22 as tilt-helper
|
||||
FROM golang:1.22.8 as tilt-helper
|
||||
|
||||
# Support live reloading with Tilt
|
||||
RUN wget --output-document /restart.sh --quiet https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/restart.sh && \
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/vmware-tanzu/velero
|
||||
|
||||
go 1.22.0
|
||||
go 1.22.8
|
||||
|
||||
require (
|
||||
cloud.google.com/go/storage v1.40.0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM --platform=$TARGETPLATFORM golang:1.22-bookworm
|
||||
FROM --platform=$TARGETPLATFORM golang:1.22.8-bookworm
|
||||
|
||||
ARG GOPROXY
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ type BlockOutput struct {
|
||||
targetFileName string
|
||||
}
|
||||
|
||||
func (o *BlockOutput) WriteFile(ctx context.Context, relativePath string, remoteFile fs.File) error {
|
||||
func (o *BlockOutput) WriteFile(ctx context.Context, relativePath string, remoteFile fs.File, progressCb restore.FileWriteProgress) error {
|
||||
return fmt.Errorf("block mode is not supported for Windows")
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ run-e2e: ginkgo
|
||||
--standby-cluster-name=$(STANDBY_CLUSTER_NAME) \
|
||||
--eks-policy-arn=$(EKS_POLICY_ARN) \
|
||||
--default-cls-service-account-name=$(DEFAULT_CLS_SERVICE_ACCOUNT_NAME) \
|
||||
--standby-cls-service-account-name=$(STANDBY_CLS_SERVICE_ACCOUNT_NAME)
|
||||
--standby-cls-service-account-name=$(STANDBY_CLS_SERVICE_ACCOUNT_NAME) \
|
||||
--kibishii-directory=$(KIBISHII_DIRECTORY) \
|
||||
--disable-informer-cache=$(DISABLE_INFORMER_CACHE)
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"golang.org/x/mod/semver"
|
||||
|
||||
. "github.com/vmware-tanzu/velero/test"
|
||||
util "github.com/vmware-tanzu/velero/test/util/csi"
|
||||
@@ -146,24 +147,27 @@ func MigrationTest(useVolumeSnapshots bool, veleroCLI2Version VeleroCLI2Version)
|
||||
OriginVeleroCfg.RestoreHelperImage = ""
|
||||
OriginVeleroCfg.Plugins = ""
|
||||
|
||||
// It is for v1.13.x migration scenario only, because since v1.14, nightly CI won't
|
||||
// pass velero-plugin-for-csi to E2E test anymore, and velero installation will not
|
||||
// fetch velero-plugin-for-csi automatically, so add it as hardcode below.
|
||||
// TODO: remove this section from future version like v1.15, e.g.
|
||||
versionWithoutPatch := semver.MajorMinor(veleroCLI2Version.VeleroVersion)
|
||||
// Read migration case needs plugins from the PluginsMatrix map.
|
||||
migrationNeedPlugins, ok := PluginsMatrix[versionWithoutPatch]
|
||||
Expect(ok).To(BeTrue())
|
||||
|
||||
if OriginVeleroCfg.CloudProvider == Azure {
|
||||
OriginVeleroCfg.Plugins = "velero/velero-plugin-for-microsoft-azure:v1.9.0"
|
||||
OriginVeleroCfg.Plugins = migrationNeedPlugins[Azure][0]
|
||||
}
|
||||
if OriginVeleroCfg.CloudProvider == AWS {
|
||||
OriginVeleroCfg.Plugins = "velero/velero-plugin-for-aws:v1.9.0"
|
||||
OriginVeleroCfg.Plugins = migrationNeedPlugins[AWS][0]
|
||||
}
|
||||
if strings.Contains(OriginVeleroCfg.Features, FeatureCSI) {
|
||||
OriginVeleroCfg.Plugins = OriginVeleroCfg.Plugins + ",velero/velero-plugin-for-csi:v0.7.0"
|
||||
// Because Velero CSI plugin is deprecated in v1.14,
|
||||
// only need to install it for version lower than v1.14.
|
||||
if strings.Contains(OriginVeleroCfg.Features, FeatureCSI) &&
|
||||
semver.Compare(versionWithoutPatch, "v1.14") < 0 {
|
||||
OriginVeleroCfg.Plugins = OriginVeleroCfg.Plugins + "," + migrationNeedPlugins[CSI][0]
|
||||
}
|
||||
if OriginVeleroCfg.SnapshotMoveData {
|
||||
if OriginVeleroCfg.CloudProvider == Azure {
|
||||
OriginVeleroCfg.Plugins = OriginVeleroCfg.Plugins + ",velero/velero-plugin-for-aws:v1.9.0"
|
||||
}
|
||||
if OriginVeleroCfg.SnapshotMoveData && OriginVeleroCfg.CloudProvider == Azure {
|
||||
OriginVeleroCfg.Plugins = OriginVeleroCfg.Plugins + "," + migrationNeedPlugins[AWS][0]
|
||||
}
|
||||
|
||||
veleroCLI2Version.VeleroCLI, err = InstallVeleroCLI(veleroCLI2Version.VeleroVersion)
|
||||
Expect(err).To(Succeed())
|
||||
}
|
||||
|
||||
@@ -35,12 +35,13 @@ const Azure = "azure"
|
||||
const AzureCSI = "azure-csi"
|
||||
const AwsCSI = "aws-csi"
|
||||
const AWS = "aws"
|
||||
const Gcp = "gcp"
|
||||
const GCP = "gcp"
|
||||
const Vsphere = "vsphere"
|
||||
const CSI = "csi"
|
||||
|
||||
const UploaderTypeRestic = "restic"
|
||||
|
||||
var PublicCloudProviders = []string{AWS, Azure, Gcp, Vsphere}
|
||||
var PublicCloudProviders = []string{AWS, Azure, GCP, Vsphere}
|
||||
var LocalCloudProviders = []string{Kind, VanillaZFS}
|
||||
var CloudProviders = append(PublicCloudProviders, LocalCloudProviders...)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ func getProvider(cloudProvider string) (ObjectsInStorage, error) {
|
||||
case AWS, Vsphere:
|
||||
aws := AWSStorage("")
|
||||
s = &aws
|
||||
case Gcp:
|
||||
case GCP:
|
||||
gcs := GCSStorage("")
|
||||
s = &gcs
|
||||
case Azure:
|
||||
|
||||
@@ -54,77 +54,56 @@ const BackupObjectsPrefix = "backups"
|
||||
const RestoreObjectsPrefix = "restores"
|
||||
const PluginsObjectsPrefix = "plugins"
|
||||
|
||||
var pluginsMatrix = map[string]map[string][]string{
|
||||
"v1.7": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.3.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.3.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.3.0"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.3.0"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.2.0"},
|
||||
},
|
||||
"v1.8": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.4.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.4.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.3.1"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.4.0"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.2.0"},
|
||||
},
|
||||
"v1.9": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.5.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.5.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.4.0"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.5.0"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.3.0"},
|
||||
},
|
||||
var PluginsMatrix = map[string]map[string][]string{
|
||||
"v1.10": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.6.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.6.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.1"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.6.0"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.4.0"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.6.0"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:v1.6.0"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.1"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:v1.6.0"},
|
||||
"csi": {"gcr.io/velero-gcp/velero-plugin-for-csi:v0.4.0"},
|
||||
},
|
||||
"v1.11": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.7.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.7.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.1"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.7.0"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.5.0"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.7.0"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:v1.7.0"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.1"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:v1.7.0"},
|
||||
"csi": {"gcr.io/velero-gcp/velero-plugin-for-csi:v0.5.0"},
|
||||
},
|
||||
"v1.12": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.8.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.8.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.1"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.8.0"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.6.0"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.8.0"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:v1.8.0"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.1"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:v1.8.0"},
|
||||
"csi": {"gcr.io/velero-gcp/velero-plugin-for-csi:v0.6.0"},
|
||||
},
|
||||
"v1.13": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.9.2"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.9.2"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.9.2"},
|
||||
"csi": {"velero/velero-plugin-for-csi:v0.7.1"},
|
||||
"datamover": {"velero/velero-plugin-for-aws:v1.9.2"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.9.2"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:v1.9.2"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:v1.9.2"},
|
||||
"csi": {"gcr.io/velero-gcp/velero-plugin-for-csi:v0.7.1"},
|
||||
"datamover": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.9.2"},
|
||||
},
|
||||
"v1.14": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.10.1"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.10.1"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.10.1"},
|
||||
"datamover": {"velero/velero-plugin-for-aws:v1.10.1"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.10.1"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:v1.10.1"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:v1.10.1"},
|
||||
"datamover": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.10.1"},
|
||||
},
|
||||
"v1.15": {
|
||||
"aws": {"velero/velero-plugin-for-aws:v1.11.0"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:v1.11.0"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.11.0"},
|
||||
"datamover": {"velero/velero-plugin-for-aws:v1.11.0"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.11.0"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:v1.11.0"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:v1.11.0"},
|
||||
"datamover": {"gcr.io/velero-gcp/velero-plugin-for-aws:v1.11.0"},
|
||||
},
|
||||
"main": {
|
||||
"aws": {"velero/velero-plugin-for-aws:main"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:main"},
|
||||
"vsphere": {"vsphereveleroplugin/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:main"},
|
||||
"datamover": {"velero/velero-plugin-for-aws:main"},
|
||||
"aws": {"gcr.io/velero-gcp/velero-plugin-for-aws:main"},
|
||||
"azure": {"gcr.io/velero-gcp/velero-plugin-for-microsoft-azure:main"},
|
||||
"vsphere": {"gcr.io/velero-gcp/velero-plugin-for-vsphere:v1.5.2"},
|
||||
"gcp": {"gcr.io/velero-gcp/velero-plugin-for-gcp:main"},
|
||||
"datamover": {"gcr.io/velero-gcp/velero-plugin-for-aws:main"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -132,10 +111,10 @@ func getPluginsByVersion(version, cloudProvider, objectStoreProvider string, nee
|
||||
var cloudMap map[string][]string
|
||||
arr := strings.Split(version, ".")
|
||||
if len(arr) >= 3 {
|
||||
cloudMap = pluginsMatrix[arr[0]+"."+arr[1]]
|
||||
cloudMap = PluginsMatrix[arr[0]+"."+arr[1]]
|
||||
}
|
||||
if len(cloudMap) == 0 {
|
||||
cloudMap = pluginsMatrix["main"]
|
||||
cloudMap = PluginsMatrix["main"]
|
||||
if len(cloudMap) == 0 {
|
||||
return nil, errors.Errorf("fail to get plugins by version: main")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user