Skip to content

Build go binary without container image #2568

@nalbury-handy

Description

@nalbury-handy

Type of question

Are you asking about community best practices, how to implement a specific feature, or about general context and help around the operator-sdk?

Implementation Question

Question

What did you do?
Ran operator-sdk build --help

What did you expect to see?
A way to build just the go binary

What did you see instead? Under which circumstances?
Only ways to build the binary and then build a container image with that binary

Environment

  • operator-sdk version:
operator-sdk version: "v0.15.1", commit: "e35ec7b722ba095e6438f63fafb9e7326870b486", go version: "go1.13.6 darwin/amd64"
  • Kubernetes version information:

    insert output of kubectl version here

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:02:58Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes cluster kind:

Additional context
We have recently removed Docker from our clusters, and are using our own buildkit implementation. This unfortunately means that non of the operator-sdk's build options will work for us. I see this issue, a closed MR to skip image builds via a command line flag, and an issue with lifecycle/frozen about using a Makefile to allow this to be more customizable, all of which leads me believe this isn't a feature that's coming soon.

Is there an easy place to see in the src and/or docs how I can mimic the go build cmd/flags being used by operator-sdk build? Happy to build it ourselves, but would love to avoid using trial and error to get it right.

Thanks!
Love the SDK overall, just trying to deploy our first operator :-)

Metadata

Metadata

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions