Skip to content

Commit

Permalink
Add submariner-networkplugin-syncer stub
Browse files Browse the repository at this point in the history
This adds a simple image and binary for the submariner-networkplugin-syncer
which will be used to test the eventhandler controller which will be built
on next commits.

Co-Authored-by: Sridhar Gaddam <[email protected]>
Signed-off-by: Miguel Angel Ajo <[email protected]>
  • Loading branch information
2 people authored and tpantelis committed Oct 26, 2020
1 parent 00d3703 commit 3d71674
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ bin/submariner-route-agent: vendor/modules.txt $(shell find pkg/routeagent)
bin/submariner-globalnet: vendor/modules.txt $(shell find pkg/globalnet)
${SCRIPTS_DIR}/compile.sh $@ ./pkg/globalnet/main.go $(BUILD_ARGS)

build: bin/submariner-engine bin/submariner-route-agent bin/submariner-globalnet
bin/submariner-networkplugin-syncer: vendor/modules.txt $(shell find pkg/networkplugin-syncer)
${SCRIPTS_DIR}/compile.sh $@ ./pkg/networkplugin-syncer/main.go $(BUILD_ARGS)

build: bin/submariner-engine bin/submariner-route-agent bin/submariner-globalnet bin/submariner-networkplugin-syncer

ci: validate unit build images

images: build package/.image.submariner package/.image.submariner-route-agent package/.image.submariner-globalnet
images: build package/.image.submariner package/.image.submariner-route-agent package/.image.submariner-globalnet \
package/.image.submariner-networkplugin-syncer

images-submariner-libreswan-git: build package/Dockerfile.submariner-libreswan-git
$(SCRIPTS_DIR)/build_image.sh -i submariner-libreswan-git -f package/Dockerfile.submariner-libreswan-git
Expand Down
10 changes: 10 additions & 0 deletions package/Dockerfile.submariner-networkplugin-syncer
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal

WORKDIR /var/submariner

# install the networkpluginc-sync
COPY package/submariner-networkplugin-syncer.sh bin/submariner-networkplugin-syncer /usr/local/bin/

ENTRYPOINT ["/usr/local/bin/submariner-networkplugin-syncer.sh"]

USER ${USER_UID}
14 changes: 14 additions & 0 deletions package/submariner-networkplugin-syncer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e -x

trap "exit 1" SIGTERM SIGINT

SUBMARINER_VERBOSITY=${SUBMARINER_VERBOSITY:-2}

if [ "${SUBMARINER_DEBUG}" == "true" ]; then
DEBUG="-v=3"
else
DEBUG="-v=${SUBMARINER_VERBOSITY}"
fi

exec submariner-networkplugin-sync ${DEBUG} -alsologtostderr
4 changes: 4 additions & 0 deletions pkg/networkplugin-syncer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package main

func main() {
}

0 comments on commit 3d71674

Please sign in to comment.