Compare commits

...

3 Commits

Author SHA1 Message Date
Wenkai Yin(尹文开)
9e52260568 Merge pull request #4182 from ywk253100/210922_snapshot_cherrypick
Specify the "--snapshot-volumes=false" option explicitly when running backup with Restic
2021-09-22 22:00:31 +08:00
Wenkai Yin(尹文开)
4863ff4119 Specify the "--snapshot-volumes=false" option explicitly when running backup with Restic
If the "--snapshot-volumes=false" isn't specified explicitly, the vSphere plugin will always take snapshots for the volumes even though the "--default-volumes-to-restic" is specified
This can be removed if the logic of vSphere plugin changes

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
2021-09-22 21:50:54 +08:00
Daniel Jiang
3327d209f7 Pin the base image for v1.7 (#4180)
To improve the reproducibility of the images of velero, this commit pins
the golang and distroless images to specific tag and digest.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2021-09-22 07:50:07 -04:00
2 changed files with 7 additions and 2 deletions

View File

@@ -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.16 as builder-env
FROM --platform=$BUILDPLATFORM golang:1.16.8 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-debian10:nonroot
FROM gcr.io/distroless/base-debian10@sha256:a74f307185001c69bc362a40dbab7b67d410a872678132b187774fa21718fa13
LABEL maintainer="Nolan Brubaker <brubakern@vmware.com>"

View File

@@ -236,6 +236,11 @@ func veleroBackupNamespace(ctx context.Context, veleroCLI string, veleroNamespac
args = append(args, "--snapshot-volumes")
} else {
args = append(args, "--default-volumes-to-restic")
// To workaround https://github.com/vmware-tanzu/velero-plugin-for-vsphere/issues/347 for vsphere plugin v1.1.1
// if the "--snapshot-volumes=false" isn't specified explicitly, the vSphere plugin will always take snapshots
// for the volumes even though the "--default-volumes-to-restic" is specified
// TODO This can be removed if the logic of vSphere plugin bump up to 1.3
args = append(args, "--snapshot-volumes=false")
}
if backupLocation != "" {
args = append(args, "--storage-location", backupLocation)