-
Notifications
You must be signed in to change notification settings - Fork 174
ROX-9249: Allow override Central DB image #1030
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a19039b
ROX-9249: Allow override Central DB image
c-du d7cc79c
fix
c-du 89cc1e0
Fix unit test
c-du e65e8e6
comment
c-du 66215d2
Merge branch 'master' into cong/image-sel
c-du b65a5c2
todo
c-du 269e9df
Add bats tests
c-du 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,9 +67,11 @@ type ImagePullSecrets struct { | |
| // ImageFlavor represents default settings for pulling images. | ||
| type ImageFlavor struct { | ||
| // MainRegistry is a registry for all images except of collector. | ||
| MainRegistry string | ||
| MainImageName string | ||
| MainImageTag string | ||
| MainRegistry string | ||
| MainImageName string | ||
| MainImageTag string | ||
| CentralDBImageTag string | ||
| CentralDBImageName string | ||
|
|
||
| // CollectorRegistry may be different from MainRegistry in case of stackrox.io. | ||
| CollectorRegistry string | ||
|
|
@@ -95,9 +97,11 @@ type ImageFlavor struct { | |
| func DevelopmentBuildImageFlavor() ImageFlavor { | ||
| v := version.GetAllVersionsDevelopment() | ||
| return ImageFlavor{ | ||
| MainRegistry: "docker.io/stackrox", | ||
| MainImageName: "main", | ||
| MainImageTag: v.MainVersion, | ||
| MainRegistry: "docker.io/stackrox", | ||
| MainImageName: "main", | ||
| MainImageTag: v.MainVersion, | ||
| CentralDBImageTag: v.MainVersion, | ||
| CentralDBImageName: "central-db", | ||
|
|
||
| CollectorRegistry: "docker.io/stackrox", | ||
| CollectorImageName: "collector", | ||
|
|
@@ -125,9 +129,11 @@ func DevelopmentBuildImageFlavor() ImageFlavor { | |
| func StackRoxIOReleaseImageFlavor() ImageFlavor { | ||
| v := version.GetAllVersionsUnified() | ||
| return ImageFlavor{ | ||
| MainRegistry: "stackrox.io", | ||
| MainImageName: "main", | ||
| MainImageTag: v.MainVersion, | ||
| MainRegistry: "stackrox.io", | ||
| MainImageName: "main", | ||
| MainImageTag: v.MainVersion, | ||
| CentralDBImageTag: v.MainVersion, | ||
| CentralDBImageName: "central-db", | ||
|
|
||
| CollectorRegistry: "collector.stackrox.io", | ||
| CollectorImageName: "collector", | ||
|
|
@@ -155,9 +161,13 @@ func StackRoxIOReleaseImageFlavor() ImageFlavor { | |
| func RHACSReleaseImageFlavor() ImageFlavor { | ||
| v := version.GetAllVersionsUnified() | ||
| return ImageFlavor{ | ||
| MainRegistry: "registry.redhat.io/advanced-cluster-security", | ||
| MainImageName: "rhacs-main-rhel8", | ||
| MainImageTag: v.MainVersion, | ||
| MainRegistry: "registry.redhat.io/advanced-cluster-security", | ||
| MainImageName: "rhacs-main-rhel8", | ||
| MainImageTag: v.MainVersion, | ||
| /* TODO(ROX-9858): Create repo rhacs-central-db-rhel8 when starting building rhacs */ | ||
| CentralDBImageTag: v.MainVersion, | ||
| CentralDBImageName: "rhacs-central-db-rhel8", | ||
|
Contributor
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. Just keep in mind that this image has to be built downstream (CPaaS). I assume this was not done yet.
Contributor
Author
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. Yes, I will put a TODO tag with jira blocker. |
||
|
|
||
fredrb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| CollectorRegistry: "registry.redhat.io/advanced-cluster-security", | ||
| CollectorImageName: "rhacs-collector-rhel8", | ||
| CollectorImageTag: v.CollectorVersion, | ||
|
|
@@ -264,6 +274,11 @@ func (f *ImageFlavor) MainImageNoTag() string { | |
| return fmt.Sprintf("%s/%s", f.MainRegistry, f.MainImageName) | ||
| } | ||
|
|
||
| // CentralDBImage is the container image reference (full name) for the central-db image. | ||
| func (f *ImageFlavor) CentralDBImage() string { | ||
| return fmt.Sprintf("%s/%s:%s", f.MainRegistry, f.CentralDBImageName, f.CentralDBImageTag) | ||
| } | ||
|
|
||
| // CollectorFullImage is the container image reference (full name) for the "collector" image | ||
| func (f *ImageFlavor) CollectorFullImage() string { | ||
| return fmt.Sprintf("%s/%s:%s", f.CollectorRegistry, f.CollectorImageName, f.CollectorImageTag) | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Shouldn't we wrap this with a meta template feature flag check? At least until the image is available downstream. If this is released prior to
rhacs-central-db-rhel8being available, the init container will crash when onrhacsflavor.The meta template would look something like this:
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.
Is it possible to release upstream only? We use enableCentralDB flag, which will block this template file entirely. See line #2.
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.
Oh ok. That makes sense. I missed the conditional check on line 2.
I'm not sure if it is. Technically the downstream release (
registry.redhat.io) is our official release. I think it should be fine as long as:enableCentralDBis not enabled (which is covered by line 2).rhacs-central-db-rhel8image downstream once this needs to be released (covered by the task you created ROX-9858).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.
If possible, please update the JIRA description with a pointer to this PR and mention that the image that needs to be written is for
rhacs-central-db-rhel8.