Skip to content

Commit

Permalink
Change make path v1
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyanw409 committed Nov 7, 2022
1 parent 555a637 commit 35f0376
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 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
COPY /bin/linux/amd64/lib/vmware-vix-disklib/lib64/* /vddkLibs/
FROM gcr.io/distroless/static-debian10:nonroot
ADD /bin/linux/amd64/backup-driver* /backup-driver
USER nonroot:nonroot
ENTRYPOINT ["/backup-driver"]
3 changes: 1 addition & 2 deletions Dockerfile-plugin
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 gcr.io/distroless/static-debian10:nonroot
ADD /bin/linux/amd64/velero-* /plugins/
ADD /bin/linux/amd64/data-* /
ADD /bin/linux/amd64/backup-driver* /
COPY /bin/linux/amd64/install.sh /scripts/
COPY /bin/linux/amd64/lib/vmware-vix-disklib/lib64/* /plugins/
ENV LD_LIBRARY_PATH=/plugins
COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/chmod /bin/chmod
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ PLUGIN_DOCKERFILE ?= Dockerfile-plugin
DATAMGR_DOCKERFILE ?= Dockerfile-datamgr
BACKUPDRIVER_DOCKERFILE ?= Dockerfile-backup-driver

all: dep plugin vsphere-astrolabe
all: dep datamgr backup-driver plugin vsphere-astrolabe

dep:
ifeq (,$(wildcard $(GOPATH)/src/$(VDDK_LIBS)))
$(error "$(GOPATH)/src/$(VDDK_LIBS) cannot find vddk libs in path. Please refer to: https://github.com/vmware/virtual-disks#dependency, download the VDDK tarball to the directory $(GOPATH)/src/$(LIB_DIR)/ and untar it")
endif

plugin: datamgr backup-driver
plugin:
@echo "making: $@"
$(MAKE) build BIN=$(PLUGIN_BIN) VERSION=$(VERSION)

Expand Down Expand Up @@ -166,15 +166,15 @@ copy-vix-libs:
copy-install-script:
cp $$(pwd)/scripts/install.sh _output/bin/$(GOOS)/$(GOARCH)

build-container: copy-vix-libs container-name
build-container: container-name
cp $(DOCKERFILE) _output/bin/$(GOOS)/$(GOARCH)/$(DOCKERFILE)
docker build -t $(IMAGE):$(VERSION) -f _output/bin/$(GOOS)/$(GOARCH)/$(DOCKERFILE) _output

plugin-container: all copy-install-script
plugin-container: dep plugin vsphere-astrolabe copy-install-script
$(MAKE) build-container IMAGE=$(PLUGIN_IMAGE) DOCKERFILE=$(PLUGIN_DOCKERFILE) VERSION=$(VERSION)

datamgr-container: datamgr
$(MAKE) build-container BIN=$(DATAMGR_BIN) IMAGE=$(DATAMGR_IMAGE) DOCKERFILE=$(DATAMGR_DOCKERFILE) VERSION=$(VERSION)
$(MAKE) copy-vix-libs build-container BIN=$(DATAMGR_BIN) IMAGE=$(DATAMGR_IMAGE) DOCKERFILE=$(DATAMGR_DOCKERFILE) VERSION=$(VERSION)

backup-driver-container: backup-driver
$(MAKE) build-container BIN=$(BACKUPDRIVER_BIN) IMAGE=$(BACKUPDRIVER_IMAGE) DOCKERFILE=$(BACKUPDRIVER_DOCKERFILE) VERSION=$(VERSION)
Expand Down
2 changes: 0 additions & 2 deletions deployment/create-deployment-for-backupdriver-guest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ spec:
value: velero
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: LD_LIBRARY_PATH
value: /vddkLibs
image: dpcpinternal/backup-driver:<backup-driver image tag>
imagePullPolicy: IfNotPresent
name: backup-driver
Expand Down
2 changes: 0 additions & 2 deletions deployment/create-deployment-for-backupdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ spec:
value: velero
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: LD_LIBRARY_PATH
value: /vddkLibs
image: dpcpinternal/backup-driver:<backup-driver image tag>
imagePullPolicy: IfNotPresent
name: backup-driver
Expand Down
4 changes: 0 additions & 4 deletions pkg/install/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ func Deployment(namespace string, opts ...podTemplateOption) *appsv1.Deployment
Name: "VELERO_SCRATCH_DIR",
Value: "/scratch",
},
{
Name: "LD_LIBRARY_PATH",
Value: "/vddkLibs",
},
},
Resources: c.resources,
},
Expand Down

0 comments on commit 35f0376

Please sign in to comment.