Simple Grafana instance, note we preconfigure it with Loki, Prometheus and grafana alveoli, ensure to override the configuration if you don’t use them.

Maven Dependency

<dependency>
  <groupId>io.yupiik.alveoli</groupId>
  <artifactId>grafana-simple</artifactId>
  <version>1.0.27-SNAPSHOT</version>
</dependency>

Default Configuration

grafana.ini
[analytics]
check_for_updates = false
[grafana_net]
url = https://grafana.net
[log]
mode = console
[paths]
data = /var/lib/grafana/data
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
provisioning = /etc/grafana/provisioning
loki.yml
apiVersion: 1
datasources:
  - name: Loki
    type: loki
    typeLogoUrl: public/app/plugins/datasource/loki/img/loki_icon.svg
    access: proxy
    url: http://loki:3100
zipkin.yml
apiVersion: 1
datasources:
 - name: Zipkin
   type: zipkin
   typeLogoUrl: public/app/plugins/datasource/zipkin/img/zipkin-logo.svg
   access: proxy
   url: http://zipkin:9411
prometheus.yml
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    typeLogoUrl: public/app/plugins/datasource/prometheus/img/prometheus_logo.svg
    access: proxy
    url: http://prometheus:9090

Ports

  • Name: grafana

    • Protocol: TCP

    • Port: 3000

    • Target Port: 3000

    • Node Port: 30300

Tip
on linux and with minikube you can access this service using http://$(minikube ip):30300 on your host.

Sample Usage

{
  "alveoli": [
    {
      "//": "My alveolus.",
      "name": "com.company:my-app:1.0.0",
      "descriptors": [],
      "dependencies": [
        {
          "name": "io.yupiik.alveoli:grafana-simple:1.0.27-SNAPSHOT",
          "location": "io.yupiik.alveoli:grafana-simple:1.0.27-SNAPSHOT",
        }
      ],
      "patches": [{
        "descriptorName": "io.yupiik.alveoli:grafana-simple:1.0.27-SNAPSHOT",
        "interpolate": true
      }]
    }
  ]
}

Configuration

grafana-simple.image

The image to use. Default value: grafana/grafana:9.0.6.

grafana-simple.namespace

The Kubernetes namespace to use for the installation. Default value: ``.

grafana-simple.resources.limits.cpu

The resource limits cpu for grafana. Default value: 0.1.

grafana-simple.resources.limits.memory

The resource limits memory for Grafana. Default value: 128Mi.

grafana-simple.resources.requests.cpu

The resource requests cpu for Grafana. Default value: 0.1.

grafana-simple.resources.requests.memory

The resource requests memory for Grafana. Default value: 128Mi.