✨ Added support to run loki queries against openshift loki installation ✨ #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
kubernetes_pod_name
, for container we havekubernetes_container_name
.X-Scope-OrgID
header to be set to eitherapplication
,infrastructure
oraudit
.Related issue(s)
Fixes #
This PR adds a new variable
LOKI_INSTALL_TYPE
which can be eitheropenshift
ordev
. And based onLOKI_INSTALL_TYPE
constructs a proper request to be sent to loki.Please note the following instructions:
openshift
, LOG_TYPE should be one of these three: application, infrastructure or audit.openshift
, it is compulsory to specify TLS_CERT_FILE and TLS_KEY_FILE.logging-loki-querier-http
in theopenshift-logging
namespace on the openshift cluster where the loki instance has been installed.