Skip to content

Latest commit

 

History

History

enterprise-metrics

Grafana Enterprise Metrics Jsonnet library

Note: This library is in alpha and the structure of the library is subject to breaking changes.

A Jsonnet library that can be used to configure and deploy Grafana Enterprise Metrics to Kubernetes.

Getting started

Jsonnet bundler is used to manage Jsonnet dependencies. Dependencies will be installed into the /vendor directory. To install the library and its dependencies using Jsonnet bundler:

$ jb install github.com/grafana/jsonnet-libs/enterprise-metrics

k.libsonnet is a Jsonnet library for Kubernetes. Most other Jsonnet libraries for Kubernetes expect this file to exist in your JSONNET_PATH.

To install k.libsonnet for Kubernetes 1.18:

  1. Use jb to vendor the k8s-libsonnet Kubernetes library
$ jb install github.com/jsonnet-libs/k8s-libsonnet/1.18@main
  1. Ensure the lib directory exists
$ mkdir -p lib
  1. Import the k8s-libsonnet Kubernetes library by putting the following Jsonnet into a file called lib/k.libsonnet
(import 'github.com/jsonnet-libs/k8s-libsonnet/1.18/main.libsonnet')

Development

In order to reflect changes made to the library also in the documentation (docs/README.md), one needs to run the docs target:

$ make docs

Unit tests

To run the unit tests:

$ make test

QA testing

To build all the manifests:

$ make eval

To deploy a minimal GEM to a local k3d cluster:

$ make local-test