-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix multi arch nightly build #369
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,12 +156,23 @@ tasks: | |
silent: true | ||
- 'echo "~~~ :docker: Build & Push operator container"' | ||
- docker buildx build | ||
--platform linux/arm64,linux/amd64 | ||
--provenance false --sbom false --platform linux/amd64 | ||
--file operator/Dockerfile | ||
--target manager | ||
--tag docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}} | ||
--tag docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}}-amd64 | ||
--push | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not an expert in docker hub nor container registry, but if you are pushing manifest you are not uploading/sending/providing actual container layers. Sole manifest is useless without actual image, with its layers, in container registry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like the docs imply that the listed images will be automatically resolved to their sha256 and pushed. I'm in favor of removing the
I wonder if the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It actually seems likely we could get this to work though I'm not sure if it's entirely worth the effort. It would just be awesome to bundle the chart into the image. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can test it, but my intuition tells me manifest (metadata) would not work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't work. I'm reverting. As I said and you can see in the article https://containers.gitbook.io/build-containers-the-hard-way#manifest manifest is just a reference or I would say a metadata. If manifest can not find particular manifest in the registry it will stop you from creating a manifest. |
||
./dist | ||
- docker buildx build | ||
--provenance false --sbom false --platform linux/arm64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reasoning for disabling provenance and sbom? Not strong feelings, just curious if it was necessary for something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I borrowed the steps from @birdayz script. For nightly I personally wouldn't care that much, but for official container image registry it would be wise to generate sbom and sign that image. Yet it is not our standard software delivery practise as far as I know. |
||
--file operator/Dockerfile | ||
--target manager | ||
--tag docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}}-arm64 | ||
--push | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: do we want to push the intermediate tags? Seems like it would be cleaner to just have the multi-arch image. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be cleaner, but I don't know how to perform such push without changes to the docker engine that runs in our buildkite runner. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't we just need to remove the |
||
./dist | ||
- docker manifest create docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may also be possible to make the original command work if we make a buildkit builder or change the default docker settings. Is there a reason to pick one option over the other here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main reason of this PR is to speed up the fix nightly release process. The JIRA issue was opened for 1 month with 0 progress. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even better the code that was already merged in this repo worked with multi architecture images, but it stopped when I pushed helm artifact. It might be related to the tag overlap which turns off ability to push and build multi arch images. Yet I'm able to over come that limitation with manifest which is weird for me. |
||
--amend docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}}-amd64 | ||
--amend docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}}-arm64 | ||
- docker manifest push docker.io/redpandadata/{{.OPERATOR_REPO}}:{{.TAG_NAME}} | ||
- cmd: docker logout | ||
preconditions: | ||
- test -n "$DOCKERHUB_USER" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem odd. I get that they were blocking this passing CI all of a sudden (wondering if we have something wrong with the tests/CI that is making them occasionally pass even without the change?), so I'm fine with adding these as a fix for now... that said, @birdayz is there a reason why these are marked with
required
? It looks like all of the corresponding struct fields are optional...redpanda-operator/operator/api/vectorized/v1alpha1/cluster_types.go
Lines 213 to 215 in 0312468
Any chance that could be changed to
omitempty
? No need to change to a pointer or anything, but I don't like the idea of hacking in an empty json map just for the sake of passing field validation.