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

✨ Added support to run loki queries against openshift loki installation ✨ #15

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

seepgoel
Copy link
Contributor

Summary

The existing Loki query script works on the Kind deployment which uses dev version of Loki. However, Loki production deployment on openshift needed some changes to the script to work, such as:

  1. Openshift version needs TLS cert and key.
  2. Some of the labels such as pod, nodename etc, are different in openshift. For pod we have kubernetes_pod_name, for container we have kubernetes_container_name.
  3. Openshift Loki version uses X-Scope-OrgID header to be set to either application, infrastructure or audit.

Related issue(s)

Fixes #
This PR adds a new variable LOKI_INSTALL_TYPE which can be either openshift or dev. And based on LOKI_INSTALL_TYPE constructs a proper request to be sent to loki.
Please note the following instructions:

  1. When LOKI_INSTALL_TYPE is openshift, LOG_TYPE should be one of these three: application, infrastructure or audit.
  2. When LOKI_INSTALL_TYPE is openshift, it is compulsory to specify TLS_CERT_FILE and TLS_KEY_FILE.
  3. You can get the TLS_CERT_FILE and TLS_KEY_FILE from the secret logging-loki-querier-http in the openshift-logging namespace on the openshift cluster where the loki instance has been installed.

Copy link
Collaborator

@pdettori pdettori left a comment

Choose a reason for hiding this comment

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

/lgtm

@pdettori pdettori merged commit 3551593 into kubestellar:main Jun 26, 2024
5 of 6 checks passed
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.

2 participants