Skip to content

Commit

Permalink
Merge pull request #493 from deepakkinni/xport-1
Browse files Browse the repository at this point in the history
[Cherry-pick] Changes for 1.4.1
  • Loading branch information
Deepak Kinni authored Nov 9, 2022
2 parents b55dad4 + 1657334 commit fe50791
Show file tree
Hide file tree
Showing 10 changed files with 744 additions and 478 deletions.
3 changes: 1 addition & 2 deletions Dockerfile-backup-driver
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/distroless/base-debian10:nonroot
FROM photon:4.0
COPY /bin/linux/amd64/lib/vmware-vix-disklib/lib64/* /vddkLibs/
ADD /bin/linux/amd64/backup-driver* /backup-driver
USER nonroot:nonroot
ENTRYPOINT ["/backup-driver"]
3 changes: 1 addition & 2 deletions Dockerfile-datamgr
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

FROM busybox:1.33.1 AS busybox

FROM gcr.io/distroless/base-debian10:nonroot
FROM photon:4.0
ADD /bin/linux/amd64/data-* /datamgr
COPY /bin/linux/amd64/lib/vmware-vix-disklib/lib64/* /vddkLibs/
COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/cp /bin/cp
COPY --from=busybox /bin/tar /bin/tar
COPY --from=busybox /bin/ls /bin/ls
USER nonroot:nonroot
ENTRYPOINT ["/datamgr"]
4 changes: 1 addition & 3 deletions Dockerfile-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

FROM busybox:1.33.1 AS busybox

FROM gcr.io/distroless/base-debian10:nonroot
FROM photon:4.0
ADD /bin/linux/amd64/velero-* /plugins/
ADD /bin/linux/amd64/data-* /
ADD /bin/linux/amd64/backup-driver* /
Expand All @@ -24,7 +24,5 @@ ENV LD_LIBRARY_PATH=/plugins
COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/chmod /bin/chmod
COPY --from=busybox /bin/cp /bin/cp
USER root
RUN ["chmod", "+x", "/scripts/install.sh"]
USER nonroot:nonroot
ENTRYPOINT ["/bin/sh","/scripts/install.sh"]
301 changes: 301 additions & 0 deletions changelogs/CHANGELOG-1.4.md

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions docs/csi-migrated-volume-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# CSI migrated volume support

Velero Plugin for vSphere v1.4.0 and above supports backing up of migrated vSphere CSI volumes. A migrated vSphere CSI volume is originally provisioned by VMware vSphere Cloud Provider but migrated to vSphere CSI driver.

To enable this feature, we need to turn on feature gate csi-migrated-volume-support
Below is the default configMap values.
```yaml
kubectl -n velero describe configmap/velero-vsphere-plugin-feature-states
Name: velero-vsphere-plugin-feature-states
Namespace: velero
Labels: <none>
Labels: <none>
Annotations: <none>

Data
====
csi-migrated-volume-support:
----
false
decouple-vsphere-csi-driver:
----
true
local-mode:
```
We can turn it on with below cmd
```yaml
cat velero-vsphere-plugin-feature-states.yaml

apiVersion: v1
data:
csi-migrated-volume-support: "true"
decouple-vsphere-csi-driver: "true"
local-mode: "false"
kind: ConfigMap
metadata:
name: velero-vsphere-plugin-feature-states

kubectl -n velero apply -f velero-vsphere-plugin-feature-states.yaml
```
## Prerequisite
We need to make sure vSphere CSI migration is properly enabled.
[Migrating In-Tree vSphere Volumes to vSphere Container Storage Plug-in](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-968D421F-D464-4E22-8127-6CB9FF54423F.html)

Below cmd will print all CRs, 1 for each migrated vSphere CSI volume
```yaml
kubectl get cnsvspherevolumemigrations.cns.vmware.com -A
```
12 changes: 9 additions & 3 deletions docs/guest.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ This document discusses the velero vSphere plugin installation process in a **Ta

## Compatibility

| vSphere/ESXi Version | vSphere CSI Version | Kubernetes Version | Velero Version | Velero Plugin for vSphere Version |
|----------------------------------------|------------------------------|--------------------|-------------------|-----------------------------------|
| vSphere 7.0(U1c/P02)/ESXi 7.0(U1c/P02) | CSI driver bundled with TKGS | v1.16-v1.19 | v1.5.1 and higher | v1.1.0 and higher |
| Velero Plugin for vSphere Version | vSphere Version | Kubernetes Version | vSphere CSI Driver Version | Velero Version | Deprecated | EOL Date |
|-----------------------------------|--------------------|--------------------|----------------------------|----------------|------------|---------------|
| 1.4.0 | 7.0U1c/P02 - 7.0U3 | 1.19-1.22 | Bundled with TKGS | 1.8.1 | No | N/A
| 1.3.1 | 7.0U1c/P02 - 7.0U3 | 1.19-1.21 | Bundled with TKGS | 1.7.0 | No | N/A |
| 1.3.0 | 7.0U1c/P02 - 7.0U3 | 1.19-1.21 | Bundled with TKGS | 1.7.0 | Yes | December 2022 |
| 1.2.1 | 7.0U1c/P02 - 7.0U2 | 1.18-1.20 | Bundled with TKGS | 1.5.1 | Yes | June 2023 |
| 1.2.0 | 7.0U1c/P02 - 7.0U2 | 1.18-1.20 | Bundled with TKGS | 1.5.1 | Yes | December 2022 |
| 1.1.1 | 7.0U1c/P02 | 1.16-1.19 | Bundled with TKGS | 1.5.1 | No | N/A |
| 1.1.0 | 7.0U1c/P02 | 1.16-1.19 | Bundled with TKGS | 1.5.1 | Yes | December 2022 |

## Prerequisites

Expand Down
12 changes: 9 additions & 3 deletions docs/supervisor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@

## Compatibility

| vSphere Version | vSphere CSI Version | Kubernetes Version | Velero Version | Velero Plugin for vSphere Version |
|:---------------:|:----------------------------------------------------------------------:|:------------------:|:--------------:|:---------------------------------:|
| vSphere 7.0 U1c/P02 + ESXi 7.0 U1c/P02 | Bundled with vSphere | Bundled with vSphere (v1.16-v1.19) | v1.5.1 | v1.1.0 and higher |
| Velero Plugin for vSphere Version | vSphere Version | Kubernetes Version | vSphere CSI Driver Version | Velero Version | Velero vSphere Operator Version | Deprecated | EOL Date |
|-----------------------------------|---------------------|-------------------------------------------------------------------|----------------------------|----------------|---------------------------------|------------|---------------|
| 1.4.0 | 7.0U3e/f/h | Bundled with vSphere (1.22) | Bundled with vSphere | 1.8.1 | 1.2.0 | No | N/A |
| 1.3.1 | 7.0U1c/P02 - 7.0U3d | Bundled with vSphere (1.16-1.19, 1.18-1.20, 1.19-1.21) | Bundled with vSphere | 1.5.1 | 1.1.0 | No | N/A |
| 1.3.0 | 7.0U1c/P02 - 7.0U3d | Bundled with vSphere (1.16-1.19, 1.18-1.20, 1.19-1.21) | Bundled with vSphere | 1.5.1 | 1.1.0 | Yes | December 2022 |
| 1.2.1 | 7.0U1c/P02 - 7.0U2 | Bundled with vSphere (1.16-1.19, 1.18-1.20) | Bundled with vSphere | 1.5.1 | 1.1.0 | Yes | June 2023 |
| 1.2.0 | 7.0U1c/P02 - 7.0U2 | Bundled with vSphere (1.16-1.19, 1.18-1.20) | Bundled with vSphere | 1.5.1 | 1.1.0 | Yes | December 2022 |
| 1.1.1 | 7.0U1c/P02 | Bundled with vSphere (1.16-1.19) | Bundled with vSphere | 1.5.1 | 1.1.0 | No | N/A |
| 1.1.0 | 7.0U1c/P02 | Bundled with vSphere (1.16-1.19) | Bundled with vSphere | 1.5.1 | 1.1.0 | Yes | December 2022 |

## Prerequisites

Expand Down
22 changes: 15 additions & 7 deletions docs/vanilla.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@

## Compatibility

| vSphere Version | vSphere CSI Version | Kubernetes Version | Velero Version | Velero Plugin for vSphere Version |
|-------------------------|-----------------------------------------------------------|--------------------|-------------------|-----------------------------------|
| vSphere 6.7U3 / ESXi 6.7U3 | v1.0.2 (update to 1.0.3 when available) | v1.14 and higher | v1.5.1 and higher | v1.1.0 and higher |
| vSphere 6.7U3 / ESXi 6.7U3 | v2.0.1 and higher | v1.17 and higher | v1.5.1 and higher | v1.1.0 and higher |
| vSphere 7.0 / ESXi 7.0 and higher | CSI 1.0.2 driver features continue to work on vSphere 7.0 | v1.14 and higher | v1.5.1 and higher | v1.1.0 and higher |
| vSphere 7.0 / ESXi 7.0 and higher | v2.0.1 and higher | v1.17 and higher | v1.5.1 and higher | v1.1.0 and higher |

| Velero Plugin for vSphere Version | vSphere Version | Kubernetes Version | vSphere CSI Driver Version | Velero Version | Deprecated | EOL Date |
|-----------------------------------|------------------------|--------------------|-----------------------------------|----------------|------------|---------------|
| 1.4.0 | 6.7U3 P06 - 7.0U3 | 1.20-1.23 | 2.2.2, 2.3.1, 2.4.1, 2.5.1, 2.6.1 | 1.8.1 | No | N/A
| 1.3.1 | 6.7U3 P06 - 7.0U3 | 1.19-1.22 | 2.2.2, 2.3.1, 2.4.1 | 1.7.0 | No | N/A |
| 1.3.0 | 6.7U3 P06 - 7.0U3 | 1.19-1.22 | 2.2.2, 2.3.1, 2.4.1 | 1.7.0 | Yes | December 2022 |
| 1.2.1 | 6.7U3 P06 - 7.0U2 | 1.19-1.21 | 2.1.2, 2.2.2, 2.3.1 | 1.5.1 | Yes | June 2023 |
| 1.2.0 | 6.7U3 P06 - 7.0U2 | 1.19-1.21 | 2.1.2, 2.2.2, 2.3.1 | 1.5.1 | Yes | December 2022 |
| 1.1.1 | 6.7U3 P06 - 7.0U1c/P02 | 1.17-1.19 | 2.0.1, 2.1.0 | 1.5.1 | No | N/A |
| 1.1.0 | 6.7U3 P06 - 7.0U1c/P02 | 1.17-1.21 | 2.0.1, 2.1.0 | 1.5.1 | Yes | December 2022 |

**Note**: Velero Plugin for vSphere 1.0.2 and earlier: EOL.
**Note**: Velero Plugin for vSphere 1.2.x does not work for TKGm which is fixed in 1.3.0+.
**Note**: Velero Plugin for vSphere does not support vSphere CSI Driver deployed as a process with multiple replicas in a Kubernetes multi-node control plane setup.

## Prerequisites
Expand Down Expand Up @@ -325,6 +330,9 @@ Upload CRD has a number of phases for the `.status.phase` field:

UploadError uploads will be periodically retried. At that point their phase will return to InProgress. After an upload has been
successfully completed, its record will remain for a period of time and eventually be removed.
#### Migrated CNS block volume

If the CNS block volume is migrated, refer to [CSI migrated volume support](csi-migrated-volume-support.md).

### Backup vSphere CNS File Volumes

Expand Down
76 changes: 39 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ module github.com/vmware-tanzu/velero-plugin-for-vsphere

require (
github.com/agiledragon/gomonkey v2.0.1+incompatible
github.com/aws/aws-sdk-go v1.38.49
github.com/aws/aws-sdk-go v1.42.10
github.com/evanphx/json-patch v4.11.0+incompatible
github.com/google/uuid v1.1.2
github.com/hashicorp/go-version v1.2.1
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.1.3
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/vmware-tanzu/astrolabe v0.5.1
github.com/vmware-tanzu/velero v1.5.1
github.com/vmware-tanzu/astrolabe v0.5.1-0.20221108171857-b206312e3ba5
github.com/vmware-tanzu/velero v1.7.1
github.com/vmware/govmomi v0.22.2-0.20200329013745-f2eef8fc745f
github.com/vmware/virtual-disks v0.0.4
k8s.io/api v0.22.0
k8s.io/apiextensions-apiserver v0.22.0
k8s.io/apimachinery v0.22.0
k8s.io/client-go v0.22.0
k8s.io/api v0.22.4
k8s.io/apiextensions-apiserver v0.22.4
k8s.io/apimachinery v0.22.4
k8s.io/client-go v0.22.4
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
)

require (
cloud.google.com/go v0.54.0 // indirect
cloud.google.com/go v0.93.3 // indirect
github.com/Azure/azure-sdk-for-go v55.0.0+incompatible // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 // indirect
github.com/Azure/go-autorest/autorest v0.11.21 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
Expand All @@ -43,8 +43,9 @@ require (
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dimchansky/utfbom v1.1.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-openapi/analysis v0.20.1 // indirect
Expand All @@ -62,30 +63,30 @@ require (
github.com/gofrs/uuid v4.0.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/hashicorp/go-hclog v0.8.0 // indirect
github.com/hashicorp/go-hclog v0.12.0 // indirect
github.com/hashicorp/go-plugin v0.0.0-20190610192547-a1bc61569a26 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/imdario/mergo v0.3.9 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jessevdk/go-flags v1.4.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/joho/godotenv v1.3.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/kubernetes-csi/external-snapshotter/v2 v2.2.0-rc1 // indirect
github.com/labstack/echo v3.3.10+incompatible // indirect
github.com/labstack/gommon v0.3.0 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0 // indirect
github.com/labstack/echo/v4 v4.9.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
Expand All @@ -101,28 +102,29 @@ require (
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/urfave/cli/v2 v2.2.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.0.1 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
go.mongodb.org/mongo-driver v1.7.5 // indirect
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.38.0 // indirect
google.golang.org/protobuf v1.26.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71 // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/cli-runtime v0.22.0 // indirect
k8s.io/cli-runtime v0.22.2 // indirect
k8s.io/klog/v2 v2.9.0 // indirect
k8s.io/kube-aggregator v0.19.12 // indirect
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
sigs.k8s.io/controller-runtime v0.6.1 // indirect
sigs.k8s.io/controller-runtime v0.10.2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
Expand Down
Loading

0 comments on commit fe50791

Please sign in to comment.