Skip to content

Commit

Permalink
Build operator-sdk from forked source
Browse files Browse the repository at this point in the history
Released operator-sdk binary does not support running bundle image from
local insecure registry. The fix has submitted to upstream:

operator-framework/operator-sdk#4816

Till this fix is available in release binary we have to build from
source.
  • Loading branch information
avalluri committed May 9, 2021
1 parent 6cc0d1c commit 6822551
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion operator/operator.make
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ OPERATOR_SDK_VERSION=1.6.1
# download operator-sdk binary
_work/bin/operator-sdk-$(OPERATOR_SDK_VERSION):
mkdir -p _work/bin/ 2> /dev/null
curl -L https://github.com/operator-framework/operator-sdk/releases/download/v$(OPERATOR_SDK_VERSION)/operator-sdk_linux_amd64 -o $(abspath $@)
# Building operator-sdk from sources as that needs fixes for:
# https://github.com/operator-framework/operator-sdk/pull/4816
tmpdir=`mktemp -d` && \
trap 'set -x; rm -rf $$tmpdir' EXIT && \
git clone --branch $(OPERATOR_SDK_VERSION)+fixes https://github.com/avalluri/operator-sdk.git $$tmpdir && \
cd $$tmpdir && $(MAKE) build/operator-sdk && \
cp $$tmpdir/build/operator-sdk $(abspath $@) && \
chmod a+x $(abspath $@)
cd $(dir $@); ln -sf operator-sdk-$(OPERATOR_SDK_VERSION) operator-sdk

Expand Down

0 comments on commit 6822551

Please sign in to comment.