Skip to content

Commit

Permalink
change registry
Browse files Browse the repository at this point in the history
  • Loading branch information
naoki9911 committed Nov 9, 2023
1 parent 2e3431b commit a7ce0d1
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
publish-image:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io/${{github.repository}}
STAGINGVERSION: latest
DOCKER_BUILD_ARGS: --push
steps:
- uses: actions/checkout@v4
Expand Down
25 changes: 4 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ DRIVER_BINARY = meta-fuse-csi-plugin
STARTER_BINARY = fuse-starter
FUSERMOUNT3PROXY_BINARY = fusermount3-proxy

ifneq ("$(REGISTRY)", "")
REGISTRY ?= ghcr.io/pfnet-research/meta-fuse-csi-plugin
DRIVER_IMAGE = ${REGISTRY}/${DRIVER_BINARY}
STARTER_IMAGE = ${REGISTRY}/${STARTER_BINARY}
EXAMPLE_IMAGE = ${REGISTRY}/mfcp-example
else
DRIVER_IMAGE = ${DRIVER_BINARY}
STARTER_IMAGE = ${STARTER_BINARY}
EXAMPLE_IMAGE = mfcp-example
endif

DOCKER_BUILD_ARGS ?= --load
DOCKER_BUILD_ARGS += --build-arg STAGINGVERSION=${STAGINGVERSION}
Expand All @@ -47,7 +42,7 @@ $(info STARTER_IMAGE is ${STARTER_IMAGE})

.PHONY: all build-image-linux-amd64

all: build-image-linux-amd64 build-examples
all: build-driver build-examples

driver:
mkdir -p ${BINDIR}
Expand All @@ -61,10 +56,8 @@ fusermount3-proxy:
mkdir -p ${BINDIR}
CGO_ENABLED=0 GOOS=linux GOARCH=$(shell dpkg --print-architecture) go build -ldflags "${LDFLAGS}" -o ${BINDIR}/${FUSERMOUNT3PROXY_BINARY} cmd/fusermount3-proxy/main.go

build-image-linux-amd64: build-driver build-starter

build-driver:
$(eval IMAGE_NAME := ${DRIVER_IMAGE}:${STAGINGVERSION}_linux_amd64)
$(eval IMAGE_NAME := ${DRIVER_IMAGE}:${STAGINGVERSION})
docker buildx build ${DOCKER_BUILD_ARGS} ${DOCKER_CACHE_ARGS} \
--file ./cmd/csi_driver/Dockerfile \
--tag ${IMAGE_NAME} \
Expand All @@ -73,16 +66,6 @@ build-driver:
kind load docker-image ${IMAGE_NAME};\
fi

build-starter:
$(eval IMAGE_NAME := ${STARTER_IMAGE}:${STAGINGVERSION}_linux_amd64)
docker buildx build ${DOCKER_BUILD_ARGS} ${DOCKER_CACHE_ARGS} \
--file ./cmd/fuse_starter/Dockerfile \
--tag ${STARTER_IMAGE}:${STAGINGVERSION}_linux_amd64 \
--platform linux/amd64 .
if [ "${LOAD_TO_KIND}" = "true" ]; then \
kind load docker-image ${IMAGE_NAME};\
fi

define build-example-template
ifneq ("$(EXAMPLES)", "")
EXAMPLES += build-example-$(1)-$(2)
Expand All @@ -92,7 +75,7 @@ endif

.PHONY: build-example-$1-$2
build-example-$(1)-$(2):
$(eval IMAGE_NAME := ${EXAMPLE_IMAGE}-$1-$2:${STAGINGVERSION}_linux_amd64)
$(eval IMAGE_NAME := ${EXAMPLE_IMAGE}-$1-$2:${STAGINGVERSION})
docker buildx build ${DOCKER_BUILD_ARGS} ${DOCKER_CACHE_ARGS} \
--file ./examples/$1/$2/Dockerfile \
--tag ${IMAGE_NAME} \
Expand Down
2 changes: 1 addition & 1 deletion deploy/csi-driver-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: meta-fuse-csi-plugin:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/meta-fuse-csi-plugin:latest
imagePullPolicy: IfNotPresent
name: meta-fuse-csi-plugin
resources:
Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/gcsfuse/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: starter
image: mfcp-example-proxy-gcsfuse:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-proxy-gcsfuse:latest
imagePullPolicy: IfNotPresent
command: ["gcsfuse"]
args: ["--uid=0", "--gid=0", "--temp-dir=/gcsfuse-temp", "--implicit-dirs", "--foreground", "--log-file=/dev/fd/1", "--log-format=text", "mnaoki-csi-dev", "/tmp"]
Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/goofys/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: ["/bin/bash"]
args: ["-c", "minio server /data --console-address :9090"]
- name: starter
image: mfcp-example-proxy-goofys:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-proxy-goofys:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "./configure_minio.sh && /goofys --endpoint http://localhost:9000 -f test-bucket /tmp"]
Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/mountpoint-s3/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: ["/bin/bash"]
args: ["-c", "minio server /data --console-address :9090"]
- name: starter
image: mfcp-example-proxy-mountpoint-s3:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-proxy-mountpoint-s3:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "./configure_minio.sh && mount-s3 test-bucket /tmp --endpoint-url \"http://localhost:9000\" -d --allow-other --auto-unmount --foreground --force-path-style"] # "--auto-unmount" forces mountpoint-s3 to use fusermount3
Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/ros3fs/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: ["/bin/bash"]
args: ["-c", "minio server /data --console-address :9090"]
- name: starter
image: mfcp-example-proxy-ros3fs:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-proxy-ros3fs:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "./configure_minio.sh && touch /dev/fuse && /ros3fs /tmp --endpoint=http://localhost:9000 --bucket_name=test-bucket/ --cache_dir=/ro3fs-temp -f"]
Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/s3fs/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: ["/bin/bash"]
args: ["-c", "minio server /data --console-address :9090"]
- name: starter
image: mfcp-example-proxy-s3fs:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-proxy-s3fs:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
# This allows libfuse to use fusermount3. Its detail is described in examples/proxy/sshfs/README.md
Expand Down
2 changes: 1 addition & 1 deletion examples/proxy/sshfs/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: starter
image: mfcp-example-proxy-sshfs:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-proxy-sshfs:latest
imagePullPolicy: IfNotPresent
env:
- name: FUSERMOUNT3PROXY_FDPASSING_SOCKPATH
Expand Down
2 changes: 1 addition & 1 deletion examples/starter/ros3fs/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
command: ["/bin/bash"]
args: ["-c", "minio server /data --console-address :9090"]
- name: starter
image: mfcp-example-starter-ros3fs:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-starter-ros3fs:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c", "./configure_minio.sh && /mfcp-bin/fuse-starter --fd-passing-socket-path /fuse-fd-passing/fuse-csi-ephemeral.sock -- /ros3fs /dev/fd/3 --endpoint=http://localhost:9000 --bucket_name=test-bucket/ --cache_dir=/ro3fs-temp -f"]
Expand Down
2 changes: 1 addition & 1 deletion examples/starter/sshfs/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: starter
image: mfcp-example-starter-sshfs:latest_linux_amd64
image: ghcr.io/pfnet-research/meta-fuse-csi-plugin/mfcp-example-starter-sshfs:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- name: fuse-fd-passing
Expand Down

0 comments on commit a7ce0d1

Please sign in to comment.