java-operator-sdk icon indicating copy to clipboard operation
java-operator-sdk copied to clipboard

Makefile bundle-build incorrect path to bundle.Dockerfile

Open itroyano opened this issue 2 years ago • 10 comments

Bug Report

What did you do?

Run make bundle-build

What did you expect to see?

A bundle image created locally.

What did you see instead? Under which circumstances?

bundle.Dockerfile was not found

Environment

N/A

Possible Solution

Point at the correct file, located under target -

docker build -t $(BUNDLE_IMG) -f target/bundle/$(PACKAGE_NAME)/bundle.Dockerfile target/bundle/$(PACKAGE_NAME)

Add the following under src/main/resources/application.properties

quarkus.container-image.name=<package name>-controller
quarkus.operator-sdk.bundle.package-name=<package name>
quarkus.operator-sdk.bundle.channels=<channels>
quarkus.container-image.registry=<registry>
quarkus.container-image.group=<group or repo name>

Additional context

Sample Makefile - https://github.com/skattoju/simple-java-operator/blob/cleanup/Makefile#L91

itroyano avatar May 02 '23 06:05 itroyano

cc: @skattoju

itroyano avatar May 02 '23 06:05 itroyano

Hi @itroyano , thx we will take a look on it.

@metacosm this seems to me more like a QOSDK issue, maybe consider move it under that repo.

csviri avatar May 02 '23 08:05 csviri

This is actually a multiple combination issue :) The core issue is in fact in the operator-sdk plugin and this is actually something I've been working on lately to clean this up. I also need to adapt the container building instructions with respect to changes in Quarkus 3 as well.

metacosm avatar May 03 '23 07:05 metacosm

Hi @metacosm thanks for taking a look at this! There's a couple of gaps and I've only raised a single issue. If you look at https://github.com/opdev/simple-java-operator/commit/905a6eaa1799218bbaaef5e5e15075fdf3c3b1c2 That's the diff vs. what has been generated by operator-sdk originally. Many of these are optional / QoL stuff we added to our sample operator, but some are actually mandatory to get an image build working, and the docker-build & bundle-build make targets doesn't do anything without them -

  1. pom xml changes.
  2. dockerfile.jvm (was not generated by sdk).
  3. the bundle build mentioned in this issue.

In addition I've been trying - so far unsuccessfully - to get podman working instead of docker. looks like only native profile supports passing a flag for an image build engine.... but then I get an out of memory 137 in the build (on a Mac). the initial attempt can be seen here https://github.com/opdev/simple-java-operator/commit/800ed75ac928e3fdbd789f656f1ba9f91fbd7654#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52

itroyano avatar May 03 '23 08:05 itroyano

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jul 03 '23 02:07 github-actions[bot]

/remove-lifecycle stale

itroyano avatar Jul 03 '23 13:07 itroyano

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Sep 03 '23 01:09 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Nov 05 '23 01:11 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jan 06 '24 01:01 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Mar 10 '24 01:03 github-actions[bot]