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:
Openshift version needs TLS cert and key.
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.
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.
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.