mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-05-02 21:35:46 +00:00
Merge branch 'release-1.9' into tag-release-1
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
## Older releases:
|
||||
* [CHANGELOG-1.8.md][18]
|
||||
* [CHANGELOG-1.7.md][17]
|
||||
* [CHANGELOG-1.6.md][16]
|
||||
* [CHANGELOG-1.5.md][15]
|
||||
* [CHANGELOG-1.4.md][14]
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
FROM --platform=$BUILDPLATFORM golang:1.17 as builder-env
|
||||
FROM --platform=$BUILDPLATFORM golang:1.17.11 as builder-env
|
||||
|
||||
ARG GOPROXY
|
||||
ARG PKG
|
||||
@@ -50,7 +50,7 @@ RUN mkdir -p /output/usr/bin && \
|
||||
go build -o /output/${BIN} \
|
||||
-ldflags "${LDFLAGS}" ${PKG}/cmd/${BIN}
|
||||
|
||||
FROM gcr.io/distroless/base-debian11:nonroot
|
||||
FROM gcr.io/distroless/base-debian11@sha256:e672eb713e56feb13e349773973b81b1b9284f70b15cf18d1a09ad31a03abe59
|
||||
|
||||
LABEL maintainer="Nolan Brubaker <brubakern@vmware.com>"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM golang:1.17
|
||||
FROM golang:1.17.11
|
||||
|
||||
ARG GOPROXY
|
||||
|
||||
|
||||
@@ -67,7 +67,9 @@ For each major or minor release, create and publish a blog post to let folks kno
|
||||
- Run `make gen-docs`, passing the appropriate variables. Examples:
|
||||
a) `VELERO_VERSION=v1.5.0-rc.1 NEW_DOCS_VERSION=v1.5.0-rc.1 make gen-docs`.
|
||||
b) `VELERO_VERSION=v1.5.0 NEW_DOCS_VERSION=v1.5 make gen-docs`).
|
||||
- Note: `PREVIOUS_DOCS_VERSION=<doc-version-to-copy-from>` is optional; when not set, it will default to the latest doc version.
|
||||
- Note:
|
||||
- `PREVIOUS_DOCS_VERSION=<doc-version-to-copy-from>` is optional; when not set, it will default to the latest doc version.
|
||||
- `VELERO_VERSION` and `NEW_DOCS_VERSION` are slightly different, the `VELERO_VERSION` may have lots of small release versions for one specific $major.minor, such as 'v1.5.0' and 'v1.5.1', but `NEW_DOCS_VERSION` may still be 'v1.5' for not document update.
|
||||
1. Clean up when there is an existing set of pre-release versioned docs for the version you are releasing
|
||||
- Example: `site/content/docs/v1.5.0-beta.1` exists, and you're releasing `v1.5.0-rc.1` or `v1.5`
|
||||
- Remove the directory containing the pre-release docs, i.e. `site/content/docs/<pre-release-version>`.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
toc: "false"
|
||||
cascade:
|
||||
version: main
|
||||
version: v1.9
|
||||
toc: "true"
|
||||
---
|
||||
![100]
|
||||
|
||||
@@ -107,5 +107,5 @@ Note that the container must support the shell command you use.
|
||||
|
||||
|
||||
[1]: api-types/backup.md
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.9/examples/nginx-app/with-pv.yaml
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/examples/nginx-app/with-pv.yaml
|
||||
[3]: cloud-common.md
|
||||
|
||||
@@ -70,7 +70,7 @@ Example:
|
||||
|
||||
We use a package to generate mocks for our interfaces.
|
||||
|
||||
Example: if you want to change this mock: https://github.com/vmware-tanzu/velero/blob/v1.9/pkg/restic/mocks/restorer.go
|
||||
Example: if you want to change this mock: https://github.com/vmware-tanzu/velero/blob/v1.9.0/pkg/restic/mocks/restorer.go
|
||||
|
||||
Run:
|
||||
|
||||
|
||||
@@ -112,4 +112,4 @@ Once parsed into a `[]string`, the features can then be registered using the `Ne
|
||||
Velero adds the `LD_LIBRARY_PATH` into the list of environment variables to provide the convenience for plugins that requires C libraries/extensions in the runtime.
|
||||
|
||||
[1]: https://github.com/vmware-tanzu/velero-plugin-example
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.9/pkg/plugin/logger.go
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/pkg/plugin/logger.go
|
||||
|
||||
@@ -387,4 +387,4 @@ If you get an error like `complete:13: command not found: compdef`, then add the
|
||||
[8]: https://github.com/vmware-tanzu/velero/issues/2311
|
||||
[9]: self-signed-certificates.md
|
||||
[10]: csi.md
|
||||
[11]: https://github.com/vmware-tanzu/velero/blob/v1.9/pkg/apis/velero/v1/constants.go
|
||||
[11]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/pkg/apis/velero/v1/constants.go
|
||||
|
||||
@@ -4,7 +4,7 @@ layout: docs
|
||||
toc: "true"
|
||||
---
|
||||
|
||||
There are some guidelines maintainers need to follow. We list them here for quick reference, especially for new maintainers. These guidelines apply to all projects in the Velero org, including the main project, the Velero Helm chart, and all other [related repositories](https://github.com/vmware-tanzu/velero/blob/v1.9/GOVERNANCE.md#code-repositories).
|
||||
There are some guidelines maintainers need to follow. We list them here for quick reference, especially for new maintainers. These guidelines apply to all projects in the Velero org, including the main project, the Velero Helm chart, and all other [related repositories](https://github.com/vmware-tanzu/velero/blob/v1.9.0/GOVERNANCE.md#code-repositories).
|
||||
|
||||
Please be sure to also go through the guidance under the entire [Contribute](start-contributing/) section.
|
||||
|
||||
@@ -14,12 +14,12 @@ Please be sure to also go through the guidance under the entire [Contribute](sta
|
||||
- As you review a PR that is not yet ready to merge, please check if the "request review" needs to be refreshed for any reviewer (this is better than @mention at them)
|
||||
- Refrain from @mention other maintainers to review the PR unless it is an immediate need. All maintainers already get notified through the automated add to the "request review". If it is an urgent need, please add a helpful message as to why it is so people can properly prioritize work.
|
||||
- There is no need to manually request reviewers: after the PR is created, all maintainers will be automatically added to the list (note: feel free to remove people if they are on PTO, etc).
|
||||
- Be familiar with the [lazy consensus](https://github.com/vmware-tanzu/velero/blob/v1.9/GOVERNANCE.md#lazy-consensus) policy for the project.
|
||||
- Be familiar with the [lazy consensus](https://github.com/vmware-tanzu/velero/blob/v1.9.0/GOVERNANCE.md#lazy-consensus) policy for the project.
|
||||
|
||||
Some tips for doing reviews:
|
||||
- There are some [code standards and general guidelines](https://velero.io/docs/v1.9/code-standards) we aim for
|
||||
- We have [guidelines for writing and reviewing documentation](https://velero.io/docs/v1.9/style-guide/)
|
||||
- When reviewing a design document, ensure it follows [our format and guidelines]( https://github.com/vmware-tanzu/velero/blob/v1.9/design/_template.md). Also, when reviewing a PR that implements a previously accepted design, ensure the associated design doc is moved to the [design/implemented](https://github.com/vmware-tanzu/velero/tree/main/design/implemented) folder.
|
||||
- When reviewing a design document, ensure it follows [our format and guidelines]( https://github.com/vmware-tanzu/velero/blob/v1.9.0/design/_template.md). Also, when reviewing a PR that implements a previously accepted design, ensure the associated design doc is moved to the [design/implemented](https://github.com/vmware-tanzu/velero/tree/main/design/implemented) folder.
|
||||
|
||||
|
||||
## Creating a release
|
||||
@@ -34,4 +34,4 @@ Maintainers are expected to participate in the community support rotation. We ha
|
||||
Maintainers for the Velero project are highly involved with the open source community. All the online community meetings for the project are listed in our [community](community) page.
|
||||
|
||||
## How do I become a maintainer?
|
||||
The Velero project welcomes contributors of all kinds. We are also always on the look out for a high level of engagement from contributors and opportunities to bring in new maintainers. If this is of interest, take a look at how [adding a maintainer](https://github.com/vmware-tanzu/velero/blob/v1.9/GOVERNANCE.md#maintainers) is decided.
|
||||
The Velero project welcomes contributors of all kinds. We are also always on the look out for a high level of engagement from contributors and opportunities to bring in new maintainers. If this is of interest, take a look at how [adding a maintainer](https://github.com/vmware-tanzu/velero/blob/v1.9.0/GOVERNANCE.md#maintainers) is decided.
|
||||
|
||||
@@ -9,7 +9,7 @@ This page covers the steps to perform when releasing a new version of Velero.
|
||||
- Please read the documented variables in each script to understand what they are for and how to properly format their values.
|
||||
- You will need to have an upstream remote configured to use to the [vmware-tanzu/velero](https://github.com/vmware-tanzu/velero) repository.
|
||||
You can check this using `git remote -v`.
|
||||
The release script ([`tag-release.sh`](https://github.com/vmware-tanzu/velero/blob/v1.9/hack/release-tools/tag-release.sh)) will use `upstream` as the default remote name if it is not specified using the environment variable `REMOTE`.
|
||||
The release script ([`tag-release.sh`](https://github.com/vmware-tanzu/velero/blob/v1.9.0/hack/release-tools/tag-release.sh)) will use `upstream` as the default remote name if it is not specified using the environment variable `REMOTE`.
|
||||
- GA release: major and minor releases only. Example: 1.0 (major), 1.5 (minor).
|
||||
- Pre-releases: Any release leading up to a GA. Example: 1.4.0-beta.1, 1.5.0-rc.1
|
||||
- RC releases: Release Candidate, contains everything that is supposed to ship with the GA release. This is still a pre-release.
|
||||
|
||||
@@ -28,7 +28,7 @@ Please browse our list of resources, including a playlist of past online communi
|
||||
|
||||
If you are ready to jump in and test, add code, or help with documentation, please use the navigation on the left under `Contribute`.
|
||||
|
||||
[1]: https://github.com/vmware-tanzu/velero/blob/v1.9/CODE_OF_CONDUCT.md
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.9/CONTRIBUTING.md
|
||||
[3]: https://github.com/vmware-tanzu/velero/blob/v1.9/.github/ISSUE_TEMPLATE/feature-enhancement-request.md
|
||||
[4]: https://github.com/vmware-tanzu/velero/blob/v1.9/.github/ISSUE_TEMPLATE/bug_report.md
|
||||
[1]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/CODE_OF_CONDUCT.md
|
||||
[2]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/CONTRIBUTING.md
|
||||
[3]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/.github/ISSUE_TEMPLATE/feature-enhancement-request.md
|
||||
[4]: https://github.com/vmware-tanzu/velero/blob/v1.9.0/.github/ISSUE_TEMPLATE/bug_report.md
|
||||
|
||||
@@ -6,7 +6,7 @@ layout: docs
|
||||
|
||||
Velero provides best effort support through the process on this page for the current version of Velero and n-1 Velero version, including all patch releases in the supported minor releases. For example, if the current version is 1.9, the Velero maintainers would offer best effort support for v1.9 and v1.8. If you have a question about a previous Velero version (for example, 1.7), please note that maintainers may ask you to upgrade to a supported version before doing any investigation into your issue.
|
||||
|
||||
For more information about Velero testing and supported Kubernetes versions, see Velero's [compatibility matrix](https://github.com/vmware-tanzu/velero/blob/v1.9/README.md#velero-compatibility-matrix).
|
||||
For more information about Velero testing and supported Kubernetes versions, see Velero's [compatibility matrix](https://github.com/vmware-tanzu/velero/blob/v1.9.0/README.md#velero-compatibility-matrix).
|
||||
|
||||
|
||||
## Weekly Rotation
|
||||
|
||||
@@ -161,5 +161,5 @@ func BackupsSyncTest() {
|
||||
}
|
||||
|
||||
func (b *SyncBackups) IsBackupsSynced() error {
|
||||
return WaitForBackupCreated(b.ctx, VeleroCfg.VeleroCLI, b.backupName, 10*time.Minute)
|
||||
return WaitForBackupToBeCreated(b.ctx, VeleroCfg.VeleroCLI, b.backupName, 10*time.Minute)
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ func BslDeletionTest(useVolumeSnapshots bool) {
|
||||
snapshotCheckPoint, err = GetSnapshotCheckPoint(client, VeleroCfg, 1, bslDeletionTestNs, backupName_1, []string{podName_1})
|
||||
Expect(err).NotTo(HaveOccurred(), "Fail to get Azure CSI snapshot checkpoint")
|
||||
Expect(SnapshotsShouldBeCreatedInCloud(VeleroCfg.CloudProvider,
|
||||
VeleroCfg.CloudCredentialsFile, VeleroCfg.AdditionalBSLBucket,
|
||||
VeleroCfg.CloudCredentialsFile, VeleroCfg.BSLBucket,
|
||||
VeleroCfg.BSLConfig, backupName_1, snapshotCheckPoint)).To(Succeed())
|
||||
})
|
||||
By(fmt.Sprintf("Snapshot of bsl %s should be created in cloud object store", backupLocation_2), func() {
|
||||
@@ -232,6 +232,8 @@ func BslDeletionTest(useVolumeSnapshots bool) {
|
||||
BSLCredentials = VeleroCfg.AdditionalBSLCredentials
|
||||
BSLConfig = VeleroCfg.AdditionalBSLConfig
|
||||
} else {
|
||||
// Snapshotting by non-vSphere provider using credentials
|
||||
// and config in default BSL
|
||||
BSLCredentials = VeleroCfg.CloudCredentialsFile
|
||||
BSLConfig = VeleroCfg.BSLConfig
|
||||
}
|
||||
@@ -252,12 +254,12 @@ func BslDeletionTest(useVolumeSnapshots bool) {
|
||||
}
|
||||
|
||||
By(fmt.Sprintf("Backup 1 %s should be created.", backupName_1), func() {
|
||||
Expect(WaitForBackupCreated(context.Background(), VeleroCfg.VeleroCLI,
|
||||
Expect(WaitForBackupToBeCreated(context.Background(), VeleroCfg.VeleroCLI,
|
||||
backupName_1, 10*time.Minute)).To(Succeed())
|
||||
})
|
||||
|
||||
By(fmt.Sprintf("Backup 2 %s should be created.", backupName_2), func() {
|
||||
Expect(WaitForBackupCreated(context.Background(), VeleroCfg.VeleroCLI,
|
||||
Expect(WaitForBackupToBeCreated(context.Background(), VeleroCfg.VeleroCLI,
|
||||
backupName_2, 10*time.Minute)).To(Succeed())
|
||||
})
|
||||
|
||||
@@ -280,6 +282,7 @@ func BslDeletionTest(useVolumeSnapshots bool) {
|
||||
|
||||
By(fmt.Sprintf("Delete one of backup locations - %s", backupLocation_1), func() {
|
||||
Expect(DeleteBslResource(context.Background(), VeleroCfg.VeleroCLI, backupLocation_1)).To(Succeed())
|
||||
Expect(WaitForBackupsToBeDeleted(context.Background(), VeleroCfg.VeleroCLI, backupsInBSL1, 10*time.Minute)).To(Succeed())
|
||||
})
|
||||
|
||||
By("Get all backups from 2 BSLs after deleting one of them", func() {
|
||||
|
||||
@@ -36,9 +36,9 @@ type ObjectsInStorage interface {
|
||||
|
||||
func ObjectsShouldBeInBucket(cloudProvider, cloudCredentialsFile, bslBucket, bslPrefix, bslConfig, backupName, subPrefix string) error {
|
||||
fmt.Printf("|| VERIFICATION || - %s %s should exist in storage [%s]\n", subPrefix, backupName, bslPrefix)
|
||||
exist, _ := IsObjectsInBucket(cloudProvider, cloudCredentialsFile, bslBucket, bslPrefix, bslConfig, backupName, subPrefix)
|
||||
exist, err := IsObjectsInBucket(cloudProvider, cloudCredentialsFile, bslBucket, bslPrefix, bslConfig, backupName, subPrefix)
|
||||
if !exist {
|
||||
return errors.New(fmt.Sprintf("|| UNEXPECTED ||Backup object %s is not exist in object store after backup as expected\n", backupName))
|
||||
return errors.Wrap(err, fmt.Sprintf("|| UNEXPECTED ||Backup object %s is not exist in object store after backup as expected\n", backupName))
|
||||
}
|
||||
fmt.Printf("|| EXPECTED || - Backup %s exist in object storage bucket %s\n", backupName, bslBucket)
|
||||
return nil
|
||||
|
||||
@@ -87,6 +87,13 @@ var pluginsMatrix = map[string]map[string][]string{
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.4.0"},
|
||||
"azure-csi": {"velero/velero-plugin-for-microsoft-azure:v1.4.0", "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": {"velero/velero-plugin-for-aws:v1.5.0", "vsphereveleroplugin/velero-plugin-for-vsphere:v1.4.0"},
|
||||
"gcp": {"velero/velero-plugin-for-gcp:v1.5.0"},
|
||||
"azure-csi": {"velero/velero-plugin-for-microsoft-azure:v1.5.0", "velero/velero-plugin-for-csi:v0.3.0"},
|
||||
},
|
||||
"main": {
|
||||
"aws": {"velero/velero-plugin-for-aws:main"},
|
||||
"azure": {"velero/velero-plugin-for-microsoft-azure:main"},
|
||||
@@ -705,6 +712,7 @@ func getVeleroCliTarball(cliTarballUrl string) (*os.File, error) {
|
||||
|
||||
return tmpfile, nil
|
||||
}
|
||||
|
||||
func DeleteBackupResource(ctx context.Context, veleroCLI string, backupName string) error {
|
||||
args := []string{"backup", "delete", backupName, "--confirm"}
|
||||
|
||||
@@ -771,19 +779,48 @@ func WaitBackupDeleted(ctx context.Context, veleroCLI string, backupName string,
|
||||
})
|
||||
}
|
||||
|
||||
func WaitForBackupCreated(ctx context.Context, veleroCLI string, backupName string, timeout time.Duration) error {
|
||||
func WaitForExpectedStateOfBackup(ctx context.Context, veleroCLI string, backupName string,
|
||||
timeout time.Duration, existing bool) error {
|
||||
return wait.PollImmediate(10*time.Second, timeout, func() (bool, error) {
|
||||
if exist, err := IsBackupExist(ctx, veleroCLI, backupName); err != nil {
|
||||
return false, err
|
||||
} else {
|
||||
if exist {
|
||||
msg := "does not exist"
|
||||
if existing {
|
||||
msg = "was found"
|
||||
}
|
||||
if exist == existing {
|
||||
fmt.Println("Backup <" + backupName + "> " + msg)
|
||||
return true, nil
|
||||
} else {
|
||||
fmt.Println("Backup <" + backupName + "> " + msg)
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func WaitForBackupToBeCreated(ctx context.Context, veleroCLI string, backupName string, timeout time.Duration) error {
|
||||
return WaitForExpectedStateOfBackup(ctx, veleroCLI, backupName, timeout, true)
|
||||
}
|
||||
|
||||
func WaitForBackupToBeDeleted(ctx context.Context, veleroCLI string, backupName string, timeout time.Duration) error {
|
||||
return WaitForExpectedStateOfBackup(ctx, veleroCLI, backupName, timeout, false)
|
||||
}
|
||||
|
||||
func WaitForBackupsToBeDeleted(ctx context.Context, veleroCLI string, backups []string, timeout time.Duration) error {
|
||||
var err error
|
||||
for _, backupName := range backups {
|
||||
fmt.Println("Waiting for deletion of backup <" + backupName + ">")
|
||||
err = WaitForExpectedStateOfBackup(ctx, veleroCLI, backupName, timeout, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
fmt.Println("All backups were deleted.")
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetBackupsFromBsl(ctx context.Context, veleroCLI, bslName string) ([]string, error) {
|
||||
args1 := []string{"get", "backups"}
|
||||
if strings.TrimSpace(bslName) != "" {
|
||||
|
||||
Reference in New Issue
Block a user