Skip to content

Latest commit

 

History

History

kube-prometheus

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

kube-prometheus

The kube-prometheus project provides a set of Kubernetes manifests, Grafana dashboards, and Prometheus rules to deploy a full monitoring stack for Kubernetes. It includes Prometheus, Alertmanager, and Grafana, along with various exporters and dashboards to monitor the health and performance of a Kubernetes cluster.

Makefile Overview

This project's design is to pull and manage the kube-prometheus YAML configurations using jsonnet from the upstream project. The Makefile provided in this project helps automate tasks such as initializing dependencies, generating manifests, cleaning up, and ensure required tools are present.

Prerequisites

Before using the Makefile, ensure you have the following tools installed:

  • jb (jsonnet Bundler)
  • jsonnet
  • gojsontoyaml

Makefile Targets

The Makefile includes targets to help manage the project:

all

Runs the check-tools, clean, and manifests targets in sequence. This is the default target.

init

Initializes the jsonnet vendor packages by running jb init and installs the kube-prometheus jsonnet library.

manifests

Generates the kube-prometheus YAML files from the specified settings.jsonnet file. It converts the jsonnet output to YAML and places the files in the base directory. Removal of non-YAML files in the base directory, and the kustomization file.

clean

Removes the base directory and its contents.

upgrade

Updates the kube-prometheus jsonnet library to the latest version.

check-tools

Checks if the installation of required tools (jb, jsonnet, and gojsontoyaml). If any of the tools are missing, the target will abort with an error message.

help

Displays a help message with a brief description of each target.

Usage

To use the Makefile, run the following commands in your terminal:

  1. Initialize the project:

    make init
  2. Generate the manifests:

    make manifests
  3. Clean up the generated files:

    make clean
  4. Upgrade the kube-prometheus library:

    make upgrade
  5. Check if required tools are installed:

    make check-tools
  6. Display the help message:

    make help

By following these steps, you can manage the kube-prometheus YAML configurations efficiently using the provided Makefile.