Skip to content
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

Ensure oauth-proxy ImageStream is detected eventually #2340

Merged

Conversation

bverschueren
Copy link
Contributor

@bverschueren bverschueren commented Oct 10, 2023

Which problem is this PR solving?

Description of the changes

  • move the detectOAuthProxyImageStream function out of autoDetectCapabilities's firstRun.Do block
  • introduce a check to prevent needless api calls if openshift-oauth-proxy-image is already digest-based (assuming detection has occurred)

How was this change tested?

  • patch jaeger csv with generated operator image and verified if openshift-oauth-proxy-image is updated after initial run fails

Checklist

* move the detectOAuthProxyImageStream function out of
  `autoDetectCapabilities`'s `firstRun.Do` block

* introduce a check to prevent needless api calls if
  `openshift-oauth-proxy-image` is already digest-based (assuming
  detection has occured)

Signed-off-by: Bram Verschueren <verschueren.bram@gmail.com>
@openshift-ci
Copy link

openshift-ci bot commented Oct 10, 2023

Hi @bverschueren. Thanks for your PR.

I'm waiting for a jaegertracing member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -222,7 +222,7 @@ func (b *Background) detectOAuthProxyImageStream(ctx context.Context) {
ctx, span := tracer.Start(ctx, "detectOAuthProxyImageStream")
defer span.End()

if OperatorConfiguration.GetPlatform() == OpenShiftPlatform {
if OperatorConfiguration.GetPlatform() != OpenShiftPlatform {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

pkg/autodetect/main.go Show resolved Hide resolved
@@ -240,13 +240,27 @@ func (b *Background) detectOAuthProxyImageStream(ctx context.Context) {
return
}

// if the image is already digest-based no need to get the reference from an ImageStream
currImage := viper.GetString("openshift-oauth-proxy-image")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change!

Signed-off-by: Bram Verschueren <verschueren.bram@gmail.com>
@iblancasa
Copy link
Collaborator

/retest

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Files Coverage Δ
apis/v1/jaeger_types.go 87.50% <ø> (ø)
pkg/inject/oauth_proxy.go 100.00% <100.00%> (ø)
pkg/autodetect/operatorconfig.go 79.46% <0.00%> (-6.95%) ⬇️
pkg/autodetect/main.go 78.40% <14.28%> (-3.09%) ⬇️

📢 Thoughts on this report? Let us know!.

@bverschueren
Copy link
Contributor Author

/test jaeger-e2e-tests

@IshwarKanse
Copy link
Contributor

/retest

@iblancasa iblancasa merged commit 71d084d into jaegertracing:main Oct 16, 2023
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: [OpenShift] oauth-proxy ImageStream not detect after operator startup
3 participants