Skip to content

Conversation

@btaani
Copy link
Member

@btaani btaani commented Mar 10, 2022

Description

The Logging link in the Application Shortcut (Red Hat Applications) should show an icon. This PR adds the icon image to the kibana console link.

Links

@openshift-ci openshift-ci bot requested review from alanconway and vimalk78 March 10, 2022 15:32
Comment on lines 84 to 89
loggingIcon, err := url.ParseRequestURI("https://github.com/openshift/elasticsearch-operator/blob/master/files/eo_icon.svg?raw=true")
if err != nil {
log.Error(err, "Invalid icon URL")
}

cl := console.NewConsoleLink(KibanaConsoleLinkName, kibanaURL, "Logging", loggingIcon.String(), "Observability")
Copy link
Contributor

Choose a reason for hiding this comment

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

This creates a direct dependency of looking up the icon content from Github on production clusters. This won't work as expected as per not all clusters have access to Github or allow network traffic to it. I suggest to make use of go embed features to load the content into the operator runtime. (See https://pkg.go.dev/embed)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I kind of expected this would be an issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

@periklis I updated the PR with another workaround which is using a data URI representation of the icon instead of a link.
However, if go embed is still preferred, we will have to put the icon file in the same path as the function calling it, which is internal/kibana/ instead of files/

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM and in sufficient for now. We don't need go embed here. It doesn't buy us much.

@periklis
Copy link
Contributor

/approve

@periklis
Copy link
Contributor

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: btaani, periklis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 14, 2022
@alanconway
Copy link
Contributor

/uncc @alanconway

@openshift-ci openshift-ci bot removed the request for review from alanconway March 14, 2022 15:44
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 14, 2022

@btaani: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@periklis
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2022
@openshift-merge-robot openshift-merge-robot merged commit 4f439e1 into openshift:master Mar 14, 2022
@periklis
Copy link
Contributor

/cherry-pick release-5.4

@openshift-cherrypick-robot

@periklis: new pull request created: #861

In response to this:

/cherry-pick release-5.4

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.

@btaani btaani deleted the consolelinkicon branch April 12, 2022 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants