Modify Makefile to install operator-sdk v0.12.0 if not installed#349
Modify Makefile to install operator-sdk v0.12.0 if not installed#349jan-est wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jan-est The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
2d488af to
a726e8c
Compare
8ae61ff to
a4c46e8
Compare
| curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${REQUIRED_OPERATOR_SDK_VERSION}/operator-sdk-${REQUIRED_OPERATOR_SDK_VERSION}-x86_64-linux-gnu | ||
| chmod +x operator-sdk-${REQUIRED_OPERATOR_SDK_VERSION}-x86_64-linux-gnu | ||
| sudo mkdir -p /usr/local/bin/ | ||
| sudo cp operator-sdk-${REQUIRED_OPERATOR_SDK_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk |
There was a problem hiding this comment.
Is it necessary to use sudo here? You could just install in ${HOME}/bin/. Personally I installed the sdk using go get so it's in ~/go/bin/; that would be another way to do it (and is not specific to a particular operating system and CPU arch like downloading the tarball is, so it would work for e.g. Mac users as well).
There was a problem hiding this comment.
Yes, please use "go get" like we do for kustomize over in the cluster-api-provider repo https://github.com/metal3-io/cluster-api-provider-baremetal/blob/master/Makefile#L19
There was a problem hiding this comment.
I modified install.sh to install operator-sdk to ./bin folder
a4c46e8 to
86de7a4
Compare
|
@zaneb and @dhellmann sorry about my slow response with PR. I think this patch and right operator-sdk version should fix "make generate" problems issue mentioned in #360 |
| # If local operator-sdk version is not required version | ||
| # or operator-sdk is not installed, install operator-sdk v0.12.0 | ||
| if [ "${LOCAL_OPERATOR_SDK_VERSION}" != "${REQUIRED_OPERATOR_SDK_VERSION}" ] || [ -z "${LOCAL_OPERATOR_SDK_VERSION}" ]; then | ||
| mkdir -p ./bin |
There was a problem hiding this comment.
Should we create .bin folder here? With this command, the new folder will be added into git status command after that.
How about $GOPATH/bin folder?
|
Is it necessary to require 0.12? This requires golang 1.13, which was only released 3 months ago and isn't in plenty of relatively recent distros (e.g. Fedora 30, Ubuntu 19.10). |
|
@zaneb you might be right that operator-sdk version might not be the problem. It is better not to require golang 1.13 at this point. If anyone is not facing any problems with current operator-sdk we can drop this PR. |
|
I mean, I'm definitely having problems (I used |
…roff-fix OCPBUGS-33048: PreprovisioningImage should not be created on poweroff
Adds install.sh script for operator-sdk installation to hack folder