SHA256
1
0
forked from pool/velero

Accepting request 841369 from home:jenting:branches:devel:kubic

- Update to version v1.5.1
  - Auto Volume Backup Using Restic with --default-volumes-to-restic flag
  - DeleteItemAction plugins
  - Code modernization
  - Restore Hooks: InitContianer Restore Hooks and Exec Restore Hooks

OBS-URL: https://build.opensuse.org/request/show/841369
OBS-URL: https://build.opensuse.org/package/show/devel:kubic/velero?expand=0&rev=6
This commit is contained in:
Richard Brown 2020-10-13 15:50:00 +00:00 committed by Git OBS Bridge
parent 6fd8315069
commit 187103ee84
6 changed files with 16 additions and 78 deletions

View File

@ -1,69 +0,0 @@
From 9f97fb0e1c53047cddf22b8ba05a2966062fe650 Mon Sep 17 00:00:00 2001
From: JenTing Hsiao <jenting.hsiao@suse.com>
Date: Fri, 31 Jul 2020 02:33:45 +0800
Subject: [PATCH] Add cacert flag for velero backup-location create (#2778)
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
---
pkg/cmd/cli/backuplocation/create.go | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/pkg/cmd/cli/backuplocation/create.go b/pkg/cmd/cli/backuplocation/create.go
index a4dfd5ad..b76d0149 100644
--- a/pkg/cmd/cli/backuplocation/create.go
+++ b/pkg/cmd/cli/backuplocation/create.go
@@ -18,6 +18,8 @@ package backuplocation
import (
"fmt"
+ "io/ioutil"
+ "path/filepath"
"strings"
"time"
@@ -62,6 +64,7 @@ type CreateOptions struct {
BackupSyncPeriod time.Duration
Config flag.Map
Labels flag.Map
+ CACertFile string
AccessMode *flag.Enum
}
@@ -83,6 +86,7 @@ func (o *CreateOptions) BindFlags(flags *pflag.FlagSet) {
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")
flags.Var(&o.Config, "config", "configuration key-value pairs")
flags.Var(&o.Labels, "labels", "labels to apply to the backup storage location")
+ flags.StringVar(&o.CACertFile, "cacert", o.CACertFile, "file containing a certificate bundle to use when verifying TLS connections to the object store. Optional.")
flags.Var(
o.AccessMode,
"access-mode",
@@ -118,6 +122,18 @@ func (o *CreateOptions) Complete(args []string, f client.Factory) error {
func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
var backupSyncPeriod *metav1.Duration
+ var caCertData []byte
+ if o.CACertFile != "" {
+ realPath, err := filepath.Abs(o.CACertFile)
+ if err != nil {
+ return err
+ }
+ caCertData, err = ioutil.ReadFile(realPath)
+ if err != nil {
+ return err
+ }
+ }
+
if c.Flags().Changed("backup-sync-period") {
backupSyncPeriod = &metav1.Duration{Duration: o.BackupSyncPeriod}
}
@@ -134,6 +150,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
ObjectStorage: &velerov1api.ObjectStorageLocation{
Bucket: o.Bucket,
Prefix: o.Prefix,
+ CACert: caCertData,
},
},
Config: o.Config.Data(),
--
2.26.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:83677c307d207156aca1e1f9010b10de7bfde24751bab76a86d55b10abd6deaa
size 5377050

3
velero-1.5.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5d8f50f8f84f08ec7fc72d2572fd15749b3b95f1a0ac2483f3a4fe6f43e4961
size 5929719

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Oct 13 01:05:31 UTC 2020 - jenting hsiao <jenting.hsiao@suse.com>
- Update to version v1.5.1
- Auto Volume Backup Using Restic with --default-volumes-to-restic flag
- DeleteItemAction plugins
- Code modernization
- Restore Hooks: InitContianer Restore Hooks and Exec Restore Hooks
-------------------------------------------------------------------
Fri Jul 31 00:44:01 UTC 2020 - jenting hsiao <jenting.hsiao@suse.com>

View File

@ -17,11 +17,11 @@
%define goipath github.com/vmware-tanzu/velero
%define commit 56a08a4d695d893f0863f697c2f926e27d70c0c5
%define commit 87d86a45a6ca66c6c942c7c7f08352e26809426c
%define gitstate clean
Name: velero
Version: 1.4.2
Version: 1.5.1
Release: 0
Summary: Backup program with deduplication and encryption
License: Apache-2.0
@ -29,7 +29,6 @@ Group: Productivity/Archiving/Backup
URL: https://velero.io
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Patch0: 0001-Add-cacert-flag-for-velero-backup-location-create.patch
BuildRequires: golang-packaging
BuildRequires: golang(API) = 1.14
@ -49,7 +48,6 @@ Restic restore helper for %{name}.
%prep
%setup -q
%setup -q -T -D -a 1
%patch0 -p1
%build
%goprep %{goipath}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5863db57a203cc6e19ade6fb4b413cf1629f38a7239c75d446ce31bca3d61ea2
size 5428275
oid sha256:966f43279582db1db93066b13c2e5f5f41e632e7d6952ae97ce3404eebbd3980
size 6920761