-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add controller-gen and kustomize to the SDK base image #4000
Comments
We should probably include the |
it looks like the PR for this was merged. should this issue be closed? PR ref: #3902 |
@aemperador this PR does not include all the tools |
ok @SteveMattar thanks for the update. I can take this on |
I've created a PR for adding kustomize first as a base image that includes the operator-sdk and kustomize: #4130 controller-gen is not included in this one |
@aemperador Thanks for your work! Is there any reason why |
Packaging all binaries into one image is complicated by multiple plugins and versions. From #4428: [There are t]hree ways to tackle this:
I personally prefer (3) because it scales the best, produces the smallest images, and is plugin-agnostic. The major problem with the first two is that the kustomize version (and controller-gen's for Go operators) is dependent on plugin version (and type, even though a divergence hasn't happened yet), while a given operator-sdk version supports multiple plugins. We'd have to maintain a build matrix of Example Dockerfile for kustomize: # images/kustomize/Dockerfile
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3-227
ARG VERSION
ARG ARCH
RUN curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${VERSION}/kustomize_${VERSION}_linux_${ARCH}.tar.gz | \
tar xzf - -C /
ENTRYPOINT ["/kustomize"] Build with: export KUSTOMIZE_VERSION=v3.5.4
docker build \
-f images/kustomize/Dockerfile \
-t quay.io/operator-framework/kustomize:$KUSTOMIZE_VERSION \
--build-arg VERSION=$KUSTOMIZE_VERSION \
--build-arg ARCH=$(go env GOARCH) \
images/kustomize |
Moving this to the backlog to await further discussion, as no one has responded to ^. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/close |
@SteveMattar: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Feature Request
Describe the problem you need a feature to resolve.
My project is using the new Kubebuilder-style layout
I need a base image containing the following tools in order to build my operator bundle
controller-gen
kustomize
operator-sdk
v1+envtest
Describe the solution you'd like.
Include
controller-gen
andkustomize
to your SDK base imageThe original PR is #3902
/language go
The text was updated successfully, but these errors were encountered: