Skip to content

Commit 72acd71

Browse files
authored
Adding a new binary for iSCSI node prep to trident, as well as the building of it in the Makefile and the packaging of it in the Dockerfile
1 parent 510fe83 commit 72acd71

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ COPY --from=baseimage /nfs-deps/ /
2222
ARG BIN=trident_orchestrator
2323
ARG CLI_BIN=tridentctl
2424
ARG CHWRAP_BIN=chwrap.tar
25+
ARG NODE_PREP_BIN=node_prep
2526

2627
COPY ${BIN} /trident_orchestrator
2728
COPY ${CLI_BIN} /bin/tridentctl
29+
COPY ${NODE_PREP_BIN} /node_prep
2830
ADD ${CHWRAP_BIN} /
2931

3032
ENTRYPOINT ["/bin/tridentctl"]

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ chwrap_build = $(call go_build,chwrap,./chwrap,$1,$2)\
187187
&& ./chwrap/make-tarball.sh $(call binary_path,chwrap,$1) $(call binary_path,chwrap.tar,$1)\
188188
&& rm -f $(call binary_path,chwrap,$1)
189189

190+
# node_prep_build is the go build command that compiles the node_prep binary from the source ./cmd/node_prep for
191+
# the named platform
192+
# usage: $(call node_prep_build,$(platform),$(linker_flags))
193+
node_prep_build = $(call go_build,node_prep,./cmd/node_prep, $1, $2)
194+
190195
# binaries_for_platform returns a script to build all binaries required for platform. The binaries are tridentctl,
191196
# trident_orchestrator, chwrap.tar, and trident_operator. chwrap.tar and trident_operator are only built for linux
192197
# plaforms.
@@ -195,7 +200,8 @@ binaries_for_platform = $(call go_build,tridentctl,./cli,$1,$2)\
195200
$(if $(findstring darwin,$1),,\
196201
&& $(call go_build,trident_orchestrator,.,$1,$2)\
197202
$(if $(findstring linux,$1),\
198-
&& $(call chwrap_build,$1,$2) ))
203+
&& $(call chwrap_build,$1,$2) \
204+
&& $(call node_prep_build,$1,$2) ))
199205

200206
# build_binaries_for_platforms returns a script to build all binaries for platforms. Attempts to add current directory
201207
# as a safe git directory, in case GO_SHELL uses a different user than the source repo.
@@ -231,6 +237,7 @@ docker_build_linux = $1 build \
231237
--build-arg ARCH=$(call arch,$2) \
232238
--build-arg BIN=$(call binary_path,trident_orchestrator,$2) \
233239
--build-arg CLI_BIN=$(call binary_path,tridentctl,$2) \
240+
--build-arg NODE_PREP_BIN=$(call binary_path,node_prep,$2) \
234241
--build-arg CHWRAP_BIN=$(call binary_path,chwrap.tar,$2) \
235242
--tag $3 \
236243
--rm \

cmd/node_prep/main.go

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2024 NetApp, Inc. All Rights Reserved.
2+
3+
package main
4+
5+
func main() {
6+
println("Executing trident node prep")
7+
}

0 commit comments

Comments
 (0)