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

Use openshift base domain if ingress hostname is missing #2059

Closed
wants to merge 11 commits into from

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented Aug 25, 2023

Docker image: docker.io/pavolloffay/opentelemetry-operator:dev-756ef72-1693233303

Updates: #1967
Updates: #1969

Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay pavolloffay marked this pull request as ready for review August 28, 2023 14:46
@pavolloffay pavolloffay requested a review from a team August 28, 2023 14:46
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay
Copy link
Member Author

@frzifus @jaronoff97 could you please review?

@pavolloffay pavolloffay requested a review from frzifus August 28, 2023 15:26
if params.Instance.Spec.Ingress.Hostname == "" {
domain, err := openshift.GetOpenShiftBaseDomain(context.Background(), params.Client)
if err != nil {
params.Recorder.Event(&params.Instance, "Error", "Normal", "Failed to get basedomain for Route.")
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to return also an error in that case?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is a good question, if we error here the whole instance creation stops.

In the current implementation, the instance gets created, but the routes will fail, so I didn't change that.

Copy link
Member

Choose a reason for hiding this comment

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

hm.. I assume failing early is good. May I ask, whats your thoughts on that @jaronoff97 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

hm.. I assume failing early is good. May I ask, whats your thoughts on that @jaronoff97 ?

For other resources, we follow the same approach: the instance is created, the "extra" resource is not but we log an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants