Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helm-chart to create cronjob and html report #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions helm-chart/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
23 changes: 23 additions & 0 deletions helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v2
name: popeye
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0
11 changes: 11 additions & 0 deletions helm-chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Now you can use this helm-char to run a cronjob with possibility feed prometheus with an pushgateway, serve http/s page of popeye's report.

```
git clone [email protected]:derailed/popeye.git
cd popeye/helm-chart
helm install popeye -n popeye --create-namespace .
```

You can set a many values on values.yaml or pass using --set parameter:value, like a helm.

If you have any questios or sugestions please can contact me [email protected]
311 changes: 311 additions & 0 deletions helm-chart/grafana/alerts-from-popeye.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,311 @@
{
Copy link

@kaidobit kaidobit Nov 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grafana alerting config is not needed in this Helm Chart.

"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.5.5"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "report generated by popeye",
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1621092285922,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": true,
"title": "Popeye Report",
"tooltip": "",
"type": "link",
"url": "http://popeye.domain.com"
}
],
"panels": [
{
"datasource": null,
"description": "Saúde dos $resource do Cluster",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Warning"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "yellow",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Info"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 13,
"x": 0,
"y": 0
},
"id": 26,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "7.5.5",
"targets": [
{
"exemplar": true,
"expr": "sum(popeye_sanitizer_reports_count{resource=\"$resource\",level=\"ok\"}) by (level)",
"format": "time_series",
"instant": false,
"interval": "",
"legendFormat": "OK",
"refId": "OK"
},
{
"exemplar": true,
"expr": "sum(popeye_sanitizer_reports_count{resource=\"$resource\",level=\"warn\"}) by(level)",
"hide": false,
"instant": false,
"interval": "",
"legendFormat": "Warning",
"refId": "Warning"
},
{
"exemplar": true,
"expr": "sum(popeye_sanitizer_reports_count{resource=\"$resource\",level=\"error\"}) by(level)",
"hide": false,
"instant": false,
"interval": "",
"legendFormat": "Errors",
"refId": "Errors"
},
{
"exemplar": true,
"expr": "sum(popeye_sanitizer_reports_count{resource=\"$resource\",level=\"info\"}) by(level)",
"hide": false,
"interval": "",
"legendFormat": "Info",
"refId": "Info"
}
],
"timeFrom": null,
"timeShift": null,
"title": "$resource",
"type": "gauge"
},
{
"datasource": null,
"description": "Nota do Cluster",
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-RdYlGr"
},
"displayName": "Score",
"mappings": [],
"max": 100,
"min": 10,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "green",
"value": 95
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 13,
"y": 0
},
"id": 12,
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "7.5.5",
"targets": [
{
"exemplar": true,
"expr": "popeye_cluster_score_total",
"format": "time_series",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Cluster Score Summary",
"type": "gauge"
}
],
"refresh": "5s",
"schemaVersion": 27,
"style": "dark",
"tags": [
"popeye",
"monitoring"
],
"templating": {
"list": [
{
"allValue": null,
"current": {},
"datasource": "${DS_PROMETHEUS}",
"definition": "label_values(popeye_sanitizer_reports_count, resource)",
"description": null,
"error": null,
"hide": 0,
"includeAll": false,
"label": "resource",
"multi": false,
"name": "resource",
"options": [],
"query": {
"query": "label_values(popeye_sanitizer_reports_count, resource)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-5m",
"to": "now"
},
"timepicker": {},
"timezone": "utc",
"title": "Alerts from Popeye",
"uid": "srljAVCGk",
"version": 2
}
Loading