Skip to content

Commit

Permalink
Fix build: rename to volcano-device-plugin
Browse files Browse the repository at this point in the history
Signed-off-by: xuzhonghu <[email protected]>
  • Loading branch information
hzxuzhonghu committed Jul 5, 2020
1 parent 9bc1c67 commit 2b3a865
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,25 @@ VERSION ?= 1.0.0
all: ubuntu16.04 centos7

push:
$(DOCKER) push "$(REGISTRY)/k8s-device-plugin:$(VERSION)-ubuntu16.04"
$(DOCKER) push "$(REGISTRY)/k8s-device-plugin:$(VERSION)-centos7"
$(DOCKER) push "$(REGISTRY)/volcano-device-plugin:$(VERSION)-ubuntu16.04"
$(DOCKER) push "$(REGISTRY)/volcano-device-plugin:$(VERSION)-centos7"

push-short:
$(DOCKER) tag "$(REGISTRY)/k8s-device-plugin:$(VERSION)-ubuntu16.04" "$(REGISTRY)/k8s-device-plugin:$(VERSION)"
$(DOCKER) push "$(REGISTRY)/k8s-device-plugin:$(VERSION)"
$(DOCKER) tag "$(REGISTRY)/volcano-device-plugin:$(VERSION)-ubuntu16.04" "$(REGISTRY)/volcano-device-plugin:$(VERSION)"
$(DOCKER) push "$(REGISTRY)/volcano-device-plugin:$(VERSION)"

push-latest:
$(DOCKER) tag "$(REGISTRY)/k8s-device-plugin:$(VERSION)-ubuntu16.04" "$(REGISTRY)/k8s-device-plugin:latest"
$(DOCKER) push "$(REGISTRY)/k8s-device-plugin:latest"
$(DOCKER) tag "$(REGISTRY)/volcano-device-plugin:$(VERSION)-ubuntu16.04" "$(REGISTRY)/volcano-device-plugin:latest"
$(DOCKER) push "$(REGISTRY)/volcano-device-plugin:latest"

ubuntu16.04:
$(DOCKER) build --pull \
--tag $(REGISTRY)/k8s-device-plugin:$(VERSION)-ubuntu16.04 \
--tag $(REGISTRY)/volcano-device-plugin:$(VERSION)-ubuntu16.04 \
--file docker/amd64/Dockerfile.ubuntu16.04 .

centos7:
$(DOCKER) build --pull \
--tag $(REGISTRY)/k8s-device-plugin:$(VERSION)-centos7 \
--tag $(REGISTRY)/volcano-device-plugin:$(VERSION)-centos7 \
--file docker/amd64/Dockerfile.centos7 .

include Makefile.def
Expand All @@ -60,4 +60,4 @@ init:

gen_bin: init
go get github.com/mitchellh/gox
CGO_ENABLED=1 gox -osarch=${REL_OSARCH} -ldflags ${LD_FLAGS} -output ${BIN_DIR}/${REL_OSARCH}/k8s-device-plugin ./
CGO_ENABLED=1 gox -osarch=${REL_OSARCH} -ldflags ${LD_FLAGS} -output ${BIN_DIR}/${REL_OSARCH}/volcano-device-plugin ./
8 changes: 4 additions & 4 deletions docker/amd64/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ RUN wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linu
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

WORKDIR /go/src/volcano.sh/k8s-device-plugin
WORKDIR /go/src/volcano.sh/devices
COPY . .

RUN export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
go build -ldflags="-s -w"
go build -ldflags="-s -w" -o volcano-device-plugin


FROM centos:7

ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility

COPY --from=build /go/bin/k8s-device-plugin /usr/bin/k8s-device-plugin
COPY --from=build /go/src/volcano.sh/devices/volcano-device-plugin /usr/bin/volcano-device-plugin

ENTRYPOINT ["k8s-device-plugin"]
ENTRYPOINT ["volcano-device-plugin"]
8 changes: 4 additions & 4 deletions docker/amd64/Dockerfile.ubuntu16.04
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ RUN wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linu
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

WORKDIR /go/src/volcano.sh/k8s-device-plugin
WORKDIR /go/src/volcano.sh/devices
COPY . .

RUN export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
go build -ldflags="-s -w"
go build -ldflags="-s -w" -o volcano-device-plugin


FROM debian:stretch-slim

ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility

COPY --from=build /go/src/volcano.sh/k8s-device-plugin/k8s-device-plugin /usr/bin/k8s-device-plugin
COPY --from=build /go/src/volcano.sh/devices/volcano-device-plugin /usr/bin/volcano-device-plugin

ENTRYPOINT ["k8s-device-plugin"]
ENTRYPOINT ["volcano-device-plugin"]
10 changes: 5 additions & 5 deletions volcano-device-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: nvidia-device-plugin-daemonset
name: volcano-device-plugin
namespace: kube-system
spec:
selector:
matchLabels:
name: nvidia-device-plugin-ds
name: volcano-device-plugin
updateStrategy:
type: RollingUpdate
template:
Expand All @@ -30,7 +30,7 @@ spec:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
labels:
name: nvidia-device-plugin-ds
name: volcano-device-plugin
spec:
tolerations:
# This toleration is deprecated. Kept here for backward compatibility
Expand All @@ -46,8 +46,8 @@ spec:
# See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/
priorityClassName: "system-node-critical"
containers:
- image: nvidia/k8s-device-plugin:latest
name: nvidia-device-plugin-ctr
- image: volcanosh/volcano-device-plugin:latest
name: volcano-device-plugin
env:
- name: NODE_NAME
valueFrom:
Expand Down

0 comments on commit 2b3a865

Please sign in to comment.