diff --git a/changelogs/unreleased/3092-jenting b/changelogs/unreleased/3092-jenting new file mode 100644 index 000000000..3c07d8f1a --- /dev/null +++ b/changelogs/unreleased/3092-jenting @@ -0,0 +1 @@ +feat: support configures BackupStorageLocation custom resources to indicate which one is the default diff --git a/config/crd/bases/velero.io_backupstoragelocations.yaml b/config/crd/bases/velero.io_backupstoragelocations.yaml index fabe15a90..52c9d640d 100644 --- a/config/crd/bases/velero.io_backupstoragelocations.yaml +++ b/config/crd/bases/velero.io_backupstoragelocations.yaml @@ -33,6 +33,10 @@ spec: - JSONPath: .metadata.creationTimestamp name: Age type: date + - JSONPath: .spec.default + description: Default backup storage location + name: Default + type: boolean group: velero.io names: kind: BackupStorageLocation @@ -83,6 +87,10 @@ spec: type: string description: Config is for provider-specific configuration fields. type: object + default: + description: Default indicates this location is the default backup storage + location. + type: boolean objectStorage: description: ObjectStorageLocation specifies the settings necessary to connect to a provider's object storage. diff --git a/config/crd/crds/crds.go b/config/crd/crds/crds.go index 111f7ddd0..0e7671451 100644 --- a/config/crd/crds/crds.go +++ b/config/crd/crds/crds.go @@ -30,7 +30,7 @@ import ( var rawCRDs = [][]byte{ []byte("\x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xec\\\xbcp\x99n\xe0\xb64V\xe5_ШR'\xf8\t3.\xb9\xe5J^\xe4hY\xca,\xdb\\\x000)\x95e\xee\xb3q\xff\x02$JZ\xad\x84@\xbdڣ\\\xbf\x94;ܕ\\\xa4\xa8i\x868\xff\xf1O\xeb?\xaf\xfft\x01\x90h\xa4\xe1O\xa2@\xad\xd6\\]\x98\x02\x13\x9a:M\t\x1f&\x1e4\x97\x16\xf5\xad\x12e\xee\xf1X\xc1\u007f>\xfez\xff\xc0\xeca\x03kc\x99-ͺ80\x83\x84c\x8a&Ѽ\xb0\x84\xc9O4\x01\xf8N`\xca\xe4\x00\xcc\xc0V>h\xb5\xd7h\xccͭ\xca\v\x81\x16S\x1a\xeb\xb1z\xa4\xde\xf4\xc1\x9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vX\x1f\xdf[\x82O \xf5Z\x9f\x1b9x\xf0\xbf\x01\x00\x00\xff\xff-\xbc\x85&\xc9\x1f\x00\x00"), diff --git a/pkg/apis/velero/v1/backupstoragelocation_types.go b/pkg/apis/velero/v1/backupstoragelocation_types.go index 1d89807e2..a18e3a3e8 100644 --- a/pkg/apis/velero/v1/backupstoragelocation_types.go +++ b/pkg/apis/velero/v1/backupstoragelocation_types.go @@ -32,6 +32,10 @@ type BackupStorageLocationSpec struct { StorageType `json:",inline"` + // Default indicates this location is the default backup storage location. + // +optional + Default bool `json:"default,omitempty"` + // AccessMode defines the permissions for the backup storage location. // +optional AccessMode BackupStorageLocationAccessMode `json:"accessMode,omitempty"` @@ -96,6 +100,7 @@ type BackupStorageLocationStatus struct { // +kubebuilder:printcolumn:name="Last Validated",type="date",JSONPath=".status.lastValidationTime",description="LastValidationTime is the last time the backup store location was validated" // +kubebuilder:printcolumn:name="Access Mode",type="string",JSONPath=".spec.accessMode",description="Permissions for the backup storage location" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Default",type="boolean",JSONPath=".spec.default",description="Default backup storage location" // BackupStorageLocation is a location where Velero stores backup objects type BackupStorageLocation struct { diff --git a/pkg/builder/backup_storage_location_builder.go b/pkg/builder/backup_storage_location_builder.go index a74f598be..e50c48a46 100644 --- a/pkg/builder/backup_storage_location_builder.go +++ b/pkg/builder/backup_storage_location_builder.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2019 the Velero contributors. +Copyright 2020 the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -83,6 +83,12 @@ func (b *BackupStorageLocationBuilder) Prefix(val string) *BackupStorageLocation return b } +// Default sets the BackupStorageLocation's is default or not +func (b *BackupStorageLocationBuilder) Default(isDefault bool) *BackupStorageLocationBuilder { + b.object.Spec.Default = isDefault + return b +} + // AccessMode sets the BackupStorageLocation's access mode. func (b *BackupStorageLocationBuilder) AccessMode(accessMode velerov1api.BackupStorageLocationAccessMode) *BackupStorageLocationBuilder { b.object.Spec.AccessMode = accessMode diff --git a/pkg/cmd/cli/backuplocation/backup_location.go b/pkg/cmd/cli/backuplocation/backup_location.go index 5bacfeac6..f008b2a1e 100644 --- a/pkg/cmd/cli/backuplocation/backup_location.go +++ b/pkg/cmd/cli/backuplocation/backup_location.go @@ -33,6 +33,7 @@ func NewCommand(f client.Factory) *cobra.Command { NewCreateCommand(f, "create"), NewDeleteCommand(f, "delete"), NewGetCommand(f, "get"), + NewSetCommand(f, "set"), ) return c diff --git a/pkg/cmd/cli/backuplocation/create.go b/pkg/cmd/cli/backuplocation/create.go index bb17f9615..c7872001f 100644 --- a/pkg/cmd/cli/backuplocation/create.go +++ b/pkg/cmd/cli/backuplocation/create.go @@ -63,6 +63,7 @@ type CreateOptions struct { Name string Provider string Bucket string + DefaultBackupStorageLocation bool Prefix string BackupSyncPeriod, ValidationFrequency time.Duration Config flag.Map @@ -85,6 +86,7 @@ func NewCreateOptions() *CreateOptions { func (o *CreateOptions) BindFlags(flags *pflag.FlagSet) { flags.StringVar(&o.Provider, "provider", o.Provider, "Name of the backup storage provider (e.g. aws, azure, gcp).") flags.StringVar(&o.Bucket, "bucket", o.Bucket, "Name of the object storage bucket where backups should be stored.") + flags.BoolVar(&o.DefaultBackupStorageLocation, "default", o.DefaultBackupStorageLocation, "Sets this new location to be the new default backup storage location. Optional.") flags.StringVar(&o.Prefix, "prefix", o.Prefix, "Prefix under which all Velero data should be stored within the bucket. Optional.") flags.DurationVar(&o.BackupSyncPeriod, "backup-sync-period", o.BackupSyncPeriod, "How often to ensure all Velero backups in object storage exist as Backup API objects in the cluster. Optional. Set this to `0s` to disable sync. Default: 1 minute.") flags.DurationVar(&o.ValidationFrequency, "validation-frequency", o.ValidationFrequency, "How often to verify if the backup storage location is valid. Optional. Set this to `0s` to disable sync. Default 1 minute.") @@ -162,6 +164,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error { }, }, Config: o.Config.Data(), + Default: o.DefaultBackupStorageLocation, AccessMode: velerov1api.BackupStorageLocationAccessMode(o.AccessMode.String()), BackupSyncPeriod: backupSyncPeriod, ValidationFrequency: validationFrequency, @@ -177,6 +180,25 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error { return err } + if o.DefaultBackupStorageLocation { + // There is one and only one default backup storage location. + // Disable the origin default backup storage location. + locations := new(velerov1api.BackupStorageLocationList) + if err := kbClient.List(context.Background(), locations, &kbclient.ListOptions{Namespace: f.Namespace()}); err != nil { + return errors.WithStack(err) + } + for _, location := range locations.Items { + if !location.Spec.Default { + continue + } + location.Spec.Default = false + if err := kbClient.Update(context.Background(), &location, &kbclient.UpdateOptions{}); err != nil { + return errors.WithStack(err) + } + break + } + } + if err := kbClient.Create(context.Background(), backupStorageLocation, &kbclient.CreateOptions{}); err != nil { return errors.WithStack(err) } diff --git a/pkg/cmd/cli/backuplocation/get.go b/pkg/cmd/cli/backuplocation/get.go index 823e9c414..80c1d996b 100644 --- a/pkg/cmd/cli/backuplocation/get.go +++ b/pkg/cmd/cli/backuplocation/get.go @@ -32,6 +32,7 @@ import ( func NewGetCommand(f client.Factory, use string) *cobra.Command { var listOptions metav1.ListOptions + var showDefaultOnly bool c := &cobra.Command{ Use: use, @@ -45,14 +46,21 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command { locations := new(velerov1api.BackupStorageLocationList) if len(args) > 0 { - location := &velerov1api.BackupStorageLocation{} for _, name := range args { + location := &velerov1api.BackupStorageLocation{} err = kbClient.Get(context.Background(), kbclient.ObjectKey{ Namespace: f.Namespace(), Name: name, }, location) cmd.CheckError(err) - locations.Items = append(locations.Items, *location) + + if showDefaultOnly { + if location.Spec.Default { + locations.Items = append(locations.Items, *location) + } + } else { + locations.Items = append(locations.Items, *location) + } } } else { err := kbClient.List(context.Background(), locations, &kbclient.ListOptions{ @@ -60,6 +68,19 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command { Raw: &listOptions, }) cmd.CheckError(err) + + if showDefaultOnly { + for i := 0; i < len(locations.Items); i++ { + if locations.Items[i].Spec.Default { + continue + } + if i != len(locations.Items)-1 { + copy(locations.Items[i:], locations.Items[i+1:]) + i = i - 1 + } + locations.Items = locations.Items[:len(locations.Items)-1] + } + } } _, err = output.PrintWithFormat(c, locations) @@ -67,6 +88,7 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command { }, } + c.Flags().BoolVar(&showDefaultOnly, "default", false, "Displays the current default backup storage location.") c.Flags().StringVarP(&listOptions.LabelSelector, "selector", "l", listOptions.LabelSelector, "Only show items matching this label selector.") output.BindFlags(c.Flags()) diff --git a/pkg/cmd/cli/backuplocation/set.go b/pkg/cmd/cli/backuplocation/set.go new file mode 100644 index 000000000..74253286f --- /dev/null +++ b/pkg/cmd/cli/backuplocation/set.go @@ -0,0 +1,115 @@ +/* +Copyright 2020 the Velero contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. +*/ + +package backuplocation + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + + kbclient "sigs.k8s.io/controller-runtime/pkg/client" + + velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" + "github.com/vmware-tanzu/velero/pkg/client" + "github.com/vmware-tanzu/velero/pkg/cmd" +) + +func NewSetCommand(f client.Factory, use string) *cobra.Command { + o := NewSetOptions() + + c := &cobra.Command{ + Use: use + " NAME", + Short: "Set a backup storage location", + Args: cobra.ExactArgs(1), + Run: func(c *cobra.Command, args []string) { + cmd.CheckError(o.Complete(args, f)) + cmd.CheckError(o.Run(c, f)) + }, + } + + o.BindFlags(c.Flags()) + + return c +} + +type SetOptions struct { + Name string + DefaultBackupStorageLocation bool +} + +func NewSetOptions() *SetOptions { + return &SetOptions{} +} + +func (o *SetOptions) BindFlags(flags *pflag.FlagSet) { + flags.BoolVar(&o.DefaultBackupStorageLocation, "default", o.DefaultBackupStorageLocation, "Sets this new location to be the new default backup storage location. Optional.") +} + +func (o *SetOptions) Complete(args []string, f client.Factory) error { + o.Name = args[0] + return nil +} + +func (o *SetOptions) Run(c *cobra.Command, f client.Factory) error { + kbClient, err := f.KubebuilderClient() + if err != nil { + return err + } + + location := &velerov1api.BackupStorageLocation{} + err = kbClient.Get(context.Background(), kbclient.ObjectKey{ + Namespace: f.Namespace(), + Name: o.Name, + }, location) + if err != nil { + return errors.WithStack(err) + } + + if o.DefaultBackupStorageLocation { + // There is one and only one default backup storage location. + // Disable the origin default backup storage location. + locations := new(velerov1api.BackupStorageLocationList) + if err := kbClient.List(context.Background(), locations, &kbclient.ListOptions{Namespace: f.Namespace()}); err != nil { + return errors.WithStack(err) + } + for _, location := range locations.Items { + if !location.Spec.Default { + continue + } + if location.Name == o.Name { + // Do not update if the origin default BSL is the current one. + break + } + location.Spec.Default = false + if err := kbClient.Update(context.Background(), &location, &kbclient.UpdateOptions{}); err != nil { + return errors.WithStack(err) + } + break + } + } + + location.Spec.Default = o.DefaultBackupStorageLocation + if err := kbClient.Update(context.Background(), location, &kbclient.UpdateOptions{}); err != nil { + return errors.WithStack(err) + } + + fmt.Printf("Backup storage location %q configured successfully.\n", o.Name) + return nil +} diff --git a/pkg/cmd/server/server.go b/pkg/cmd/server/server.go index a73dab630..3ac982d70 100644 --- a/pkg/cmd/server/server.go +++ b/pkg/cmd/server/server.go @@ -195,7 +195,7 @@ func NewCommand(f client.Factory) *cobra.Command { command.Flags().BoolVar(&config.restoreOnly, "restore-only", config.restoreOnly, "Run in a mode where only restores are allowed; backups, schedules, and garbage-collection are all disabled. DEPRECATED: this flag will be removed in v2.0. Use read-only backup storage locations instead.") command.Flags().StringSliceVar(&config.disabledControllers, "disable-controllers", config.disabledControllers, fmt.Sprintf("List of controllers to disable on startup. Valid values are %s", strings.Join(controller.DisableableControllers, ","))) command.Flags().StringSliceVar(&config.restoreResourcePriorities, "restore-resource-priorities", config.restoreResourcePriorities, "Desired order of resource restores; any resource not in the list will be restored alphabetically after the prioritized resources.") - command.Flags().StringVar(&config.defaultBackupLocation, "default-backup-storage-location", config.defaultBackupLocation, "Name of the default backup storage location.") + command.Flags().StringVar(&config.defaultBackupLocation, "default-backup-storage-location", config.defaultBackupLocation, "Name of the default backup storage location. DEPRECATED: this flag will be removed in v2.0. Use \"velero backup-location set --default\" instead.") command.Flags().DurationVar(&config.storeValidationFrequency, "store-validation-frequency", config.storeValidationFrequency, "How often to verify if the storage is valid. Optional. Set this to `0s` to disable sync. Default 1 minute.") command.Flags().Var(&volumeSnapshotLocations, "default-volume-snapshot-locations", "List of unique volume providers and default volume snapshot location (provider1:location-01,provider2:location-02,...)") command.Flags().Float32Var(&config.clientQPS, "client-qps", config.clientQPS, "Maximum number of requests per second by the server to the Kubernetes API once the burst limit has been reached.") @@ -713,7 +713,6 @@ func (s *server) runControllers(defaultVolumeSnapshotLocations map[string]string s.logger, s.logLevel, newPluginManager, - s.config.defaultBackupLocation, s.metrics, s.config.formatFlag.Parse(), ) diff --git a/pkg/cmd/util/output/backup_storage_location_printer.go b/pkg/cmd/util/output/backup_storage_location_printer.go index 00874a0db..b312415a2 100644 --- a/pkg/cmd/util/output/backup_storage_location_printer.go +++ b/pkg/cmd/util/output/backup_storage_location_printer.go @@ -33,6 +33,7 @@ var ( {Name: "Phase"}, {Name: "Last Validated"}, {Name: "Access Mode"}, + {Name: "Default"}, } ) @@ -50,6 +51,11 @@ func printBackupStorageLocation(location *velerov1api.BackupStorageLocation) []m Object: runtime.RawExtension{Object: location}, } + isDefault := "" + if location.Spec.Default { + isDefault = "true" + } + bucketAndPrefix := location.Spec.ObjectStorage.Bucket if location.Spec.ObjectStorage.Prefix != "" { bucketAndPrefix += "/" + location.Spec.ObjectStorage.Prefix @@ -78,6 +84,7 @@ func printBackupStorageLocation(location *velerov1api.BackupStorageLocation) []m status, LastValidatedStr, accessMode, + isDefault, ) return []metav1.TableRow{row} diff --git a/pkg/controller/backup_controller.go b/pkg/controller/backup_controller.go index f77b43ce2..139d84fcf 100644 --- a/pkg/controller/backup_controller.go +++ b/pkg/controller/backup_controller.go @@ -41,6 +41,7 @@ import ( snapshotv1beta1api "github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1" snapshotv1beta1listers "github.com/kubernetes-csi/external-snapshotter/v2/pkg/client/listers/volumesnapshot/v1beta1" + "github.com/vmware-tanzu/velero/internal/storage" velerov1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" pkgbackup "github.com/vmware-tanzu/velero/pkg/backup" "github.com/vmware-tanzu/velero/pkg/discovery" @@ -345,6 +346,16 @@ func (c *backupController) prepareBackupRequest(backup *velerov1api.Backup) *pkg // default storage location if not specified if request.Spec.StorageLocation == "" { request.Spec.StorageLocation = c.defaultBackupLocation + + locationList, err := storage.ListBackupStorageLocations(context.Background(), c.kbClient, request.Namespace) + if err == nil { + for _, location := range locationList.Items { + if location.Spec.Default { + request.Spec.StorageLocation = location.Name + break + } + } + } } if request.Spec.DefaultVolumesToRestic == nil { diff --git a/pkg/controller/backup_controller_test.go b/pkg/controller/backup_controller_test.go index 42fb31119..b45254887 100644 --- a/pkg/controller/backup_controller_test.go +++ b/pkg/controller/backup_controller_test.go @@ -336,7 +336,7 @@ func TestDefaultBackupTTL(t *testing.T) { } func TestProcessBackupCompletions(t *testing.T) { - defaultBackupLocation := builder.ForBackupStorageLocation("velero", "loc-1").Bucket("store-1").Result() + defaultBackupLocation := builder.ForBackupStorageLocation("velero", "loc-1").Default(true).Bucket("store-1").Result() now, err := time.Parse(time.RFC1123Z, time.RFC1123Z) require.NoError(t, err) diff --git a/pkg/controller/backup_storage_location_controller.go b/pkg/controller/backup_storage_location_controller.go index 22f544a76..09599e591 100644 --- a/pkg/controller/backup_storage_location_controller.go +++ b/pkg/controller/backup_storage_location_controller.go @@ -67,13 +67,25 @@ func (r *BackupStorageLocationReconciler) Reconcile(req ctrl.Request) (ctrl.Resu defer pluginManager.CleanupClients() var defaultFound bool + for _, location := range locationList.Items { + if location.Spec.Default { + defaultFound = true + break + } + } + var unavailableErrors []string var anyVerified bool for i := range locationList.Items { location := &locationList.Items[i] + isDefault := location.Spec.Default log := r.Log.WithField("controller", BackupStorageLocation).WithField(BackupStorageLocation, location.Name) - if location.Name == r.DefaultBackupLocationInfo.StorageLocation { + if !defaultFound && location.Name == r.DefaultBackupLocationInfo.StorageLocation { + // For backward-compatible, to configure the backup storage location as the default if + // none of the BSLs be marked as the default and the BSL name matches against the + // "velero server --default-backup-storage-location". + isDefault = true defaultFound = true } @@ -95,29 +107,28 @@ func (r *BackupStorageLocationReconciler) Reconcile(req ctrl.Request) (ctrl.Resu continue } + // updates the default backup location + location.Spec.Default = isDefault + log.Info("Validating backup storage location") anyVerified = true if err := backupStore.IsValid(); err != nil { - log.Info("Backup location is invalid, marking as unavailable") - unavailableErrors = append(unavailableErrors, errors.Wrapf(err, "Backup location %q is unavailable", location.Name).Error()) - - if location.Name == r.DefaultBackupLocationInfo.StorageLocation { - log.Warnf("The specified default backup location named %q is unavailable; for convenience, be sure to configure it properly or make another backup location that is available the default", r.DefaultBackupLocationInfo.StorageLocation) - } - + log.Info("Backup storage location is invalid, marking as unavailable") + unavailableErrors = append(unavailableErrors, errors.Wrapf(err, "Backup storage location %q is unavailable", location.Name).Error()) location.Status.Phase = velerov1api.BackupStorageLocationPhaseUnavailable } else { - log.Info("Backup location valid, marking as available") + log.Info("Backup storage location valid, marking as available") location.Status.Phase = velerov1api.BackupStorageLocationPhaseAvailable } location.Status.LastValidationTime = &metav1.Time{Time: time.Now().UTC()} + if err := patchHelper.Patch(r.Ctx, location); err != nil { - log.WithError(err).Error("Error updating backup location phase") + log.WithError(err).Error("Error updating backup storage location phase") } } if !anyVerified { - log.Debug("No backup locations needed to be validated") + log.Debug("No backup storage locations needed to be validated") } r.logReconciledPhase(defaultFound, locationList, unavailableErrors) @@ -154,11 +165,11 @@ func (r *BackupStorageLocationReconciler) logReconciledPhase(defaultFound bool, log.Errorf("Current backup storage locations available/unavailable/unknown: %v/%v/%v)", numAvailable, numUnavailable, numUnknown) } } else if numUnavailable > 0 { // some but not all BSL unavailable - log.Warnf("Invalid backup locations detected: available/unavailable/unknown: %v/%v/%v, %s)", numAvailable, numUnavailable, numUnknown, strings.Join(errs, "; ")) + log.Warnf("Invalid backup storage locations detected: available/unavailable/unknown: %v/%v/%v, %s)", numAvailable, numUnavailable, numUnknown, strings.Join(errs, "; ")) } if !defaultFound { - log.Warnf("The specified default backup location named %q was not found; for convenience, be sure to create one or make another backup location that is available the default", r.DefaultBackupLocationInfo.StorageLocation) + log.Warn("The default backup storage location was not found; for convenience, be sure to create one or make another backup location that is designated as the default") } } diff --git a/pkg/controller/backup_storage_location_controller_test.go b/pkg/controller/backup_storage_location_controller_test.go index 6328bafc5..85ca74b80 100644 --- a/pkg/controller/backup_storage_location_controller_test.go +++ b/pkg/controller/backup_storage_location_controller_test.go @@ -46,19 +46,91 @@ var _ = Describe("Backup Storage Location Reconciler", func() { It("Should successfully patch a backup storage location object status phase according to whether its storage is valid or not", func() { tests := []struct { - backupLocation *velerov1api.BackupStorageLocation - isValidError error - expectedPhase velerov1api.BackupStorageLocationPhase + backupLocation *velerov1api.BackupStorageLocation + isValidError error + expectedIsDefault bool + expectedPhase velerov1api.BackupStorageLocationPhase }{ { - backupLocation: builder.ForBackupStorageLocation("ns-1", "location-1").ValidationFrequency(1 * time.Second).Result(), - isValidError: nil, - expectedPhase: velerov1api.BackupStorageLocationPhaseAvailable, + backupLocation: builder.ForBackupStorageLocation("ns-1", "location-1").ValidationFrequency(1 * time.Second).Result(), + isValidError: nil, + expectedIsDefault: true, + expectedPhase: velerov1api.BackupStorageLocationPhaseAvailable, }, { - backupLocation: builder.ForBackupStorageLocation("ns-1", "location-2").ValidationFrequency(1 * time.Second).Result(), - isValidError: errors.New("an error"), - expectedPhase: velerov1api.BackupStorageLocationPhaseUnavailable, + backupLocation: builder.ForBackupStorageLocation("ns-1", "location-2").ValidationFrequency(1 * time.Second).Result(), + isValidError: errors.New("an error"), + expectedIsDefault: false, + expectedPhase: velerov1api.BackupStorageLocationPhaseUnavailable, + }, + } + + // Setup + var ( + pluginManager = &pluginmocks.Manager{} + backupStores = make(map[string]*persistencemocks.BackupStore) + ) + pluginManager.On("CleanupClients").Return(nil) + + locations := new(velerov1api.BackupStorageLocationList) + for i, test := range tests { + location := test.backupLocation + locations.Items = append(locations.Items, *location) + backupStores[location.Name] = &persistencemocks.BackupStore{} + backupStore := backupStores[location.Name] + backupStore.On("IsValid").Return(tests[i].isValidError) + } + + // Setup reconciler + Expect(velerov1api.AddToScheme(scheme.Scheme)).To(Succeed()) + r := BackupStorageLocationReconciler{ + Ctx: ctx, + Client: fake.NewFakeClientWithScheme(scheme.Scheme, locations), + DefaultBackupLocationInfo: storage.DefaultBackupLocationInfo{ + StorageLocation: "location-1", + StoreValidationFrequency: 0, + }, + NewPluginManager: func(logrus.FieldLogger) clientmgmt.Manager { return pluginManager }, + NewBackupStore: func(loc *velerov1api.BackupStorageLocation, _ persistence.ObjectStoreGetter, _ logrus.FieldLogger) (persistence.BackupStore, error) { + // this gets populated just below, prior to exercising the method under test + return backupStores[loc.Name], nil + }, + Log: velerotest.NewLogger(), + } + + actualResult, err := r.Reconcile(ctrl.Request{ + NamespacedName: types.NamespacedName{Namespace: "ns-1"}, + }) + + Expect(actualResult).To(BeEquivalentTo(ctrl.Result{Requeue: true})) + Expect(err).To(BeNil()) + + // Assertions + for i, location := range locations.Items { + key := client.ObjectKey{Name: location.Name, Namespace: location.Namespace} + instance := &velerov1api.BackupStorageLocation{} + err := r.Client.Get(ctx, key, instance) + Expect(err).To(BeNil()) + Expect(instance.Spec.Default).To(BeIdenticalTo(tests[i].expectedIsDefault)) + Expect(instance.Status.Phase).To(BeIdenticalTo(tests[i].expectedPhase)) + } + }) + + It("Should successfully patch a backup storage location object spec default if the BSL is the default one", func() { + tests := []struct { + backupLocation *velerov1api.BackupStorageLocation + isValidError error + expectedIsDefault bool + }{ + { + backupLocation: builder.ForBackupStorageLocation("ns-1", "location-1").ValidationFrequency(1 * time.Second).Default(false).Result(), + isValidError: nil, + expectedIsDefault: false, + }, + { + backupLocation: builder.ForBackupStorageLocation("ns-1", "location-2").ValidationFrequency(1 * time.Second).Default(true).Result(), + isValidError: nil, + expectedIsDefault: true, }, } @@ -108,28 +180,31 @@ var _ = Describe("Backup Storage Location Reconciler", func() { instance := &velerov1api.BackupStorageLocation{} err := r.Client.Get(ctx, key, instance) Expect(err).To(BeNil()) - Expect(instance.Status.Phase).To(BeIdenticalTo(tests[i].expectedPhase)) + Expect(instance.Spec.Default).To(BeIdenticalTo(tests[i].expectedIsDefault)) } }) It("Should not patch a backup storage location object status phase if the location's validation frequency is specifically set to zero", func() { tests := []struct { - backupLocation *velerov1api.BackupStorageLocation - isValidError error - expectedPhase velerov1api.BackupStorageLocationPhase - wantErr bool + backupLocation *velerov1api.BackupStorageLocation + isValidError error + expectedIsDefault bool + expectedPhase velerov1api.BackupStorageLocationPhase + wantErr bool }{ { - backupLocation: builder.ForBackupStorageLocation("ns-1", "location-1").ValidationFrequency(0).LastValidationTime(time.Now()).Result(), - isValidError: nil, - expectedPhase: "", - wantErr: false, + backupLocation: builder.ForBackupStorageLocation("ns-1", "location-1").ValidationFrequency(0).LastValidationTime(time.Now()).Result(), + isValidError: nil, + expectedIsDefault: false, + expectedPhase: "", + wantErr: false, }, { - backupLocation: builder.ForBackupStorageLocation("ns-1", "location-2").ValidationFrequency(0).LastValidationTime(time.Now()).Result(), - isValidError: nil, - expectedPhase: "", - wantErr: false, + backupLocation: builder.ForBackupStorageLocation("ns-1", "location-2").ValidationFrequency(0).LastValidationTime(time.Now()).Result(), + isValidError: nil, + expectedIsDefault: false, + expectedPhase: "", + wantErr: false, }, } @@ -178,6 +253,7 @@ var _ = Describe("Backup Storage Location Reconciler", func() { instance := &velerov1api.BackupStorageLocation{} err := r.Client.Get(ctx, key, instance) Expect(err).To(BeNil()) + Expect(instance.Spec.Default).To(BeIdenticalTo(tests[i].expectedIsDefault)) Expect(instance.Status.Phase).To(BeIdenticalTo(tests[i].expectedPhase)) } }) diff --git a/pkg/controller/backup_sync_controller.go b/pkg/controller/backup_sync_controller.go index d55016f34..c76fbada2 100644 --- a/pkg/controller/backup_sync_controller.go +++ b/pkg/controller/backup_sync_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2020 the Velero contributors. +Copyright 2020 the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -129,7 +129,13 @@ func (c *backupSyncController) run() { return } - // sync the default location first, if it exists + // sync the default backup storage location first, if it exists + for _, location := range locationList.Items { + if location.Spec.Default { + c.defaultBackupLocation = location.Name + break + } + } locations := orderedBackupLocations(&locationList, c.defaultBackupLocation) pluginManager := c.newPluginManager(c.logger) diff --git a/pkg/controller/backup_sync_controller_test.go b/pkg/controller/backup_sync_controller_test.go index 859632426..d7c52aecb 100644 --- a/pkg/controller/backup_sync_controller_test.go +++ b/pkg/controller/backup_sync_controller_test.go @@ -55,6 +55,7 @@ func defaultLocationsList(namespace string) []*velerov1api.BackupStorageLocation Bucket: "bucket-1", }, }, + Default: true, }, }, { diff --git a/pkg/controller/restore_controller.go b/pkg/controller/restore_controller.go index e38b241a1..e3204d8fe 100644 --- a/pkg/controller/restore_controller.go +++ b/pkg/controller/restore_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2019 the Velero contributors. +Copyright 2020 the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -109,7 +109,6 @@ func NewRestoreController( logger logrus.FieldLogger, restoreLogLevel logrus.Level, newPluginManager func(logrus.FieldLogger) clientmgmt.Manager, - defaultBackupLocation string, metrics *metrics.ServerMetrics, logFormat logging.Format, ) Interface { @@ -124,7 +123,6 @@ func NewRestoreController( kbClient: kbClient, snapshotLocationLister: snapshotLocationLister, restoreLogLevel: restoreLogLevel, - defaultBackupLocation: defaultBackupLocation, metrics: metrics, logFormat: logFormat, clock: &clock.RealClock{}, diff --git a/pkg/controller/restore_controller_test.go b/pkg/controller/restore_controller_test.go index f41673ef8..f8069dce1 100644 --- a/pkg/controller/restore_controller_test.go +++ b/pkg/controller/restore_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2017, 2019 the Velero contributors. +Copyright 2020 the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -117,7 +117,6 @@ func TestFetchBackupInfo(t *testing.T) { logger, logrus.InfoLevel, func(logrus.FieldLogger) clientmgmt.Manager { return pluginManager }, - "default", metrics.NewServerMetrics(), formatFlag, ).(*restoreController) @@ -213,7 +212,6 @@ func TestProcessQueueItemSkips(t *testing.T) { logger, logrus.InfoLevel, nil, - "default", metrics.NewServerMetrics(), formatFlag, ).(*restoreController) @@ -440,7 +438,6 @@ func TestProcessQueueItem(t *testing.T) { logger, logrus.InfoLevel, func(logrus.FieldLogger) clientmgmt.Manager { return pluginManager }, - "default", metrics.NewServerMetrics(), formatFlag, ).(*restoreController) @@ -673,7 +670,6 @@ func TestvalidateAndCompleteWhenScheduleNameSpecified(t *testing.T) { logger, logrus.DebugLevel, nil, - "default", nil, formatFlag, ).(*restoreController) diff --git a/site/content/docs/main/locations.md b/site/content/docs/main/locations.md index a1a763370..f3a6490c6 100644 --- a/site/content/docs/main/locations.md +++ b/site/content/docs/main/locations.md @@ -62,29 +62,34 @@ Alternately, since in this example there's only one possible volume snapshot loc velero backup create full-cluster-backup ``` -### Have some Velero backups go to a bucket in an eastern USA region, and others go to a bucket in a western USA region +### Have some Velero backups go to a bucket in an eastern USA region (default), and others go to a bucket in a western USA region During server configuration: ```shell -velero backup-location create default \ +velero backup-location create backups-primary \ --provider aws \ --bucket velero-backups \ - --config region=us-east-1 + --config region=us-east-1 \ + --default -velero backup-location create s3-alt-region \ +velero backup-location create backups-secondary \ --provider aws \ - --bucket velero-backups-alt \ + --bucket velero-backups \ --config region=us-west-1 ``` +You can alter which backup storage location as default by setting the `--default` flag under the +`velero backup-location set` command to configure another location to be the default backup storage location. +```shell +velero backup-location set backups-secondary --default +``` + +Once the defaulted backup storage location existed under `velero backup-location get --default`, then changes the default backup storage location name by `velero server --default-backup-storage-location` takes no effects anymore because the velero backup storage location controller prefers to use velero client-side setting. However, if there is no defaulted backup storage location under `velero backup-location get --default`, then changes the default backup storage location name by `velero server --default-backup-storage-location` would work. + During backup creation: ```shell -# The Velero server will automatically store backups in the backup storage location named "default" if -# one is not specified when creating the backup. You can alter which backup storage location is used -# by default by setting the --default-backup-storage-location flag on the `velero server` command (run -# by the Velero deployment) to the name of a different backup storage location. velero backup create full-cluster-backup ``` @@ -92,7 +97,7 @@ Or: ```shell velero backup create full-cluster-alternate-location-backup \ - --storage-location s3-alt-region + --storage-location backups-secondary ``` ### For volume providers that support it (like Portworx), have some snapshots be stored locally on the cluster and have others be stored in the cloud @@ -135,10 +140,11 @@ If you don't have a use case for more than one location, it's still easy to use During server configuration: ```shell -velero backup-location create default \ +velero backup-location create backups-primary \ --provider aws \ --bucket velero-backups \ - --config region=us-west-1 + --config region=us-west-1 \ + --default velero snapshot-location create ebs-us-west-1 \ --provider aws \ diff --git a/site/content/docs/main/upgrade-to-1.6.md b/site/content/docs/main/upgrade-to-1.6.md new file mode 100644 index 000000000..ac4f5e730 --- /dev/null +++ b/site/content/docs/main/upgrade-to-1.6.md @@ -0,0 +1,85 @@ +--- +title: "Upgrading to Velero 1.6" +layout: docs +--- + +## Prerequisites + +- Velero [v1.5.x][5] installed. + +If you're not yet running at least Velero v1.5, see the following: + +- [Upgrading to v1.1][1] +- [Upgrading to v1.2][2] +- [Upgrading to v1.3][3] +- [Upgrading to v1.4][4] +- [Upgrading to v1.5][5] + +## Instructions + +1. Install the Velero v1.6 command-line interface (CLI) by following the [instructions here][0]. + + Verify that you've properly installed it by running: + + ```bash + velero version --client-only + ``` + + You should see the following output: + + ```bash + Client: + Version: v1.6.0 + Git commit: + ``` + +1. Update the Velero custom resource definitions (CRDs) to include schema changes across all CRDs that are at the core of the new features in this release: + + ```bash + velero install --crds-only --dry-run -o yaml | kubectl apply -f - + ``` + + **NOTE:** If you are upgrading Velero in Kubernetes 1.14.x or earlier, you will need to use `kubectl apply`'s `--validate=false` option when applying the CRD configuration above. See [issue 2077][6] and [issue 2311][7] for more context. + +1. Update the container image used by the Velero deployment and, optionally, the restic daemon set: + + ```bash + kubectl set image deployment/velero \ + velero=velero/velero:v1.6.0 \ + --namespace velero + + # optional, if using the restic daemon set + kubectl set image daemonset/restic \ + restic=velero/velero:v1.6.0 \ + --namespace velero + ``` + +1. Confirm that the deployment is up and running with the correct version by running: + + ```bash + velero version + ``` + + You should see the following output: + + ```bash + Client: + Version: v1.6.0 + Git commit: + + Server: + Version: v1.6.0 + ``` + +1. We've deprecated the way to indicate the default backup storage location according to the backup storage location name on the velero server-side `velero server --default-backup-storage-location`, but instead configure the default backup storage location at the velero client-side, please refer to the [About locations][9] on how to indicate which backup storage location is the default one. Moreover, during the velero upgrading process, the velero backup storage location controller helps you configure which backup storage location name matches against the backup storage location name on the velero server-side `velero server --default-backup-storage-location`, then sets the BackupStorageLocation custom resource `.spec.default` to `true`. + +[0]: basic-install.md#install-the-cli +[1]: https://velero.io/docs/v1.1.0/upgrade-to-1.1/ +[2]: https://velero.io/docs/v1.2.0/upgrade-to-1.2/ +[3]: https://velero.io/docs/v1.3.2/upgrade-to-1.3/ +[4]: https://velero.io/docs/v1.4/upgrade-to-1.4/ +[5]: https://velero.io/docs/v1.5/upgrade-to-1.5 +[6]: https://github.com/vmware-tanzu/velero/releases/tag/v1.4.2 +[7]: https://github.com/vmware-tanzu/velero/issues/2077 +[8]: https://github.com/vmware-tanzu/velero/issues/2311 +[9]: https://velero.io/docs/v1.6/locations