grafoo

module
v0.1.0-alpha.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2024 License: Apache-2.0

README

alt text

Grafana for OpenShift Observability - Configure Grafana for use in OpenShift!

grafoo deploys Grafana in OpenShift and manages datasources that connects to the in-cluster monitoring and loki logging stack (and in the future to the Multi-Cluster Observability in ACM).

Requirements

grafoo requires that the grafana-operator (v5) is installed in the cluster. It also requires Cert-Managerto be available in the cluster.

Deploying

grafoo is available in a custom operator catalog (TBA).

It may also be deployed by cloning this repo, creating a grafoo-system project and then make deploy IMG=quay.io/cldmnky/grafoo:latest.

To deploy a grafoo managed grafana after the prerequisites and the grafoooperator has been deployed, simply apply a CRD that looks like:

apiVersion: grafoo.cloudmonkey.org/v1alpha1
kind: Grafana
metadata:
  labels:
    app.kubernetes.io/name: grafana
    app.kubernetes.io/instance: grafana-sample
    app.kubernetes.io/part-of: grafoo
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/created-by: grafoo
  name: grafana-sample
spec: {}

grafoo will apply a number of defaults to the CR, these may be changed or applied initially:

apiVersion: grafoo.cloudmonkey.org/v1alpha1
kind: Grafana
metadata:
  name: grafana
  namespace: grafoo-system
spec:
  datasources:
  - enabled: true
    name: Prometheus
    type: prometheus-incluster
    url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091
  - enabled: true
    name: Loki (Application)
    type: loki-incluster
    url: https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/application/
  - enabled: true
    name: Loki (Infrastructure)
    type: loki-incluster
    url: https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/infrastructure/
  - enabled: true
    name: Loki (Audit)
    type: loki-incluster
    url: https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/audit/
  dex:
    enabled: true
    image: docker.io/dexidp/dex:v2.39.1-distroless
  replicas: 1
  version: 9.5.17

This will result in a Grafana with datasources setup for the in-cluster monitoring and logging, using service account tokens managed by the operator. Authentication is handled by a Dex IDP instance. Every user that is cluster-adminwill have admin access in the grafana instance, all other users will be assigned an Editor role.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the grafoo v1alpha1 API group +kubebuilder:object:generate=true +groupName=grafoo.cloudmonkey.org
Package v1alpha1 contains API Schema definitions for the grafoo v1alpha1 API group +kubebuilder:object:generate=true +groupName=grafoo.cloudmonkey.org
cmd
internal
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL