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
quick fix for https://issues.redhat.com/browse/RHIDP-1701 #273
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Quality Gate passedIssues Measures |
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.
Also, I think a test case will be helpful to catch potential regressions on this. Maybe I've missed it, but I'm not sure this is captured with the existing tests.
|
||
}) | ||
for _, c := range deployment.Spec.Template.Spec.Containers { | ||
if c.Name == _defaultBackstageMainContainerName { |
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'd suggest replacing based on a placeholder instead. Otherwise, if user changes the config to use their own images for the main and/or init containers, they will still be replaced here; so same issue.
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.
Please note that we have the same issue with the DB StatefulSet as well.
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.
Not sure I understand about placeholder. Could you please elaborate?
For the database: Do you see any option for extension it's deployment in the Helm Chart?
(I just would keep this fix as simple as possible)
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.
Not sure I understand about placeholder. Could you please elaborate?
I mean, use by default a placeholder like <RELATED_IMAGE_backstage>
in the default deployment.yaml manifest, and perform replacements only for places where this placeholder is used explicitly. This way, it is clear that only these placeholders will be replaced, regardless of the container names.
I remember I saw something like this in a PR (83c7187
(#86)), but it was changed at some point later 😕
For the database: Do you see any option for extension it's deployment in the Helm Chart?
(I just would keep this fix as simple as possible)
Maybe not extend it with an extra-container (or why not actually?), but I was thinking of just trying to use a different DB image for example (which is possible in the Helm Chart). Right now, this is not configurable in the CR, so the only way to do this would be via the rawRuntimeConfig
, but the image would end up being replaced.
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.
Not sure I understand about placeholder. Could you please elaborate?
I mean, use by default a placeholder like
<RELATED_IMAGE_backstage>
in the default deployment.yaml manifest, and perform replacements only for places where this placeholder is used explicitly. This way, it is clear that only these placeholders will be replaced, regardless of the container names. I remember I saw something like this in a PR (83c7187
(#86)), but it was changed at some point later 😕
And here for the logic: https://github.com/janus-idp/operator/pull/86/files#diff-8e7e7c9a64394f1ee039417ef32b84b7122580096d39f293a8d976bd2af27f45R308-R314
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.
Hmm, if you use <RELATED_IMAGE_backstage> in deployment.yaml, what would be the value if I do not put env variable?
I remember I saw something like this in a PR (83c7187 (#86)), but it was changed at some point later
I guess, the changes you mentioned caused by the fact that in this case we have to use somehow hardcoded value which is not good.
Maybe not extend it with an extra-container (or why not actually?), but I was thinking of just trying to use a different DB image for example (which is possible in the Helm Chart). Right now, this is not configurable in the CR, so the only way to do this would be via the rawRuntimeConfig, but the image would end up being replaced.
OK, Let's move this discussion to the issue?
My point here is to fix concrete problem and so far I can not see it changed anything else but fix it :) . WDYT?
Close this and create bug fixes PR for 1.1.x branch. |
Description
quick fix for https://issues.redhat.com/browse/RHIDP-1701
PR acceptance criteria
How to test changes / Special notes to the reviewer
make test