-
Notifications
You must be signed in to change notification settings - Fork 24
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
ROX-22474: push Konflux images to quay.io/rhacs-eng #1674
Merged
tommartensen
merged 2 commits into
master
from
tm/ROX-22474-konflux-push-to-quay-io-rhacs-eng
May 21, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you please remind me, will
main
,roxctl
and operator images think it is a release build in the sense of this code block here https://github.com/stackrox/stackrox/blob/896452897dbc54bb60183782731dda95766e3a20/pkg/images/defaults/flavor.go#L103-L112?If yes, the repo is fine. If no,
-slim
should be part of the tag, not repo.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.
All three images have
GOTAGS=release
set, like https://github.com/stackrox/stackrox/blob/master/image/rhel/konflux.Dockerfile#L85.If I understand this correctly, https://github.com/stackrox/stackrox/blob/896452897dbc54bb60183782731dda95766e3a20/pkg/images/defaults/flavor.go#L107 is true.
version.GetAllVersionsUnified
would set the collector & scanner versions to the same asmain
(make tag
of stackrox/stackrox instead of{COLLECTOR, SCANNER}_VERSION
(https://github.com/stackrox/stackrox/blob/master/pkg/version/version.go#L72-L77)), BUT this is overriden in L109, L111, L128.https://github.com/stackrox/stackrox/blob/master/pkg/version/version.go#L72-L77
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.
TLDR: I think it's fine and the assumption that SCANNER_VERSION and COLLECTOR_VERSION tags will be generated should also hold.
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.
Overridden to what?
GetAllVersionsUnified
will returnMainVersion
there.With
GOTAGS=release
:quay.io/rhacs-eng/collector:<MainVersion>
quay.io/rhacs-eng/collector-slim:<MainVersion>
Without:
quay.io/rhacs-eng/collector:<CollectorVersion>-latest
quay.io/rhacs-eng/collector:<CollectorVersion>-slim
"
<CollectorVersion>
" is what we get by runningmake tag
instackrox/collector
repo."
<MainVersion>
" ismake tag
result instackrox/stackrox
, i.e. a retagged image. https://github.com/stackrox/stackrox/blob/7690ea6ed07fe68b85aac8810b32c9d7b640e8fb/.github/workflows/build.yaml#L400-L408We don't have a way to retag in Konflux unless we write a custom task which I at the moment doubt is the right choice.
-slim
and-latest
in suffix were introduced as a compatibility thing to not break old workflows. Maybe this is no longer necessary?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.
I think, the simplest for MVP^2 may be to switch the release off, push to
-latest
+-slim
, and plan sorting out release in GA scope.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.
IMO we can merge stackrox/stackrox#10824,(this can already be done without merging)We can deploy a Central cluster and see what it would generate for collector(-slim). It might just work.
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.
We should not add suffixes to
COLLECTOR_VERSION
orSCANNER_VERSION
because it can break builds outside of Konflux and/or product built outside of Konflux. We should look for other solution (overridingBUILD_TAG
was my first candidate) - https://issues.redhat.com/browse/ROX-19958Correct! And I think it proves my point, doesn't it?
I believe it executes for nightly builds and any other tagged builds.
There's a quicker way to check:
(I used some successful build on master)
Then, study
internal/defaults/50-images.yaml
in both dirs./tmp/chart-konflux/internal/defaults/50-images.yaml
has:/tmp/chart-gha/internal/defaults/50-images.yaml
: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.
Did you notice that
scanner.tag
is also the<MainVersion>
, not<ScannerVersion>
?I have to think about the other points..
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.
Right, that's the "unified versions" case of release builds, I expected it (we came up with this code in the Maple team while working on that image flavor stuff that occurred after onboarding all containers to CPaaS).
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.
From discussion in Weekly: