diff --git a/.github/workflows/push-builder.yml b/.github/workflows/push-builder.yml index cb0f37486..4460e2322 100644 --- a/.github/workflows/push-builder.yml +++ b/.github/workflows/push-builder.yml @@ -2,7 +2,7 @@ name: build-image on: push: - branches: [ master ] + branches: [ main ] paths: - 'hack/build-image/Dockerfile' diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 996c9780e..ac9fde064 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,8 +1,8 @@ -name: Master CI +name: Main CI on: push: - branches: [ master ] + branches: [ main ] tags: - '*' diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ecf265b..29c8ff58c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,18 +20,18 @@ * [CHANGELOG-0.3.md][1] -[14]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-1.4.md -[13]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-1.3.md -[12]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-1.2.md -[11]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-1.1.md -[10]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-1.0.md -[9]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.11.md -[8]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.10.md -[7]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.9.md -[6]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.8.md -[5]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.7.md -[4]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.6.md -[3]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.5.md -[2]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.4.md -[1]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/CHANGELOG-0.3.md -[0]: https://github.com/vmware-tanzu/velero/blob/master/changelogs/unreleased +[14]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.4.md +[13]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.3.md +[12]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.2.md +[11]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.1.md +[10]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-1.0.md +[9]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.11.md +[8]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.10.md +[7]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.9.md +[6]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.8.md +[5]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.7.md +[4]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.6.md +[3]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.5.md +[2]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.4.md +[1]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/CHANGELOG-0.3.md +[0]: https://github.com/vmware-tanzu/velero/blob/main/changelogs/unreleased diff --git a/Makefile b/Makefile index 74f83447c..1ad3f0bbf 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ BUILDER_IMAGE_CACHED := $(shell docker images -q ${BUILDER_IMAGE} 2>/dev/null ) local : ARCH ?= $(shell go env GOOS)-$(shell go env GOARCH) ARCH ?= linux-amd64 -VERSION ?= master +VERSION ?= main TAG_LATEST ?= false diff --git a/changelogs/CHANGELOG-0.10.md b/changelogs/CHANGELOG-0.10.md index e4114ad81..e4f451d9d 100644 --- a/changelogs/CHANGELOG-0.10.md +++ b/changelogs/CHANGELOG-0.10.md @@ -69,8 +69,8 @@ carefully to ensure a successful upgrade!** - The `Config` CRD has been replaced by `BackupStorageLocation` and `VolumeSnapshotLocation` CRDs. - The interface for external plugins (object/block stores, backup/restore item actions) has changed. If you have authored any custom plugins, they'll need to be updated for v0.10. - - The [`ObjectStore.ListCommonPrefixes`](https://github.com/heptio/ark/blob/master/pkg/cloudprovider/object_store.go#L50) signature has changed to add a `prefix` parameter. - - Registering plugins has changed. Create a new plugin server with the `NewServer` function, and register plugins with the appropriate functions. See the [`Server`](https://github.com/heptio/ark/blob/master/pkg/plugin/server.go#L37) interface for details. + - The [`ObjectStore.ListCommonPrefixes`](https://github.com/vmware-tanzu/velero/blob/main/pkg/cloudprovider/object_store.go#L50) signature has changed to add a `prefix` parameter. + - Registering plugins has changed. Create a new plugin server with the `NewServer` function, and register plugins with the appropriate functions. See the [`Server`](https://github.com/vmware-tanzu/velero/blob/main/pkg/plugin/server.go#L37) interface for details. - The organization of Ark data in object storage has changed. Existing data will need to be moved around to conform to the new layout. ### All Changes @@ -89,7 +89,7 @@ need to be updated for v0.10. - [ec013e6f](https://github.com/heptio/ark/commit/ec013e6f) Document upgrading plugins in the deployment - [d6162e94](https://github.com/heptio/ark/commit/d6162e94) fix goreleaser bugs - [a15df276](https://github.com/heptio/ark/commit/a15df276) Add correct link and change role -- [46bed015](https://github.com/heptio/ark/commit/46bed015) add 0.10 breaking changes warning to readme in master +- [46bed015](https://github.com/heptio/ark/commit/46bed015) add 0.10 breaking changes warning to readme in main - [e3a7d6a2](https://github.com/heptio/ark/commit/e3a7d6a2) add content for issue 994 - [400911e9](https://github.com/heptio/ark/commit/400911e9) address docs issue #978 - [b818cc27](https://github.com/heptio/ark/commit/b818cc27) don't require a default provider VSL if there's only 1 @@ -247,7 +247,7 @@ need to be updated for v0.10. - [5b89f7b6](https://github.com/heptio/ark/commit/5b89f7b6) Skip backup sync if it already exists in k8s - [c6050845](https://github.com/heptio/ark/commit/c6050845) restore controller: switch to 'c' for receiver name - [706ae07d](https://github.com/heptio/ark/commit/706ae07d) enable a schedule to be provided as the source for a restore -- [aea68414](https://github.com/heptio/ark/commit/aea68414) fix up Slack link in troubleshooting on master branch +- [aea68414](https://github.com/heptio/ark/commit/aea68414) fix up Slack link in troubleshooting on main branch - [bb8e2e91](https://github.com/heptio/ark/commit/bb8e2e91) Document how to run the Ark server locally - [dc84e591](https://github.com/heptio/ark/commit/dc84e591) Remove outdated namespace deletion content - [23abbc9a](https://github.com/heptio/ark/commit/23abbc9a) fix paths diff --git a/changelogs/CHANGELOG-0.9.md b/changelogs/CHANGELOG-0.9.md index 5b6b5ad88..4d8cfdfb6 100644 --- a/changelogs/CHANGELOG-0.9.md +++ b/changelogs/CHANGELOG-0.9.md @@ -137,7 +137,7 @@ ### Highlights: * Ark now has support for backing up and restoring Kubernetes volumes using a free open-source backup tool called [restic](https://github.com/restic/restic). This provides users an out-of-the-box solution for backing up and restoring almost any type of Kubernetes volume, whether or not it has snapshot support - integrated with Ark. For more information, see the [documentation](https://github.com/heptio/ark/blob/master/docs/restic.md). + integrated with Ark. For more information, see the [documentation](https://github.com/vmware-tanzu/velero/blob/main/docs/restic.md). * Support for Prometheus metrics has been added! View total number of backup attempts (including success or failure), total backup size in bytes, and backup durations. More metrics coming in future releases! diff --git a/changelogs/CHANGELOG-1.3.md b/changelogs/CHANGELOG-1.3.md index 78e3a18f6..58dbd7db7 100644 --- a/changelogs/CHANGELOG-1.3.md +++ b/changelogs/CHANGELOG-1.3.md @@ -90,7 +90,7 @@ We fixed a large number of bugs and made some smaller usability improvements in ### All Changes - * Corrected the selfLink for Backup CR in site/docs/master/output-file-format.md (#2292, @RushinthJohn) + * Corrected the selfLink for Backup CR in site/docs/main/output-file-format.md (#2292, @RushinthJohn) * Back up schema-less CustomResourceDefinitions as v1beta1, even if they are retrieved via the v1 endpoint. (#2264, @nrb) * Bug fix: restic backup volume snapshot to the second location failed (#2244, @jenting) * Added support of using PV name from volumesnapshotter('SetVolumeID') in case of PV renaming during the restore (#2216, @mynktl) diff --git a/design/cli-install-changes.md b/design/cli-install-changes.md index 11ba6b6ea..3464ce0e5 100644 --- a/design/cli-install-changes.md +++ b/design/cli-install-changes.md @@ -276,7 +276,7 @@ The value for these flags will be stored as annotations. #### Handling CA certs -In anticipation of a new configuration implementation to handle custom CA certs (as per design doc https://github.com/vmware-tanzu/velero/blob/master/design/custom-ca-support.md), a new flag `velero storage-location create/set --cacert-file mapStringString` is proposed. It sets the configuration to use for creating a secret containing a custom certificate for an S3 location of a plugin provider. Format is provider:path-to-file. +In anticipation of a new configuration implementation to handle custom CA certs (as per design doc https://github.com/vmware-tanzu/velero/blob/main/design/custom-ca-support.md), a new flag `velero storage-location create/set --cacert-file mapStringString` is proposed. It sets the configuration to use for creating a secret containing a custom certificate for an S3 location of a plugin provider. Format is provider:path-to-file. See discussion https://github.com/vmware-tanzu/velero/pull/2259#discussion_r384700723 for more clarification. @@ -370,4 +370,4 @@ https://github.com/jpeach/contour/tree/1c575c772e9fd747fba72ae41ab99bdae7a01864/ ## Security Considerations -N/A \ No newline at end of file +N/A diff --git a/design/csi-snapshots.md b/design/csi-snapshots.md index 48940e38c..292e8ca53 100644 --- a/design/csi-snapshots.md +++ b/design/csi-snapshots.md @@ -306,16 +306,16 @@ Without these objects, the provider-level snapshots cannot be located in order t [1]: https://kubernetes.io/blog/2018/10/09/introducing-volume-snapshot-alpha-for-kubernetes/ [2]: https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/apis/volumesnapshot/v1alpha1/types.go#L41 [3]: https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/apis/volumesnapshot/v1alpha1/types.go#L161 -[4]: https://github.com/heptio/velero/blob/master/pkg/volume/snapshot.go#L21 -[5]: https://github.com/heptio/velero/blob/master/pkg/apis/velero/v1/pod_volume_backup.go#L88 +[4]: https://github.com/heptio/velero/blob/main/pkg/volume/snapshot.go#L21 +[5]: https://github.com/heptio/velero/blob/main/pkg/apis/velero/v1/pod_volume_backup.go#L88 [6]: https://github.com/heptio/velero-csi-plugin/ -[7]: https://github.com/heptio/velero/blob/master/pkg/plugin/velero/volume_snapshotter.go#L26 -[8]: https://github.com/heptio/velero/blob/master/pkg/controller/backup_controller.go#L560 -[9]: https://github.com/heptio/velero/blob/master/pkg/persistence/object_store.go#L46 -[10]: https://github.com/heptio/velero/blob/master/pkg/apis/velero/v1/labels_annotations.go#L21 -[11]: https://github.com/heptio/velero/blob/master/pkg/cmd/server/server.go#L471 -[12]: https://github.com/heptio/velero/blob/master/pkg/cmd/util/output/backup_describer.go -[13]: https://github.com/heptio/velero/blob/master/pkg/cmd/util/output/backup_describer.go#L214 +[7]: https://github.com/heptio/velero/blob/main/pkg/plugin/velero/volume_snapshotter.go#L26 +[8]: https://github.com/heptio/velero/blob/main/pkg/controller/backup_controller.go#L560 +[9]: https://github.com/heptio/velero/blob/main/pkg/persistence/object_store.go#L46 +[10]: https://github.com/heptio/velero/blob/main/pkg/apis/velero/v1/labels_annotations.go#L21 +[11]: https://github.com/heptio/velero/blob/main/pkg/cmd/server/server.go#L471 +[12]: https://github.com/heptio/velero/blob/main/pkg/cmd/util/output/backup_describer.go +[13]: https://github.com/heptio/velero/blob/main/pkg/cmd/util/output/backup_describer.go#L214 [14]: https://github.com/kubernetes/kubernetes/blob/8ea9edbb0290e9de1e6d274e816a4002892cca6f/pkg/controller/volume/persistentvolume/util/util.go#L69 [15]: https://github.com/kubernetes/kubernetes/pull/30285 [16]: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/types.go#L237 diff --git a/design/custom-ca-support.md b/design/custom-ca-support.md index 60f80157d..05bf9e769 100644 --- a/design/custom-ca-support.md +++ b/design/custom-ca-support.md @@ -73,8 +73,8 @@ This same approach can be taken for CA bundles. The bundle can be stored in a secret which is referenced on the BSL and written to a temp file prior to invoking Restic. -[1](https://github.com/vmware-tanzu/velero/blob/master/pkg/restic/repository_manager.go#L238-L245) -[2](https://github.com/vmware-tanzu/velero/blob/master/pkg/restic/common.go#L168-L203) +[1](https://github.com/vmware-tanzu/velero/blob/main/pkg/restic/repository_manager.go#L238-L245) +[2](https://github.com/vmware-tanzu/velero/blob/main/pkg/restic/common.go#L168-L203) ## Detailed Design @@ -126,7 +126,7 @@ would look like: $ velero client config set cacert PATH ``` -[1]: https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/master/velero-plugin-for-aws/object_store.go#L135 -[2]: https://github.com/vmware-tanzu/velero/blob/master/pkg/restic/command.go#L47 -[3]: https://github.com/restic/restic/blob/master/internal/backend/http_transport.go#L81 -[4]: https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/master/velero-plugin-for-aws/object_store.go#L154 +[1]: https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/main/velero-plugin-for-aws/object_store.go#L135 +[2]: https://github.com/vmware-tanzu/velero/blob/main/pkg/restic/command.go#L47 +[3]: https://github.com/restic/restic/blob/main/internal/backend/http_transport.go#L81 +[4]: https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/main/velero-plugin-for-aws/object_store.go#L154 diff --git a/design/feature-flags.md b/design/feature-flags.md index b6382c64f..836a01b79 100644 --- a/design/feature-flags.md +++ b/design/feature-flags.md @@ -3,7 +3,7 @@ Status: Accepted Some features may take a while to get fully implemented, and we don't necessarily want to have long-lived feature branches -A simple feature flag implementation allows code to be merged into master, but not used unless a flag is set. +A simple feature flag implementation allows code to be merged into main, but not used unless a flag is set. ## Goals diff --git a/design/plugin-backup-and-restore-progress-design.md b/design/plugin-backup-and-restore-progress-design.md index 4e2cbc52e..549023cf6 100644 --- a/design/plugin-backup-and-restore-progress-design.md +++ b/design/plugin-backup-and-restore-progress-design.md @@ -154,7 +154,7 @@ In order to know the CR created for the particular backup of a volume, Velero ad - `velero.io/pv-name` with value as volume that is undergoing backup Backup name being unique won't cause issues like duplicates in identifying the CR. -Labels will be set with the value returned from `GetValidName` function. (https://github.com/vmware-tanzu/velero/blob/master/pkg/label/label.go#L35). +Labels will be set with the value returned from `GetValidName` function. (https://github.com/vmware-tanzu/velero/blob/main/pkg/label/label.go#L35). If Plugin supports showing progress of the operation it is performing, it does following: - finds the VolumePluginBackup CR related to this backup operation by using `tags` passed in CreateSnapshot call @@ -281,7 +281,7 @@ In order to know the CR created for the particular restore of a volume, Velero a - `velero.io/snapshot-id` with value as snapshot id that need to be restored - `velero.io/provider` with value as `Provider` in `VolumeSnapshotLocation` -Labels will be set with the value returned from `GetValidName` function. (https://github.com/vmware-tanzu/velero/blob/master/pkg/label/label.go#L35). +Labels will be set with the value returned from `GetValidName` function. (https://github.com/vmware-tanzu/velero/blob/main/pkg/label/label.go#L35). Plugin will be able to identify CR by using snapshotID that it received as parameter of CreateVolumeFromSnapshot API, and plugin's Provider name. It updates the progress of restore operation regularly if plugin supports feature of showing progress. @@ -376,7 +376,7 @@ In order to know the CR created for the particular backup of a volume, volume sn Backup name being unique won't cause issues like duplicates in identifying the CR. -Plugin need to sanitize the value that can be set for above labels. Label need to be set with the value returned from `GetValidName` function. (https://github.com/vmware-tanzu/velero/blob/master/pkg/label/label.go#L35). +Plugin need to sanitize the value that can be set for above labels. Label need to be set with the value returned from `GetValidName` function. (https://github.com/vmware-tanzu/velero/blob/main/pkg/label/label.go#L35). Though no restrictions are required on the name of CR, as a general practice, volume snapshotter can name this CR with the value same as return value of CreateSnapshot. diff --git a/design/pv-cloning.md b/design/pv-cloning.md index 9d4828ee5..f840bda84 100644 --- a/design/pv-cloning.md +++ b/design/pv-cloning.md @@ -32,14 +32,14 @@ It will also update the `spec.volumeName` of the related persistent volume claim ## Detailed Design -In `pkg/restore/restore.go`, around [line 872](https://github.com/heptio/velero/blob/master/pkg/restore/restore.go#L872), Velero has special-case code for persistent volumes. +In `pkg/restore/restore.go`, around [line 872](https://github.com/vmware-tanzu/velero/blob/main/pkg/restore/restore.go#L872), Velero has special-case code for persistent volumes. This code will be updated to check for the two preconditions described in the previous section. If the preconditions are met, the object will be given a new name. The persistent volume will also be annotated with the original name, e.g. `velero.io/original-pv-name=NAME`. -Importantly, the name change will occur **before** [line 890](https://github.com/heptio/velero/blob/master/pkg/restore/restore.go#L890), where Velero checks to see if it should restore the persistent volume. +Importantly, the name change will occur **before** [line 890](https://github.com/vmware-tanzu/velero/blob/main/pkg/restore/restore.go#L890), where Velero checks to see if it should restore the persistent volume. Additionally, the old and new persistent volume names will be recorded in a new field that will be added to the `context` struct, `renamedPVs map[string]string`. -In the special-case code for persistent volume claims starting on [line 987](https://github.com/heptio/velero/blob/master/pkg/restore/restore.go#L987), Velero will check to see if the claimed persistent volume has been renamed by looking in `ctx.renamedPVs`. +In the special-case code for persistent volume claims starting on [line 987](https://github.com/heptio/velero/blob/main/pkg/restore/restore.go#L987), Velero will check to see if the claimed persistent volume has been renamed by looking in `ctx.renamedPVs`. If so, Velero will update the persistent volume claim's `spec.volumeName` to the new name. ## Alternatives Considered diff --git a/hack/changelog-check.sh b/hack/changelog-check.sh index bbb0260c4..f2e2fb0f9 100755 --- a/hack/changelog-check.sh +++ b/hack/changelog-check.sh @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# docker-push is invoked by the CI/CD system to deploy docker images to Docker Hub. -# It will build images for all commits to master and all git tags. -# The highest, non-prerelease semantic version will also be given the `latest` tag. set +x @@ -37,7 +34,7 @@ if ls ${change_log_file} 1> /dev/null 2>&1; then echo "changelog for PR ${pr_number} exists" exit 0 else - echo "PR ${pr_number} is missing a changelog. Please refer https://velero.io/docs/master/code-standards/#adding-a-changelog and add a changelog." + echo "PR ${pr_number} is missing a changelog. Please refer https://velero.io/docs/main/code-standards/#adding-a-changelog and add a changelog." exit 1 fi diff --git a/hack/docker-push.sh b/hack/docker-push.sh index 4001bc369..52da7cb66 100755 --- a/hack/docker-push.sh +++ b/hack/docker-push.sh @@ -15,7 +15,7 @@ # limitations under the License. # docker-push is invoked by the CI/CD system to deploy docker images to Docker Hub. -# It will build images for all commits to master and all git tags. +# It will build images for all commits to main and all git tags. # The highest, non-prerelease semantic version will also be given the `latest` tag. set +x @@ -56,24 +56,24 @@ elif [[ "$triggeredBy" == "tags" ]]; then TAG=$(echo $GITHUB_REF | cut -d / -f 3) fi -if [[ "$BRANCH" == "master" ]]; then +if [[ "$BRANCH" == "main" ]]; then VERSION="$BRANCH" elif [[ ! -z "$TAG" ]]; then # Explicitly checkout tags when building from a git tag. - # This is not needed when building from master + # This is not needed when building from main git fetch --tags # Calculate the latest release if there's a tag. highest_release VERSION="$TAG" else - echo "We're not on master and we're not building a tag, exit early." + echo "We're not on main and we're not building a tag, exit early." exit 0 fi -# Assume we're not tagging `latest` by default, and never on master. +# Assume we're not tagging `latest` by default, and never on main. TAG_LATEST=false -if [[ "$BRANCH" == "master" ]]; then - echo "Building master, not tagging latest." +if [[ "$BRANCH" == "main" ]]; then + echo "Building main, not tagging latest." elif [[ "$TAG" == "$HIGHEST" ]]; then TAG_LATEST=true fi diff --git a/hack/gen-docs.sh b/hack/gen-docs.sh index dccb13725..1a508aefd 100755 --- a/hack/gen-docs.sh +++ b/hack/gen-docs.sh @@ -38,14 +38,14 @@ fi echo "Creating copy of docs directory site/docs/$PREVIOUS_DOCS_VERSION in site/docs/$NEW_DOCS_VERSION" cp -r site/docs/${PREVIOUS_DOCS_VERSION}/ site/docs/${NEW_DOCS_VERSION}/ -# 'git add' the previous version's docs as-is so we get a useful diff when we copy the master docs in +# 'git add' the previous version's docs as-is so we get a useful diff when we copy the main docs in echo "Running 'git add' for previous version's doc contents to use as a base for diff" git add site/docs/${NEW_DOCS_VERSION} -# now copy the contents of site/docs/master into the same directory so we can get a nice +# now copy the contents of site/docs/main into the same directory so we can get a nice # git diff of what changed since previous version -echo "Copying site/docs/master/ to site/docs/${NEW_DOCS_VERSION}/" -rm -rf site/docs/${NEW_DOCS_VERSION}/ && cp -r site/docs/master/ site/docs/${NEW_DOCS_VERSION}/ +echo "Copying site/docs/main/ to site/docs/${NEW_DOCS_VERSION}/" +rm -rf site/docs/${NEW_DOCS_VERSION}/ && cp -r site/docs/main/ site/docs/${NEW_DOCS_VERSION}/ # make a copy of the previous versioned ToC NEW_DOCS_TOC="$(echo ${NEW_DOCS_VERSION} | tr . -)-toc" @@ -54,20 +54,20 @@ PREVIOUS_DOCS_TOC="$(echo ${PREVIOUS_DOCS_VERSION} | tr . -)-toc" echo "Creating copy of site/_data/$PREVIOUS_DOCS_TOC.yml at site/_data/$NEW_DOCS_TOC.yml" cp site/_data/$PREVIOUS_DOCS_TOC.yml site/_data/$NEW_DOCS_TOC.yml -# 'git add' the previous version's ToC content as-is so we get a useful diff when we copy the master ToC in +# 'git add' the previous version's ToC content as-is so we get a useful diff when we copy the main ToC in echo "Running 'git add' for previous version's ToC to use as a base for diff" git add site/_data/$NEW_DOCS_TOC.yml -# now copy the master ToC so we can get a nice git diff of what changed since previous version -echo "Copying site/_data/master-toc.yml to site/_data/$NEW_DOCS_TOC.yml" -rm site/_data/$NEW_DOCS_TOC.yml && cp site/_data/master-toc.yml site/_data/$NEW_DOCS_TOC.yml +# now copy the main ToC so we can get a nice git diff of what changed since previous version +echo "Copying site/_data/main-toc.yml to site/_data/$NEW_DOCS_TOC.yml" +rm site/_data/$NEW_DOCS_TOC.yml && cp site/_data/main-toc.yml site/_data/$NEW_DOCS_TOC.yml # replace known version-specific links -- the sed syntax is slightly different in OS X and Linux, # so check which OS we're running on. if [[ $(uname) == "Darwin" ]]; then echo "[OS X] updating version-specific links" - find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i '' "s|https://velero.io/docs/master|https://velero.io/docs/$VELERO_VERSION|g" - find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i '' "s|https://github.com/vmware-tanzu/velero/blob/master|https://github.com/vmware-tanzu/velero/blob/$VELERO_VERSION|g" + find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i '' "s|https://velero.io/docs/main|https://velero.io/docs/$VELERO_VERSION|g" + find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i '' "s|https://github.com/vmware-tanzu/velero/blob/main|https://github.com/vmware-tanzu/velero/blob/$VELERO_VERSION|g" echo "[OS X] Updating latest version in _config.yml" sed -i '' "s/latest: ${PREVIOUS_DOCS_VERSION}/latest: ${NEW_DOCS_VERSION}/" site/_config.yml @@ -75,28 +75,28 @@ if [[ $(uname) == "Darwin" ]]; then # newlines and lack of indentation are requirements for this sed syntax # which is doing an append echo "[OS X] Adding latest version to versions list in _config.yml" - sed -i '' "/- master/a\\ + sed -i '' "/- main/a\\ - ${NEW_DOCS_VERSION} " site/_config.yml echo "[OS X] Adding ToC mapping entry" - sed -i '' "/master: master-toc/a\\ + sed -i '' "/main: main-toc/a\\ ${NEW_DOCS_VERSION}: ${NEW_DOCS_TOC} " site/_data/toc-mapping.yml else echo "[Linux] updating version-specific links" - find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i'' "s|https://velero.io/docs/master|https://velero.io/docs/$VELERO_VERSION|g" - find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i'' "s|https://github.com/vmware-tanzu/velero/blob/master|https://github.com/vmware-tanzu/velero/blob/$VELERO_VERSION|g" + find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i'' "s|https://velero.io/docs/main|https://velero.io/docs/$VELERO_VERSION|g" + find site/docs/${NEW_DOCS_VERSION} -type f -name "*.md" | xargs sed -i'' "s|https://github.com/vmware-tanzu/velero/blob/main|https://github.com/vmware-tanzu/velero/blob/$VELERO_VERSION|g" echo "[Linux] Updating latest version in _config.yml" sed -i'' "s/latest: ${PREVIOUS_DOCS_VERSION}/latest: ${NEW_DOCS_VERSION}/" site/_config.yml echo "[Linux] Adding latest version to versions list in _config.yml" - sed -i'' "/- master/a - ${NEW_DOCS_VERSION}" site/_config.yml + sed -i'' "/- main/a - ${NEW_DOCS_VERSION}" site/_config.yml echo "[Linux] Adding ToC mapping entry" - sed -i'' "/master: master-toc/a ${NEW_DOCS_VERSION}: ${NEW_DOCS_TOC}" site/_data/toc-mapping.yml + sed -i'' "/main: main-toc/a ${NEW_DOCS_VERSION}: ${NEW_DOCS_TOC}" site/_data/toc-mapping.yml fi echo "Success! site/docs/$NEW_DOCS_VERSION has been created." diff --git a/hack/release-tools/tag-release.sh b/hack/release-tools/tag-release.sh index f81a0b982..b73f827f4 100755 --- a/hack/release-tools/tag-release.sh +++ b/hack/release-tools/tag-release.sh @@ -104,8 +104,8 @@ if [[ "$VELERO_PATCH" > 0 ]]; then tag_and_push else - echo "Checking out upstream/master." - git checkout upstream/master + echo "Checking out upstream/main." + git checkout upstream/main tag_and_push fi diff --git a/netlify.toml b/netlify.toml index 056f4a49b..759cf11f7 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,3 +2,9 @@ base = "site/" command = "jekyll build" publish = "site/_site" + +# Using the * -> :splat rule should redirect anything under master to the matching file under main +[[redirects]] + from = "/docs/master/*" + to = "/docs/main/:splat" + diff --git a/pkg/controller/restore_controller.go b/pkg/controller/restore_controller.go index ef2f15dfa..a0c7383b8 100644 --- a/pkg/controller/restore_controller.go +++ b/pkg/controller/restore_controller.go @@ -54,7 +54,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -// nonRestorableResources is a blacklist for the restoration process. Any resources +// nonRestorableResources is an exclusion list for the restoration process. Any resources // included here are explicitly excluded from the restoration process. var nonRestorableResources = []string{ "nodes", diff --git a/pkg/restore/restore.go b/pkg/restore/restore.go index 94eba2b3a..172314884 100644 --- a/pkg/restore/restore.go +++ b/pkg/restore/restore.go @@ -335,7 +335,7 @@ func getOrderedResources(resourcePriorities []string, backupResources map[string } sort.Strings(orderedBackupResources) - // master list: everything in resource priorities, followed by what's in the backup (alphabetized) + // main list: everything in resource priorities, followed by what's in the backup (alphabetized) return append(resourcePriorities, orderedBackupResources...) } diff --git a/site/README-JEKYLL.md b/site/README-JEKYLL.md index c86827f5c..413ccdf62 100644 --- a/site/README-JEKYLL.md +++ b/site/README-JEKYLL.md @@ -44,6 +44,6 @@ To add a new set of versioned docs to go with a new Velero release: NEW_DOCS_VERSION=vX.Y VELERO_VERSION=vX.Y.Z make gen-docs ``` -1. In `site/_config.yml`, under the `defaults` field, add an entry for the new version just under `master` by copying the most recent version's entry and updating the version numbers. +1. In `site/_config.yml`, under the `defaults` field, add an entry for the new version just under `main` by copying the most recent version's entry and updating the version numbers. 1. [Pre-release only] In `site/_config.yml`, revert the change to the `latest` field, so the pre-release docs do not become the default. diff --git a/site/_config.yml b/site/_config.yml index d90a45007..1752e0b94 100644 --- a/site/_config.yml +++ b/site/_config.yml @@ -50,10 +50,10 @@ defaults: values: layout: "default" - scope: - path: docs/master + path: docs/main values: - version: master - gh: https://github.com/vmware-tanzu/velero/tree/master + version: main + gh: https://github.com/vmware-tanzu/velero/tree/main layout: "docs" - scope: path: docs/v1.4 @@ -178,7 +178,7 @@ collections: versioning: true latest: v1.4 versions: -- master +- main - v1.4 - v1.3.2 - v1.3.1 @@ -230,4 +230,4 @@ exclude: - LICENSE - CNAME - Runbook.docx - - '*.sh' \ No newline at end of file + - '*.sh' diff --git a/site/_data/master-toc.yml b/site/_data/main-toc.yml similarity index 100% rename from site/_data/master-toc.yml rename to site/_data/main-toc.yml diff --git a/site/_data/toc-mapping.yml b/site/_data/toc-mapping.yml index a43876b7a..53e7a3d1f 100644 --- a/site/_data/toc-mapping.yml +++ b/site/_data/toc-mapping.yml @@ -2,7 +2,7 @@ # (TOC). You'll want to use this after any revamps to information architecture, to ensure # that the navigation for older versions still work. -master: master-toc +main: main-toc v1.4: v1-4-toc v1.3.2: v1-3-2-toc v1.3.1: v1-3-1-toc diff --git a/site/_includes/blog-post-card.html b/site/_includes/blog-post-card.html index 96b3e0d6e..8a4bab5f5 100644 --- a/site/_includes/blog-post-card.html +++ b/site/_includes/blog-post-card.html @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/site/_includes/blog-posts-tag.html b/site/_includes/blog-posts-tag.html index 51a523400..6b444bf79 100644 --- a/site/_includes/blog-posts-tag.html +++ b/site/_includes/blog-posts-tag.html @@ -10,4 +10,4 @@
{{ site.title }} is released as open source software and provides community support through our GitHub project page. If you encounter an issue or have a question, feel free to reach out on the GitHub issues page for {{ site.title }}.
-The Velero project team welcomes contributions from the community, please see our contributing documentation. +
The Velero project team welcomes contributions from the community, please see our contributing documentation.
This is the documentation for the latest development version of Velero. Both code and docs may be diff --git a/site/_includes/versions.html b/site/_includes/versions.html index 89ab2dd98..26c735506 100644 --- a/site/_includes/versions.html +++ b/site/_includes/versions.html @@ -18,4 +18,4 @@ {{ site.latest }} {% endif %}