Compare commits

..

1 Commits

Author SHA1 Message Date
Andrei Kvapil
2ff1822e78 Update screenshots 2024-08-12 20:55:08 +02:00
695 changed files with 68187 additions and 127228 deletions

View File

@@ -1,35 +0,0 @@
name: Pre-Commit Checks
on: [push, pull_request]
jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hooks
run: |
git fetch origin main || git fetch origin master
base_commit=$(git rev-parse --verify origin/main || git rev-parse --verify origin/master || echo "")
if [ -z "$base_commit" ]; then
files=$(git ls-files '*.yaml' '*.md')
else
files=$(git diff --name-only "$base_commit" -- '*.yaml' '*.md')
fi
if [ -n "$files" ]; then
echo "$files" | xargs pre-commit run --files
else
echo "No YAML or Markdown files to lint"
fi

77
.gitignore vendored
View File

@@ -1,78 +1,3 @@
_out _out
.git .git
.idea .idea
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
.DS_Store
**/.DS_Store

View File

@@ -1,25 +0,0 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- id: check-yaml
exclude: .*/init-script\.yaml$
args: [--unsafe]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args: [--fix, --disable, MD013, MD041, --]
- repo: local
hooks:
- id: gen-versions-map
name: Generate versions map and check for changes
entry: bash -c 'cd packages/apps && make check-version-map'
language: system
types: [file]
pass_filenames: false
description: Run the script and fail if it generates changes

View File

@@ -2,16 +2,11 @@
build: build:
make -C packages/apps/http-cache image make -C packages/apps/http-cache image
make -C packages/apps/postgres image
make -C packages/apps/mysql image
make -C packages/apps/clickhouse image
make -C packages/apps/kubernetes image make -C packages/apps/kubernetes image
make -C packages/system/cilium image make -C packages/system/cilium image
make -C packages/system/kubeovn image make -C packages/system/kubeovn image
make -C packages/system/dashboard image make -C packages/system/dashboard image
make -C packages/system/kamaji image make -C packages/system/kamaji image
make -C packages/system/bucket image
make -C packages/core/testing image
make -C packages/core/installer image make -C packages/core/installer image
make manifests make manifests
@@ -31,8 +26,3 @@ repos:
assets: assets:
make -C packages/core/installer/ assets make -C packages/core/installer/ assets
test:
make -C packages/core/testing apply
make -C packages/core/testing test
make -C packages/core/testing delete

View File

@@ -29,7 +29,8 @@ You can use Cozystack as Kubernetes distribution for Bare Metal
## Screenshot ## Screenshot
![Cozystack screenshot](https://cozystack.io/img/screenshot.png) ![Cozystack screenshot](https://cozystack.io/img/screenshot.png#gh-light-mode-only)
![Cozystack screenshot](https://cozystack.io/img/screenshot-dark.png#gh-dark-mode-only)
## Documentation ## Documentation
@@ -58,8 +59,6 @@ Commits are used to generate the changelog, and their author will be referenced
In case of **Feature Requests** please use the [Discussion's Feature Request section](https://github.com/aenix-io/cozystack/discussions/categories/feature-requests). In case of **Feature Requests** please use the [Discussion's Feature Request section](https://github.com/aenix-io/cozystack/discussions/categories/feature-requests).
You can join our weekly community meetings (just add this events to your [Google Calendar](https://calendar.google.com/calendar?cid=ZTQzZDIxZTVjOWI0NWE5NWYyOGM1ZDY0OWMyY2IxZTFmNDMzZTJlNjUzYjU2ZGJiZGE3NGNhMzA2ZjBkMGY2OEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t) or [iCal](https://calendar.google.com/calendar/ical/e43d21e5c9b45a95f28c5d649c2cb1e1f433e2e653b56dbbda74ca306f0d0f68%40group.calendar.google.com/public/basic.ics)) or [Telegram group](https://t.me/cozystack).
## License ## License
Cozystack is licensed under Apache 2.0. Cozystack is licensed under Apache 2.0.

View File

@@ -590,25 +590,6 @@
"skipUrlSync": false, "skipUrlSync": false,
"sort": 0, "sort": 0,
"type": "query" "type": "query"
},
{
"current": {
"selected": false,
"text": "default",
"value": "default"
},
"hide": 2,
"includeAll": false,
"label": "Prometheus",
"multi": false,
"name": "ds_prometheus",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
} }
] ]
}, },

View File

@@ -120,11 +120,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "value_and_name"
"textMode": "value_and_name",
"wideLayout": true
}, },
"pluginVersion": "10.4.1", "pluginVersion": "10.0.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -132,7 +130,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "up{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}", "expr": "up{job=\"coredns\", instance=~\"$instance\"}",
"interval": "", "interval": "",
"legendFormat": "{{ instance }}", "legendFormat": "{{ instance }}",
"refId": "A" "refId": "A"
@@ -152,7 +150,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -166,7 +163,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -229,7 +225,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])", "expr": "rate(process_cpu_seconds_total{job=\"coredns\", instance=~\"$instance\"}[$__rate_interval])",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ instance }}", "legendFormat": "{{ instance }}",
"refId": "A" "refId": "A"
@@ -249,7 +245,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -263,7 +258,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -325,7 +319,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}", "expr": "process_resident_memory_bytes{job=\"coredns\", instance=~\"$instance\"}",
"interval": "", "interval": "",
"legendFormat": "{{ instance }}", "legendFormat": "{{ instance }}",
"refId": "A" "refId": "A"
@@ -345,7 +339,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -359,7 +352,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -421,7 +413,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval]))", "expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\",proto=\"$protocol\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "total $protocol requests", "legendFormat": "total $protocol requests",
"refId": "A" "refId": "A"
@@ -441,7 +433,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -455,7 +446,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -517,7 +507,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_dns_request_size_bytes_sum{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval])) by (proto) / sum(rate(coredns_dns_request_size_bytes_count{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval])) by (proto)", "expr": "sum(rate(coredns_dns_request_size_bytes_sum{instance=~\"$instance\",proto=\"$protocol\"}[$__rate_interval])) by (proto) / sum(rate(coredns_dns_request_size_bytes_count{instance=~\"$instance\",proto=\"$protocol\"}[$__rate_interval])) by (proto)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "average $protocol packet size", "legendFormat": "average $protocol packet size",
"refId": "A" "refId": "A"
@@ -537,7 +527,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -551,7 +540,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -613,7 +601,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)", "expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\"}[$__rate_interval])) by (type)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ type }}", "legendFormat": "{{ type }}",
"refId": "A" "refId": "A"
@@ -633,7 +621,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -647,7 +634,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -709,7 +695,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_dns_responses_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (rcode)", "expr": "sum(rate(coredns_dns_responses_total{instance=~\"$instance\"}[$__rate_interval])) by (rcode)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ rcode }}", "legendFormat": "{{ rcode }}",
"refId": "A" "refId": "A"
@@ -729,7 +715,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -743,7 +728,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -805,7 +789,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_forward_requests_total{cluster=~\"$cluster\"}[$__rate_interval]))", "expr": "sum(rate(coredns_forward_requests_total[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "total forward requests", "legendFormat": "total forward requests",
"refId": "A" "refId": "A"
@@ -825,7 +809,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -839,7 +822,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -901,7 +883,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_forward_responses_total{rcode=~\"SERVFAIL|REFUSED\", cluster=~\"$cluster\"}[$__rate_interval])) by (rcode)", "expr": "sum(rate(coredns_forward_responses_total{rcode=~\"SERVFAIL|REFUSED\"}[$__rate_interval])) by (rcode)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ rcode }}", "legendFormat": "{{ rcode }}",
"refId": "A" "refId": "A"
@@ -921,7 +903,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -935,7 +916,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -997,7 +977,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)", "expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\"}[$__rate_interval])) by (type)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ type }}", "legendFormat": "{{ type }}",
"refId": "A" "refId": "A"
@@ -1008,7 +988,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)", "expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\"}[$__rate_interval])) by (type)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "misses", "legendFormat": "misses",
"refId": "B" "refId": "B"
@@ -1028,7 +1008,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1042,7 +1021,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "smooth", "lineInterpolation": "smooth",
"lineWidth": 2, "lineWidth": 2,
"pointSize": 5, "pointSize": 5,
@@ -1104,7 +1082,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(coredns_cache_entries{cluster=~\"$cluster\"}) by (type)", "expr": "sum(coredns_cache_entries) by (type)",
"interval": "", "interval": "",
"legendFormat": "{{ type }}", "legendFormat": "{{ type }}",
"refId": "A" "refId": "A"
@@ -1165,8 +1143,7 @@
"layout": "auto" "layout": "auto"
}, },
"tooltip": { "tooltip": {
"mode": "single", "show": true,
"showColorScale": false,
"yHistogram": false "yHistogram": false
}, },
"yAxis": { "yAxis": {
@@ -1175,7 +1152,7 @@
"unit": "s" "unit": "s"
} }
}, },
"pluginVersion": "10.4.1", "pluginVersion": "10.0.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1183,7 +1160,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(increase(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)", "expr": "sum(increase(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[$__rate_interval])) by (le)",
"format": "heatmap", "format": "heatmap",
"legendFormat": "{{le}}", "legendFormat": "{{le}}",
"range": true, "range": true,
@@ -1219,6 +1196,85 @@
"x": 12, "x": 12,
"y": 43 "y": 43
}, },
"id": 30,
"options": {
"calculate": false,
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"reverse": false,
"scale": "exponential",
"scheme": "RdYlBu",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"rowsFrame": {
"layout": "auto"
},
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false,
"unit": "s"
}
},
"pluginVersion": "10.0.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum(increase(coredns_forward_request_duration_seconds_bucket{instance=~\"$instance\"}[$__rate_interval])) by (le)",
"format": "heatmap",
"legendFormat": "{{le}}",
"range": true,
"refId": "A"
}
],
"title": "CoreDNS - Forward request duration",
"type": "heatmap"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 53
},
"id": 28, "id": 28,
"options": { "options": {
"calculate": false, "calculate": false,
@@ -1245,8 +1301,7 @@
"layout": "auto" "layout": "auto"
}, },
"tooltip": { "tooltip": {
"mode": "single", "show": true,
"showColorScale": false,
"yHistogram": false "yHistogram": false
}, },
"yAxis": { "yAxis": {
@@ -1255,7 +1310,7 @@
"unit": "decbytes" "unit": "decbytes"
} }
}, },
"pluginVersion": "10.4.1", "pluginVersion": "10.0.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1263,7 +1318,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(increase(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)", "expr": "sum(increase(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\", le!=\"0\"}[$__rate_interval])) by (le)",
"format": "heatmap", "format": "heatmap",
"legendFormat": "{{le}}", "legendFormat": "{{le}}",
"range": true, "range": true,
@@ -1296,7 +1351,7 @@
"gridPos": { "gridPos": {
"h": 10, "h": 10,
"w": 12, "w": 12,
"x": 0, "x": 12,
"y": 53 "y": 53
}, },
"id": 29, "id": 29,
@@ -1325,8 +1380,7 @@
"layout": "auto" "layout": "auto"
}, },
"tooltip": { "tooltip": {
"mode": "single", "show": true,
"showColorScale": false,
"yHistogram": false "yHistogram": false
}, },
"yAxis": { "yAxis": {
@@ -1335,7 +1389,7 @@
"unit": "decbytes" "unit": "decbytes"
} }
}, },
"pluginVersion": "10.4.1", "pluginVersion": "10.0.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1343,7 +1397,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(increase(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)", "expr": "sum(increase(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\", le!=\"0\"}[$__rate_interval])) by (le)",
"format": "heatmap", "format": "heatmap",
"legendFormat": "{{le}}", "legendFormat": "{{le}}",
"range": true, "range": true,
@@ -1355,7 +1409,8 @@
} }
], ],
"refresh": "30s", "refresh": "30s",
"schemaVersion": 39, "schemaVersion": 38,
"style": "dark",
"tags": [ "tags": [
"Kubernetes", "Kubernetes",
"Prometheus" "Prometheus"
@@ -1380,34 +1435,6 @@
"skipUrlSync": false, "skipUrlSync": false,
"type": "datasource" "type": "datasource"
}, },
{
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kube_node_info,cluster)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "cluster",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(kube_node_info,cluster)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{ {
"current": { "current": {
"selected": false, "selected": false,
@@ -1418,7 +1445,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"definition": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)", "definition": "label_values(up{job=\"coredns\"}, instance)",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"label": "", "label": "",
@@ -1426,9 +1453,8 @@
"name": "instance", "name": "instance",
"options": [], "options": [],
"query": { "query": {
"qryType": 1, "query": "label_values(up{job=\"coredns\"}, instance)",
"query": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)", "refId": "StandardVariableQuery"
"refId": "PrometheusVariableQueryEditor-VariableQuery"
}, },
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
@@ -1450,7 +1476,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"definition": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)", "definition": "label_values(coredns_dns_requests_total, proto)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
"label": "", "label": "",
@@ -1458,7 +1484,7 @@
"name": "protocol", "name": "protocol",
"options": [], "options": [],
"query": { "query": {
"query": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)", "query": "label_values(coredns_dns_requests_total, proto)",
"refId": "StandardVariableQuery" "refId": "StandardVariableQuery"
}, },
"refresh": 1, "refresh": 1,
@@ -1472,7 +1498,7 @@
}, },
{ {
"current": { "current": {
"selected": false, "selected": true,
"text": "30s", "text": "30s",
"value": "30s" "value": "30s"
}, },
@@ -1516,37 +1542,6 @@
"queryValue": "", "queryValue": "",
"skipUrlSync": false, "skipUrlSync": false,
"type": "custom" "type": "custom"
},
{
"current": {
"selected": true,
"text": [
"coredns"
],
"value": [
"coredns"
]
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(coredns_build_info{cluster=\"$cluster\"},job)",
"hide": 0,
"includeAll": false,
"multi": true,
"name": "job",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(coredns_build_info{cluster=\"$cluster\"},job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
} }
] ]
}, },
@@ -1558,6 +1553,6 @@
"timezone": "", "timezone": "",
"title": "Kubernetes / System / CoreDNS", "title": "Kubernetes / System / CoreDNS",
"uid": "k8s_system_coredns", "uid": "k8s_system_coredns",
"version": 18, "version": 13,
"weekStart": "" "weekStart": ""
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -108,7 +108,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@@ -137,7 +136,6 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"mean" "mean"
@@ -145,20 +143,17 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "name"
"textMode": "name",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\"}",
"instant": true, "instant": true,
"interval": "", "interval": "",
"legendFormat": "{{ created_by_kind }}: {{ created_by_name }}", "legendFormat": "{{ created_by_kind }}: {{ created_by_name }}",
@@ -173,13 +168,12 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"links": [ "links": [
{ {
"title": "", "title": "",
"url": "/d/k8s_views_nodes/kubernetes-views-nodes?var-datasource=${datasource}&var-node=${__field.labels.node}" "url": "/d/k8s_views_nodes/kubernetes-views-nodes?var-datasource=${datasource}&var-node=${__data.fields.node}"
} }
], ],
"mappings": [], "mappings": [],
@@ -208,7 +202,6 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"mean" "mean"
@@ -216,20 +209,17 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "name"
"textMode": "name",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\"}",
"instant": true, "instant": true,
"interval": "", "interval": "",
"legendFormat": "{{ node }}", "legendFormat": "{{ node }}",
@@ -244,7 +234,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@@ -273,7 +262,6 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"mean" "mean"
@@ -281,20 +269,17 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "name"
"textMode": "name",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\"}",
"instant": true, "instant": true,
"interval": "", "interval": "",
"legendFormat": "{{ pod_ip }}", "legendFormat": "{{ pod_ip }}",
@@ -309,7 +294,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@@ -338,7 +322,6 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
"mean" "mean"
@@ -346,11 +329,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "name"
"textMode": "name",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -359,7 +340,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", priority_class!=\"\", cluster=\"$cluster\"}", "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", priority_class!=\"\"}",
"format": "time_series", "format": "time_series",
"instant": true, "instant": true,
"interval": "", "interval": "",
@@ -376,7 +357,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@@ -439,17 +419,14 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [], "calcs": [],
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "name"
"textMode": "name",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -458,7 +435,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_status_qos_class{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"} > 0", "expr": "kube_pod_status_qos_class{namespace=\"$namespace\", pod=\"$pod\"} > 0",
"instant": true, "instant": true,
"interval": "", "interval": "",
"legendFormat": "{{ qos_class }}", "legendFormat": "{{ qos_class }}",
@@ -473,7 +450,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@@ -506,17 +482,14 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [], "calcs": [],
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "name"
"textMode": "name",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -525,7 +498,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_container_status_last_terminated_reason{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", "expr": "kube_pod_container_status_last_terminated_reason{namespace=\"$namespace\", pod=\"$pod\"}",
"instant": true, "instant": true,
"interval": "", "interval": "",
"legendFormat": "{{ reason }}", "legendFormat": "{{ reason }}",
@@ -540,7 +513,6 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"description": "Panel only works when a single pod is selected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@@ -577,17 +549,14 @@
"graphMode": "none", "graphMode": "none",
"justifyMode": "auto", "justifyMode": "auto",
"orientation": "auto", "orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": { "reduceOptions": {
"calcs": [], "calcs": [],
"fields": "", "fields": "",
"values": true "values": true
}, },
"showPercentChange": false, "textMode": "value"
"textMode": "value",
"wideLayout": true
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -596,7 +565,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "kube_pod_container_status_last_terminated_exitcode{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", "expr": "kube_pod_container_status_last_terminated_exitcode{namespace=\"$namespace\", pod=\"$pod\"}",
"instant": true, "instant": true,
"interval": "", "interval": "",
"legendFormat": "__auto", "legendFormat": "__auto",
@@ -677,8 +646,6 @@
}, },
"id": 39, "id": 39,
"options": { "options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto", "orientation": "auto",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
@@ -688,10 +655,9 @@
"values": false "values": false
}, },
"showThresholdLabels": false, "showThresholdLabels": false,
"showThresholdMarkers": true, "showThresholdMarkers": true
"sizing": "auto"
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -700,7 +666,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"})", "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}[$__rate_interval])) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"})",
"instant": true, "instant": true,
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Requests", "legendFormat": "Requests",
@@ -750,8 +716,6 @@
}, },
"id": 48, "id": 48,
"options": { "options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto", "orientation": "auto",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
@@ -761,10 +725,9 @@
"values": false "values": false
}, },
"showThresholdLabels": false, "showThresholdLabels": false,
"showThresholdMarkers": true, "showThresholdMarkers": true
"sizing": "auto"
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -773,7 +736,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"})", "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}[$__rate_interval])) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"})",
"instant": true, "instant": true,
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Limits", "legendFormat": "Limits",
@@ -827,8 +790,6 @@
}, },
"id": 40, "id": 40,
"options": { "options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto", "orientation": "auto",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
@@ -838,19 +799,17 @@
"values": false "values": false
}, },
"showThresholdLabels": false, "showThresholdLabels": false,
"showThresholdMarkers": true, "showThresholdMarkers": true
"sizing": "auto"
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"})", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"})",
"instant": true, "instant": true,
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Requests", "legendFormat": "Requests",
@@ -900,8 +859,6 @@
}, },
"id": 49, "id": 49,
"options": { "options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto", "orientation": "auto",
"reduceOptions": { "reduceOptions": {
"calcs": [ "calcs": [
@@ -911,19 +868,17 @@
"values": false "values": false
}, },
"showThresholdLabels": false, "showThresholdLabels": false,
"showThresholdMarkers": true, "showThresholdMarkers": true
"sizing": "auto"
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) ", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) ",
"instant": true, "instant": true,
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Limits", "legendFormat": "Limits",
@@ -1033,7 +988,7 @@
"showHeader": true, "showHeader": true,
"sortBy": [] "sortBy": []
}, },
"pluginVersion": "11.2.0", "pluginVersion": "10.1.0",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -1042,7 +997,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"interval": "", "interval": "",
@@ -1057,7 +1012,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"interval": "", "interval": "",
@@ -1072,7 +1027,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"interval": "", "interval": "",
@@ -1086,7 +1041,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)",
"format": "table", "format": "table",
"instant": true, "instant": true,
"interval": "", "interval": "",
@@ -1100,7 +1055,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}[$__rate_interval])) by (container)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -1115,7 +1070,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}) by (container)", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}) by (container)",
"format": "table", "format": "table",
"hide": false, "hide": false,
"instant": true, "instant": true,
@@ -1226,13 +1181,11 @@
"mode": "thresholds" "mode": "thresholds"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "Percent", "axisLabel": "Percent",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -1318,7 +1271,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}[$__rate_interval])) by (container) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ container }} REQUESTS", "legendFormat": "{{ container }} REQUESTS",
"range": true, "range": true,
@@ -1330,7 +1283,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}[$__rate_interval])) by (container) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)",
"hide": false, "hide": false,
"legendFormat": "{{ container }} LIMITS", "legendFormat": "{{ container }} LIMITS",
"range": true, "range": true,
@@ -1352,13 +1305,11 @@
"mode": "thresholds" "mode": "thresholds"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "Percent", "axisLabel": "Percent",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -1447,7 +1398,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) by (container) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)",
"interval": "", "interval": "",
"legendFormat": "{{ container }} REQUESTS", "legendFormat": "{{ container }} REQUESTS",
"range": true, "range": true,
@@ -1459,7 +1410,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) by (container) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) by (container) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)",
"hide": false, "hide": false,
"legendFormat": "{{ container }} LIMITS", "legendFormat": "{{ container }} LIMITS",
"range": true, "range": true,
@@ -1480,13 +1431,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "CPU Cores", "axisLabel": "CPU Cores",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -1583,7 +1532,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}[$__rate_interval])) by (container)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",
"range": true, "range": true,
@@ -1604,13 +1553,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "Bytes", "axisLabel": "Bytes",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -1690,7 +1637,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}) by (container)", "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}) by (container)",
"interval": "", "interval": "",
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",
"range": true, "range": true,
@@ -1712,13 +1659,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "SECONDS", "axisLabel": "SECONDS",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -1800,7 +1745,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}[$__rate_interval])) by (container)",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",
"range": true, "range": true,
@@ -1835,13 +1780,11 @@
"mode": "thresholds" "mode": "thresholds"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "Percent", "axisLabel": "Percent",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -1930,7 +1873,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(increase(container_oom_events_total{namespace=\"${namespace}\", pod=\"${pod}\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", "expr": "sum(increase(container_oom_events_total{namespace=\"${namespace}\", pod=\"${pod}\", container!=\"\"}[$__rate_interval])) by (container)",
"interval": "", "interval": "",
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",
"range": true, "range": true,
@@ -1952,13 +1895,11 @@
"mode": "thresholds" "mode": "thresholds"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "Percent", "axisLabel": "Percent",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -2047,7 +1988,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\", pod=\"${pod}\", container!=\"\", job=~\"$job\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", "expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\", pod=\"${pod}\", container!=\"\"}[$__rate_interval])) by (container)",
"interval": "", "interval": "",
"legendFormat": "{{ container }}", "legendFormat": "{{ container }}",
"range": true, "range": true,
@@ -2094,13 +2035,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -2140,7 +2079,7 @@
} }
] ]
}, },
"unit": "binBps" "unit": "bytes"
}, },
"overrides": [] "overrides": []
}, },
@@ -2171,7 +2110,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Received", "legendFormat": "Received",
"refId": "A" "refId": "A"
@@ -2182,7 +2121,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "- sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "- sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Transmitted", "legendFormat": "Transmitted",
"refId": "B" "refId": "B"
@@ -2202,13 +2141,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -2279,7 +2216,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Received", "legendFormat": "Received",
"refId": "A" "refId": "A"
@@ -2290,7 +2227,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "- sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "- sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Transmitted", "legendFormat": "Transmitted",
"refId": "B" "refId": "B"
@@ -2310,13 +2247,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -2347,8 +2282,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -2387,7 +2321,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Received", "legendFormat": "Received",
"refId": "A" "refId": "A"
@@ -2398,7 +2332,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "- sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "- sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Transmitted", "legendFormat": "Transmitted",
"refId": "B" "refId": "B"
@@ -2418,13 +2352,11 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 25, "fillOpacity": 25,
"gradientMode": "opacity", "gradientMode": "opacity",
@@ -2455,8 +2387,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -2495,7 +2426,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Received", "legendFormat": "Received",
"refId": "A" "refId": "A"
@@ -2506,7 +2437,7 @@
"uid": "${datasource}" "uid": "${datasource}"
}, },
"exemplar": true, "exemplar": true,
"expr": "- sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", "expr": "- sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
"interval": "$resolution", "interval": "$resolution",
"legendFormat": "Transmitted", "legendFormat": "Transmitted",
"refId": "B" "refId": "B"
@@ -2517,7 +2448,8 @@
} }
], ],
"refresh": "30s", "refresh": "30s",
"schemaVersion": 39, "schemaVersion": 38,
"style": "dark",
"tags": [ "tags": [
"Kubernetes", "Kubernetes",
"Prometheus" "Prometheus"
@@ -2527,8 +2459,8 @@
{ {
"current": { "current": {
"selected": false, "selected": false,
"text": "", "text": "Prometheus",
"value": "" "value": "Prometheus"
}, },
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -2542,34 +2474,6 @@
"skipUrlSync": false, "skipUrlSync": false,
"type": "datasource" "type": "datasource"
}, },
{
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kube_node_info,cluster)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "cluster",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(kube_node_info,cluster)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{ {
"current": { "current": {
"selected": false, "selected": false,
@@ -2580,14 +2484,14 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"definition": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", "definition": "label_values(kube_pod_info, namespace)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
"multi": false, "multi": false,
"name": "namespace", "name": "namespace",
"options": [], "options": [],
"query": { "query": {
"query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", "query": "label_values(kube_pod_info, namespace)",
"refId": "Prometheus-namespace-Variable-Query" "refId": "Prometheus-namespace-Variable-Query"
}, },
"refresh": 1, "refresh": 1,
@@ -2609,14 +2513,14 @@
"type": "prometheus", "type": "prometheus",
"uid": "${datasource}" "uid": "${datasource}"
}, },
"definition": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"}, pod)", "definition": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": false,
"multi": true, "multi": false,
"name": "pod", "name": "pod",
"options": [], "options": [],
"query": { "query": {
"query": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"}, pod)", "query": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
"refId": "Prometheus-pod-Variable-Query" "refId": "Prometheus-pod-Variable-Query"
}, },
"refresh": 2, "refresh": 2,
@@ -2630,7 +2534,7 @@
}, },
{ {
"current": { "current": {
"selected": false, "selected": true,
"text": "30s", "text": "30s",
"value": "30s" "value": "30s"
}, },
@@ -2674,33 +2578,6 @@
"queryValue": "", "queryValue": "",
"skipUrlSync": false, "skipUrlSync": false,
"type": "custom" "type": "custom"
},
{
"current": {
"selected": false,
"text": "kube-state-metrics",
"value": "kube-state-metrics"
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"},job)",
"hide": 0,
"includeAll": false,
"multi": true,
"name": "job",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"},job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
} }
] ]
}, },
@@ -2712,6 +2589,6 @@
"timezone": "", "timezone": "",
"title": "Kubernetes / Views / Pods", "title": "Kubernetes / Views / Pods",
"uid": "k8s_views_pods", "uid": "k8s_views_pods",
"version": 30, "version": 22,
"weekStart": "" "weekStart": ""
} }

View File

@@ -1339,7 +1339,11 @@
}, },
{ {
"id": "unit", "id": "unit",
"value": "none" "value": "short"
},
{
"id": "decimals",
"value": 2
}, },
{ {
"id": "custom.align", "id": "custom.align",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "10.4.0" "version": "9.0.4"
}, },
{ {
"type": "datasource", "type": "datasource",
@@ -124,11 +124,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -200,11 +198,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -264,11 +260,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -329,11 +323,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -407,11 +399,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -481,11 +471,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -558,11 +546,9 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false, "textMode": "auto"
"textMode": "auto",
"wideLayout": true
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -591,9 +577,7 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"cellOptions": { "displayMode": "auto",
"type": "auto"
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@@ -646,9 +630,7 @@
}, },
"id": 22, "id": 22,
"options": { "options": {
"cellHeight": "sm",
"footer": { "footer": {
"countRows": false,
"fields": "", "fields": "",
"reducer": [ "reducer": [
"sum" "sum"
@@ -663,7 +645,7 @@
} }
] ]
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -718,9 +700,7 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"cellOptions": { "displayMode": "auto",
"type": "auto"
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@@ -773,9 +753,7 @@
}, },
"id": 21, "id": 21,
"options": { "options": {
"cellHeight": "sm",
"footer": { "footer": {
"countRows": false,
"fields": "", "fields": "",
"reducer": [ "reducer": [
"sum" "sum"
@@ -790,7 +768,7 @@
} }
] ]
}, },
"pluginVersion": "10.4.0", "pluginVersion": "9.0.4",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -907,7 +885,7 @@
"min", "min",
"mean" "mean"
], ],
"displayMode": "list", "displayMode": "table",
"placement": "bottom", "placement": "bottom",
"showLegend": false "showLegend": false
}, },
@@ -1128,9 +1106,7 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"cellOptions": { "displayMode": "auto",
"type": "auto"
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@@ -1275,8 +1251,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "bottom"
"showLegend": true
}, },
"orientation": "auto", "orientation": "auto",
"showValue": "auto", "showValue": "auto",
@@ -1368,7 +1343,7 @@
"max", "max",
"mean" "mean"
], ],
"displayMode": "list", "displayMode": "table",
"placement": "right", "placement": "right",
"showLegend": false "showLegend": false
}, },
@@ -1461,8 +1436,7 @@
"legend": { "legend": {
"calcs": [], "calcs": [],
"displayMode": "list", "displayMode": "list",
"placement": "bottom", "placement": "bottom"
"showLegend": true
}, },
"orientation": "auto", "orientation": "auto",
"showValue": "auto", "showValue": "auto",
@@ -1683,7 +1657,8 @@
} }
], ],
"refresh": "1m", "refresh": "1m",
"schemaVersion": 39, "schemaVersion": 36,
"style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
"list": [ "list": [

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
"type": "grafana", "type": "grafana",
"id": "grafana", "id": "grafana",
"name": "Grafana", "name": "Grafana",
"version": "10.4.2" "version": "9.2.7"
}, },
{ {
"type": "datasource", "type": "datasource",
@@ -59,7 +59,7 @@
"uid": "$ds" "uid": "$ds"
}, },
"enable": true, "enable": true,
"expr": "sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"}) by(short_version) unless (sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"} offset $__interval) by(short_version))", "expr": "sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"}) by(short_version) unless (sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"} offset 20m) by(short_version))",
"hide": true, "hide": true,
"iconColor": "dark-blue", "iconColor": "dark-blue",
"name": "version", "name": "version",
@@ -72,14 +72,15 @@
"uid": "$ds" "uid": "$ds"
}, },
"enable": true, "enable": true,
"expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__interval])) by(job, instance)", "expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"})) by(job, instance)",
"hide": true,
"iconColor": "dark-yellow", "iconColor": "dark-yellow",
"name": "restarts", "name": "restarts",
"textFormat": "{{job}}:{{instance}} restarted" "textFormat": "{{job}}:{{instance}} restarted"
} }
] ]
}, },
"description": "Overview for VictoriaMetrics vmalert v1.102.0 or higher", "description": "Overview for VictoriaMetrics vmalert v1.96.0 or higher",
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 1, "graphTooltip": 1,
@@ -95,7 +96,7 @@
"title": "vmalert docs", "title": "vmalert docs",
"tooltip": "", "tooltip": "",
"type": "link", "type": "link",
"url": "https://docs.victoriametrics.com/vmalert/" "url": "https://docs.victoriametrics.com/vmalert.html"
}, },
{ {
"asDropdown": false, "asDropdown": false,
@@ -200,12 +201,10 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false,
"text": {}, "text": {},
"textMode": "auto", "textMode": "auto"
"wideLayout": true
}, },
"pluginVersion": "10.4.2", "pluginVersion": "9.2.7",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -262,12 +261,10 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false,
"text": {}, "text": {},
"textMode": "auto", "textMode": "auto"
"wideLayout": true
}, },
"pluginVersion": "10.4.2", "pluginVersion": "9.2.7",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -324,12 +321,10 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false,
"text": {}, "text": {},
"textMode": "auto", "textMode": "auto"
"wideLayout": true
}, },
"pluginVersion": "10.4.2", "pluginVersion": "9.2.7",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -390,12 +385,10 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false,
"text": {}, "text": {},
"textMode": "auto", "textMode": "auto"
"wideLayout": true
}, },
"pluginVersion": "10.4.2", "pluginVersion": "9.2.7",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -456,12 +449,10 @@
"fields": "", "fields": "",
"values": false "values": false
}, },
"showPercentChange": false,
"text": {}, "text": {},
"textMode": "auto", "textMode": "auto"
"wideLayout": true
}, },
"pluginVersion": "10.4.2", "pluginVersion": "9.2.7",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -492,9 +483,7 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"cellOptions": { "displayMode": "auto",
"type": "auto"
},
"inspect": false, "inspect": false,
"minWidth": 50 "minWidth": 50
}, },
@@ -548,9 +537,7 @@
}, },
"id": 45, "id": 45,
"options": { "options": {
"cellHeight": "sm",
"footer": { "footer": {
"countRows": false,
"fields": "", "fields": "",
"reducer": [ "reducer": [
"sum" "sum"
@@ -559,7 +546,7 @@
}, },
"showHeader": true "showHeader": true
}, },
"pluginVersion": "10.4.2", "pluginVersion": "9.2.7",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -588,7 +575,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -602,7 +588,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "stepAfter", "lineInterpolation": "stepAfter",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -721,7 +706,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -735,7 +719,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -826,7 +809,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -840,7 +822,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -931,7 +912,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -945,7 +925,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1034,7 +1013,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1048,7 +1026,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1137,9 +1114,7 @@
}, },
"custom": { "custom": {
"align": "auto", "align": "auto",
"cellOptions": { "displayMode": "auto",
"type": "auto"
},
"inspect": false "inspect": false
}, },
"mappings": [], "mappings": [],
@@ -1147,7 +1122,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -1258,7 +1234,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds" "uid": "$ds"
}, },
"description": "Missed evaluation means that group evaluation time takes longer than the configured evaluation interval. \nThis may result in missed alerting notifications or recording rules samples. Try increasing evaluation interval or concurrency for such groups. See https://docs.victoriametrics.com/vmalert/#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/troubleshooting/#slow-queries.\"", "description": "Missed evaluation means that group evaluation time takes longer than the configured evaluation interval. \nThis may result in missed alerting notifications or recording rules samples. Try increasing evaluation interval or concurrency for such groups. See https://docs.victoriametrics.com/vmalert.html#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/Troubleshooting.html#slow-queries.\"",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@@ -1299,7 +1275,8 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green" "color": "green",
"value": null
}, },
{ {
"color": "red", "color": "red",
@@ -1379,7 +1356,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1393,7 +1369,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1425,8 +1400,7 @@
} }
] ]
}, },
"unit": "percentunit", "unit": "percentunit"
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -1434,14 +1408,14 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 3 "y": 33
}, },
"id": 37, "id": 37,
"links": [ "links": [
{ {
"targetBlank": true, "targetBlank": true,
"title": "Profiling", "title": "Profiling",
"url": "https://docs.victoriametrics.com/vmagent/#profiling" "url": "https://docs.victoriametrics.com/vmagent.html#profiling"
} }
], ],
"options": { "options": {
@@ -1493,7 +1467,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1507,7 +1480,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1539,8 +1511,7 @@
} }
] ]
}, },
"unit": "bytes", "unit": "bytes"
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -1548,14 +1519,14 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 3 "y": 33
}, },
"id": 57, "id": 57,
"links": [ "links": [
{ {
"targetBlank": true, "targetBlank": true,
"title": "Profiling", "title": "Profiling",
"url": "https://docs.victoriametrics.com/vmagent/#profiling" "url": "https://docs.victoriametrics.com/vmagent.html#profiling"
} }
], ],
"options": { "options": {
@@ -1607,7 +1578,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1621,7 +1591,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1653,8 +1622,7 @@
} }
] ]
}, },
"unit": "percentunit", "unit": "percentunit"
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -1662,14 +1630,14 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 11 "y": 41
}, },
"id": 35, "id": 35,
"links": [ "links": [
{ {
"targetBlank": true, "targetBlank": true,
"title": "Profiling", "title": "Profiling",
"url": "https://docs.victoriametrics.com/vmagent/#profiling" "url": "https://docs.victoriametrics.com/vmagent.html#profiling"
} }
], ],
"options": { "options": {
@@ -1723,7 +1691,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1737,7 +1704,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1769,8 +1735,7 @@
} }
] ]
}, },
"unit": "short", "unit": "short"
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -1778,14 +1743,14 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 11 "y": 41
}, },
"id": 56, "id": 56,
"links": [ "links": [
{ {
"targetBlank": true, "targetBlank": true,
"title": "Profiling", "title": "Profiling",
"url": "https://docs.victoriametrics.com/vmagent/#profiling" "url": "https://docs.victoriametrics.com/vmagent.html#profiling"
} }
], ],
"options": { "options": {
@@ -1855,7 +1820,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1869,7 +1833,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -1902,8 +1865,7 @@
} }
] ]
}, },
"unit": "percentunit", "unit": "percentunit"
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -1911,7 +1873,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 19 "y": 49
}, },
"id": 39, "id": 39,
"links": [], "links": [],
@@ -1963,7 +1925,6 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
@@ -1977,7 +1938,6 @@
"tooltip": false, "tooltip": false,
"viz": false "viz": false
}, },
"insertNulls": false,
"lineInterpolation": "linear", "lineInterpolation": "linear",
"lineWidth": 1, "lineWidth": 1,
"pointSize": 5, "pointSize": 5,
@@ -2010,8 +1970,7 @@
} }
] ]
}, },
"unit": "short", "unit": "short"
"unitScale": true
}, },
"overrides": [] "overrides": []
}, },
@@ -2019,7 +1978,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 19 "y": 49
}, },
"id": 41, "id": 41,
"links": [], "links": [],
@@ -2058,114 +2017,6 @@
], ],
"title": "Goroutines ($instance)", "title": "Goroutines ($instance)",
"type": "timeseries" "type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"description": "Shows the percent of CPU spent on garbage collection.\n\nIf % is high, then CPU usage can be decreased by changing GOGC to higher values. Increasing GOGC value will increase memory usage, and decrease CPU usage.\n\nTry searching for keyword `GOGC` at https://docs.victoriametrics.com/troubleshooting/ ",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percentunit",
"unitScale": true
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 27
},
"id": 59,
"links": [],
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "9.2.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"editorMode": "code",
"expr": "max(\n rate(go_gc_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]) \n / rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n ) by(job)",
"format": "time_series",
"interval": "",
"intervalFactor": 2,
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "CPU spent on GC ($instance)",
"type": "timeseries"
} }
], ],
"targets": [ "targets": [
@@ -2256,7 +2107,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 36 "y": 28
}, },
"id": 14, "id": 14,
"options": { "options": {
@@ -2358,7 +2209,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 36 "y": 28
}, },
"id": 13, "id": 13,
"options": { "options": {
@@ -2460,7 +2311,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 44 "y": 36
}, },
"id": 20, "id": 20,
"options": { "options": {
@@ -2563,7 +2414,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 44 "y": 36
}, },
"id": 32, "id": 32,
"options": { "options": {
@@ -2662,7 +2513,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 52 "y": 44
}, },
"id": 26, "id": 26,
"options": { "options": {
@@ -2732,7 +2583,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds" "uid": "$ds"
}, },
"description": "Shows the top $topk recording rules which generate the most of [samples](https://docs.victoriametrics.com/keyconcepts/#raw-samples). Each generated sample is basically a time series which then ingested into configured remote storage. Rules with high numbers may cause the most pressure on the remote database and become a source of too high cardinality.\n\nThe panel uses MetricsQL functions and may not work with Prometheus.", "description": "Shows the top $topk recording rules which generate the most of samples. Each generated sample is basically a time series which then ingested into configured remote storage. Rules with high numbers may cause the most pressure on the remote database and become a source of too high cardinality.\n\nThe panel uses MetricsQL functions and may not work with Prometheus.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@@ -2789,7 +2640,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 51 "y": 43
}, },
"id": 31, "id": 31,
"options": { "options": {
@@ -2834,7 +2685,7 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds" "uid": "$ds"
}, },
"description": "Shows the rules which do not produce any [samples](https://docs.victoriametrics.com/keyconcepts/#raw-samples) during the evaluation. Usually it means that such rules are misconfigured, since they give no output during the evaluation.\nPlease check if rule's expression is correct and it is working as expected.", "description": "Shows the rules which do not produce any samples during the evaluation. Usually it means that such rules are misconfigured, since they give no output during the evaluation.\nPlease check if rule's expression is correct and it is working as expected.",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@@ -2891,7 +2742,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 51 "y": 43
}, },
"id": 33, "id": 33,
"options": { "options": {
@@ -2992,7 +2843,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 59 "y": 51
}, },
"id": 30, "id": 30,
"options": { "options": {
@@ -3113,7 +2964,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 17 "y": 9
}, },
"id": 52, "id": 52,
"options": { "options": {
@@ -3205,7 +3056,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 17 "y": 9
}, },
"id": 53, "id": 53,
"options": { "options": {
@@ -3235,221 +3086,15 @@
], ],
"title": "Datapoints drop rate ($instance)", "title": "Datapoints drop rate ($instance)",
"type": "timeseries" "type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"description": "Shows current number of established connections to remote write endpoints.\n\n",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 44
},
"id": 54,
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(max_over_time(vmalert_remotewrite_conns{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)",
"interval": "",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Connections ($instance)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"description": "Shows the global rate for number of written bytes via remote write connections.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "decbytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 44
},
"id": 55,
"options": {
"legend": {
"calcs": [
"mean",
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "$ds"
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(vmalert_remotewrite_conn_bytes_written_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job) > 0",
"interval": "",
"legendFormat": "__auto",
"range": true,
"refId": "A"
}
],
"title": "Bytes write rate ($instance)",
"type": "timeseries"
} }
], ],
"title": "Remote write", "title": "Remote write",
"type": "row" "type": "row"
} }
], ],
"refresh": "", "refresh": false,
"schemaVersion": 39, "schemaVersion": 37,
"style": "dark",
"tags": [ "tags": [
"victoriametrics", "victoriametrics",
"vmalert" "vmalert"
@@ -3459,8 +3104,8 @@
{ {
"current": { "current": {
"selected": false, "selected": false,
"text": "VictoriaMetrics", "text": "VictoriaMetrics - cluster",
"value": "P4169E866C3094E38" "value": "VictoriaMetrics - cluster"
}, },
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@@ -3526,14 +3171,14 @@
"type": "prometheus", "type": "prometheus",
"uid": "$ds" "uid": "$ds"
}, },
"definition": "label_values(vmalert_iteration_total{job=~\"$job\", instance=~\"$instance\"}, group)", "definition": "label_values(vmalert_iteration_duration_seconds{job=~\"$job\", instance=~\"$instance\"}, group)",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
"multi": true, "multi": true,
"name": "group", "name": "group",
"options": [], "options": [],
"query": { "query": {
"query": "label_values(vmalert_iteration_total{job=~\"$job\", instance=~\"$instance\"}, group)", "query": "label_values(vmalert_iteration_duration_seconds{job=~\"$job\", instance=~\"$instance\"}, group)",
"refId": "StandardVariableQuery" "refId": "StandardVariableQuery"
}, },
"refresh": 1, "refresh": 1,

View File

@@ -1,16 +0,0 @@
.PHONY: test clean help
SCRIPT=./e2e.applications.sh
PRECHECKS=./pre-checks.sh
help:
@echo "Usage: make {test|clean}"
@echo " test - Run the end-to-end tests."
@echo " clean - Clean up resources."
test:
@bash $(PRECHECKS) test
@bash $(SCRIPT) test
clean:
@bash $(SCRIPT) clean

View File

@@ -1,6 +1,6 @@
#https://github.com/deckhouse/deckhouse/blob/main/modules/340-monitoring-kubernetes-control-plane/monitoring/grafana-dashboards/kubernetes-cluster/control-plane-status.json #https://github.com/deckhouse/deckhouse/blob/main/modules/340-monitoring-kubernetes-control-plane/monitoring/grafana-dashboards/kubernetes-cluster/control-plane-status.json
base=https://github.com/deckhouse/deckhouse/raw/main/ base=https://github.com/deckhouse/deckhouse/raw/main/
dir="dashboards" dir="grafana-dashboards"
mkdir -p "$dir" mkdir -p "$dir"

View File

@@ -1,47 +0,0 @@
for file in ./modules/*.sh; do
source "$file"
done
ROOT_NS="tenant-root"
TEST_TENANT="tenant-e2e"
function test() {
install_tenant $TEST_TENANT $ROOT_NS
check_helmrelease_status $TEST_TENANT $ROOT_NS
install_all_apps "../packages/apps" "$TEST_TENANT" cozystack-apps cozy-public
if true; then
echo -e "${GREEN}All tests passed!${RESET}"
return 0
else
echo -e "${RED}Some tests failed!${RESET}"
return 1
fi
}
function clean() {
kubectl delete helmrelease.helm.toolkit.fluxcd.io $TEST_TENANT -n $ROOT_NS
if true; then
echo -e "${GREEN}Cleanup successful!${RESET}"
return 0
else
echo -e "${RED}Cleanup failed!${RESET}"
return 1
fi
}
case "$1" in
test)
echo -e "${YELLOW}Running tests...${RESET}"
test
;;
clean)
echo -e "${YELLOW}Cleaning up...${RESET}"
clean
;;
*)
echo -e "${RED}Usage: $0 {test|clean}${RESET}"
exit 1
;;
esac

View File

@@ -27,16 +27,16 @@ ip link add cozy-br0 type bridge
ip link set cozy-br0 up ip link set cozy-br0 up
ip addr add 192.168.123.1/24 dev cozy-br0 ip addr add 192.168.123.1/24 dev cozy-br0
# Enable masquerading # Enable forward & masquerading
iptables -t nat -D POSTROUTING -s 192.168.123.0/24 ! -d 192.168.123.0/24 -j MASQUERADE 2>/dev/null || true echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.123.0/24 ! -d 192.168.123.0/24 -j MASQUERADE iptables -t nat -A POSTROUTING -s 192.168.123.0/24 -j MASQUERADE
rm -rf srv1 srv2 srv3 rm -rf srv1 srv2 srv3
mkdir -p srv1 srv2 srv3 mkdir -p srv1 srv2 srv3
# Prepare cloud-init # Prepare cloud-init
for i in 1 2 3; do for i in 1 2 3; do
echo "hostname: srv$i" > "srv$i/meta-data" echo "local-hostname: srv$i" > "srv$i/meta-data"
echo '#cloud-config' > "srv$i/user-data" echo '#cloud-config' > "srv$i/user-data"
cat > "srv$i/network-config" <<EOT cat > "srv$i/network-config" <<EOT
version: 2 version: 2
@@ -114,7 +114,7 @@ machine:
- name: zfs - name: zfs
- name: spl - name: spl
install: install:
image: ghcr.io/aenix-io/cozystack/talos:v1.8.0 image: ghcr.io/aenix-io/cozystack/talos:v1.7.1
files: files:
- content: | - content: |
[plugins] [plugins]
@@ -182,7 +182,7 @@ timeout 60 sh -c 'until nc -nzv 192.168.123.11 50000 && nc -nzv 192.168.123.12 5
talosctl bootstrap -n 192.168.123.11 -e 192.168.123.11 talosctl bootstrap -n 192.168.123.11 -e 192.168.123.11
# Wait for etcd # Wait for etcd
timeout 180 sh -c 'while talosctl etcd members -n 192.168.123.11,192.168.123.12,192.168.123.13 -e 192.168.123.10 2>&1 | grep "rpc error"; do sleep 1; done' timeout 120 sh -c 'while talosctl etcd members -n 192.168.123.11,192.168.123.12,192.168.123.13 -e 192.168.123.10 2>&1 | grep "rpc error"; do sleep 1; done'
rm -f kubeconfig rm -f kubeconfig
talosctl kubeconfig kubeconfig -e 192.168.123.10 -n 192.168.123.10 talosctl kubeconfig kubeconfig -e 192.168.123.10 -n 192.168.123.10
@@ -217,10 +217,6 @@ timeout 60 sh -c 'until kubectl get hr -A | grep cozy; do sleep 1; done'
sleep 5 sleep 5
kubectl get hr -A | awk 'NR>1 {print "kubectl wait --timeout=15m --for=condition=ready -n " $1 " hr/" $2 " &"} END{print "wait"}' | sh -x kubectl get hr -A | awk 'NR>1 {print "kubectl wait --timeout=15m --for=condition=ready -n " $1 " hr/" $2 " &"} END{print "wait"}' | sh -x
# Wait for Cluster-API providers
kubectl wait deploy --timeout=30s --for=condition=available -n cozy-cluster-api capi-controller-manager capi-kamaji-controller-manager capi-kubeadm-bootstrap-controller-manager capi-operator-cluster-api-operator capk-controller-manager
# Wait for linstor controller # Wait for linstor controller
kubectl wait deploy --timeout=5m --for=condition=available -n cozy-linstor linstor-controller kubectl wait deploy --timeout=5m --for=condition=available -n cozy-linstor linstor-controller
@@ -291,8 +287,7 @@ kubectl patch -n tenant-root hr/tenant-root --type=merge -p '{"spec":{ "values":
"host": "example.org", "host": "example.org",
"ingress": true, "ingress": true,
"monitoring": true, "monitoring": true,
"etcd": true, "etcd": true
"isolated": true
}}}' }}}'
# Wait for HelmRelease be created # Wait for HelmRelease be created
@@ -301,10 +296,6 @@ timeout 60 sh -c 'until kubectl get hr -n tenant-root etcd ingress monitoring te
# Wait for HelmReleases be installed # Wait for HelmReleases be installed
kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr etcd ingress monitoring tenant-root kubectl wait --timeout=2m --for=condition=ready -n tenant-root hr etcd ingress monitoring tenant-root
kubectl patch -n tenant-root hr/ingress --type=merge -p '{"spec":{ "values":{
"dashboard": true
}}}'
# Wait for nginx-ingress-controller # Wait for nginx-ingress-controller
timeout 60 sh -c 'until kubectl get deploy -n tenant-root root-ingress-controller; do sleep 1; done' timeout 60 sh -c 'until kubectl get deploy -n tenant-root root-ingress-controller; do sleep 1; done'
kubectl wait --timeout=5m --for=condition=available -n tenant-root deploy root-ingress-controller kubectl wait --timeout=5m --for=condition=available -n tenant-root deploy root-ingress-controller
@@ -313,9 +304,8 @@ kubectl wait --timeout=5m --for=condition=available -n tenant-root deploy root-i
kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=3 -n tenant-root sts etcd kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=3 -n tenant-root sts etcd
# Wait for Victoria metrics # Wait for Victoria metrics
kubectl wait --timeout=5m --for=jsonpath=.status.updateStatus=operational -n tenant-root vmalert/vmalert-longterm vmalert/vmalert-shortterm vmalertmanager/alertmanager kubectl wait --timeout=5m --for=condition=available deploy -n tenant-root vmalert-vmalert vminsert-longterm vminsert-shortterm
kubectl wait --timeout=5m --for=jsonpath=.status.status=operational -n tenant-root vlogs/generic kubectl wait --timeout=5m --for=jsonpath=.status.readyReplicas=2 -n tenant-root sts vmalertmanager-alertmanager vmselect-longterm vmselect-shortterm vmstorage-longterm vmstorage-shortterm
kubectl wait --timeout=5m --for=jsonpath=.status.clusterStatus=operational -n tenant-root vmcluster/shortterm vmcluster/longterm
# Wait for grafana # Wait for grafana
kubectl wait --timeout=5m --for=condition=ready -n tenant-root clusters.postgresql.cnpg.io grafana-db kubectl wait --timeout=5m --for=condition=ready -n tenant-root clusters.postgresql.cnpg.io grafana-db

View File

@@ -24,36 +24,24 @@ resolved_miss_map=$(
change_commit=$(git --no-pager blame -L"$line",+1 -- "$chart/Chart.yaml" | awk '{print $1}') change_commit=$(git --no-pager blame -L"$line",+1 -- "$chart/Chart.yaml" | awk '{print $1}')
if [ "$change_commit" = "00000000" ]; then if [ "$change_commit" = "00000000" ]; then
# Not committed yet, use previous commit # Not commited yet, use previus commit
line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}') line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}')
commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}') commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}')
if [ $(echo $commit | cut -c1) = "^" ]; then if [ $(echo $commit | cut -c1) = "^" ]; then
# Previous commit not exists # Previus commit not exists
commit=$(echo $commit | cut -c2-) commit=$(echo $commit | cut -c2-)
fi fi
else else
# Committed, but version_map wasn't updated # Commited, but version_map wasn't updated
line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}') line=$(git show HEAD:"./$chart/Chart.yaml" | awk '/^version:/ {print NR; exit}')
change_commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}') change_commit=$(git --no-pager blame -L"$line",+1 HEAD -- "$chart/Chart.yaml" | awk '{print $1}')
if [ $(echo $change_commit | cut -c1) = "^" ]; then if [ $(echo $change_commit | cut -c1) = "^" ]; then
# Previous commit not exists # Previus commit not exists
commit=$(echo $change_commit | cut -c2-) commit=$(echo $change_commit | cut -c2-)
else else
commit=$(git describe --always "$change_commit~1") commit=$(git describe --always "$change_commit~1")
fi fi
fi fi
# Check if the commit belongs to the main branch
if ! git merge-base --is-ancestor "$commit" main; then
# Find the closest parent commit that belongs to main
commit_in_main=$(git log --pretty=format:"%h" main -- "$chart" | head -n 1)
if [ -n "$commit_in_main" ]; then
commit="$commit_in_main"
else
# No valid commit found in main branch for $chart, skipping..."
continue
fi
fi
fi fi
echo "$chart $version $commit" echo "$chart $version $commit"
done done

View File

@@ -1,32 +0,0 @@
#!/bin/bash
source ./modules/colors.sh
function check_helmrelease_status() {
local release_name="$1"
local namespace="$2"
local timeout=300 # Timeout in seconds
local interval=5 # Interval between checks in seconds
local elapsed=0
while [[ $elapsed -lt $timeout ]]; do
local status_output
status_output=$(kubectl get helmrelease "$release_name" -n "$namespace" -o json | jq -r '.status.conditions[-1].reason')
if [[ "$status_output" == "InstallSucceeded" ]]; then
echo -e "${GREEN}Helm release '$release_name' is ready.${RESET}"
return 0
elif [[ "$status_output" == "InstallFailed" ]]; then
echo -e "${RED}Helm release '$release_name': InstallFailed${RESET}"
exit 1
else
echo -e "${YELLOW}Helm release '$release_name' is not ready. Current status: $status_output${RESET}"
fi
sleep "$interval"
elapsed=$((elapsed + interval))
done
echo -e "${RED}Timeout reached. Helm release '$release_name' is still not ready after $timeout seconds.${RESET}"
exit 1
}

View File

@@ -1,6 +0,0 @@
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
RESET='\033[0m'
YELLOW='\033[0;33m'

View File

@@ -1,6 +0,0 @@
tenant
http-cache
mysql
rabbitmq
virtual-machine
vpn

View File

@@ -1,66 +0,0 @@
#!/bin/bash
source ./modules/colors.sh
# Function to load ignored charts from a file
function load_ignored_charts() {
local ignore_file="$1"
local ignored_charts=()
if [[ -f "$ignore_file" ]]; then
while IFS= read -r chart; do
ignored_charts+=("$chart")
done < "$ignore_file"
else
echo "Ignore file not found: $ignore_file"
fi
# Return the array of ignored charts
echo "${ignored_charts[@]}"
}
# Function to check if a chart is in the ignored list
function is_chart_ignored() {
local chart_name="$1"
shift
local ignored_charts=("$@")
for ignored_chart in "${ignored_charts[@]}"; do
if [[ "$ignored_chart" == "$chart_name" ]]; then
return 0
fi
done
return 1
}
function install_all_apps() {
local charts_dir="$1"
local namespace="$2"
local repo_name="$3"
local repo_ns="$4"
local ignore_file="./modules/ignored_charts"
local ignored_charts
ignored_charts=($(load_ignored_charts "$ignore_file"))
for chart_path in "$charts_dir"/*; do
if [[ -d "$chart_path" ]]; then
local chart_name
chart_name=$(basename "$chart_path")
# Check if the chart is in the ignored list
if is_chart_ignored "$chart_name" "${ignored_charts[@]}"; then
echo "Skipping chart: $chart_name (listed in ignored charts)"
continue
fi
release_name="$chart_name-e2e"
echo "Installing release: $release_name"
install_helmrelease "$release_name" "$namespace" "$chart_name" "$repo_name" "$repo_ns"
echo "Checking status for HelmRelease: $release_name"
check_helmrelease_status "$release_name" "$namespace"
else
echo "$chart_path is not a directory. Skipping."
fi
done
}

View File

@@ -1,60 +0,0 @@
#!/bin/bash
source ./modules/colors.sh
function install_helmrelease() {
local release_name="$1"
local namespace="$2"
local chart_path="$3"
local repo_name="$4"
local repo_ns="$5"
local values_file="$6"
if [[ -z "$release_name" ]]; then
echo -e "${RED}Error: Release name is required.${RESET}"
exit 1
fi
if [[ -z "$namespace" ]]; then
echo -e "${RED}Error: Namespace name is required.${RESET}"
exit 1
fi
if [[ -z "$chart_path" ]]; then
echo -e "${RED}Error: Chart path name is required.${RESET}"
exit 1
fi
local helmrelease_file=$(mktemp /tmp/HelmRelease.XXXXXX.yaml)
{
echo "apiVersion: helm.toolkit.fluxcd.io/v2"
echo "kind: HelmRelease"
echo "metadata:"
echo " labels:"
echo " cozystack.io/ui: \"true\""
echo " name: \"$release_name\""
echo " namespace: \"$namespace\""
echo "spec:"
echo " chart:"
echo " spec:"
echo " chart: \"$chart_path\""
echo " reconcileStrategy: Revision"
echo " sourceRef:"
echo " kind: HelmRepository"
echo " name: \"$repo_name\""
echo " namespace: \"$repo_ns\""
echo " version: '*'"
echo " interval: 1m0s"
echo " timeout: 5m0s"
if [[ -n "$values_file" && -f "$values_file" ]]; then
echo " values:"
cat "$values_file" | sed 's/^/ /'
fi
} > "$helmrelease_file"
kubectl apply -f "$helmrelease_file"
rm -f "$helmrelease_file"
}

View File

@@ -1,11 +0,0 @@
#!/bin/bash
function install_tenant (){
local release_name="$1"
local namespace="$2"
local values_file="${3:-tenant.yaml}"
local repo_name="cozystack-apps"
local repo_ns="cozy-public"
install_helmrelease "$release_name" "$namespace" "tenant" "$repo_name" "$repo_ns" "$values_file"
}

View File

@@ -1,23 +0,0 @@
#!/bin/bash
YQ_VERSION="v4.35.1"
RED='\033[31m'
RESET='\033[0m'
check-yq-version() {
current_version=$(yq -V | awk '$(NF-1) == "version" {print $NF}')
if [ -z "$current_version" ]; then
echo "yq is not installed or version cannot be determined."
exit 1
fi
echo "Current yq version: $current_version"
if [ "$(printf '%s\n' "$YQ_VERSION" "$current_version" | sort -V | head -n1)" = "$YQ_VERSION" ]; then
echo "Greater than or equal to $YQ_VERSION"
else
echo -e "${RED}ERROR: yq version less than $YQ_VERSION${RESET}"
exit 1
fi
}
check-yq-version

View File

@@ -1,6 +0,0 @@
host: ""
etcd: false
monitoring: true
ingress: false
seaweedfs: true
isolated: true

View File

@@ -68,7 +68,7 @@ spec:
serviceAccountName: cozystack serviceAccountName: cozystack
containers: containers:
- name: cozystack - name: cozystack
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.16.5" image: "ghcr.io/aenix-io/cozystack/cozystack:v0.10.1"
env: env:
- name: KUBERNETES_SERVICE_HOST - name: KUBERNETES_SERVICE_HOST
value: localhost value: localhost
@@ -87,7 +87,7 @@ spec:
fieldRef: fieldRef:
fieldPath: metadata.name fieldPath: metadata.name
- name: darkhttpd - name: darkhttpd
image: "ghcr.io/aenix-io/cozystack/cozystack:v0.16.5" image: "ghcr.io/aenix-io/cozystack/cozystack:v0.10.1"
command: command:
- /usr/bin/darkhttpd - /usr/bin/darkhttpd
- /cozystack/assets - /cozystack/assets

View File

@@ -1,9 +0,0 @@
### How to test packages local
```bash
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete pod dashboard-redis-master-0 -n cozy-dashboard
kubectl delete po -l app=source-controller -n cozy-fluxcd
```

View File

@@ -1,4 +1,2 @@
include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md

View File

@@ -9,12 +9,4 @@ rules:
- secrets - secrets
resourceNames: resourceNames:
- {{ .Release.Name }} - {{ .Release.Name }}
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
resourceNames:
- {{ .Release.Name }}-ui
verbs: ["get", "list", "watch"] verbs: ["get", "list", "watch"]

View File

@@ -1,18 +0,0 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: {{ .Release.Name }}-system
spec:
chart:
spec:
chart: cozy-bucket
reconcileStrategy: Revision
sourceRef:
kind: HelmRepository
name: cozystack-system
namespace: cozy-system
version: '*'
interval: 1m0s
timeout: 5m0s
values:
bucketName: {{ .Release.Name }}

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0 version: 0.2.1
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,20 +1,2 @@
CLICKHOUSE_BACKUP_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md
image:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/clickhouse-backup \
--provenance false \
--tag $(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/clickhouse-backup:latest \
--cache-to type=inline \
--metadata-file images/clickhouse-backup.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/clickhouse-backup:$(call settag,$(CLICKHOUSE_BACKUP_TAG))@$$(yq e '."containerimage.digest"' images/clickhouse-backup.json -o json -r)" \
> images/clickhouse-backup.tag
rm -f images/clickhouse-backup.json

View File

@@ -1,46 +1,17 @@
# Managed Clickhouse Service # Managed Clickhouse Service
### How to restore backup:
find snapshot:
```
restic -r s3:s3.example.org/clickhouse-backups/table_name snapshots
```
restore:
```
restic -r s3:s3.example.org/clickhouse-backups/table_name restore latest --target /tmp/
```
more details:
- https://itnext.io/restic-effective-backup-from-stdin-4bc1e8f083c1
## Parameters ## Parameters
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| -------------- | ----------------------------------- | ------ | | ---------- | ----------------------------- | ------ |
| `size` | Persistent Volume size | `10Gi` | | `size` | Persistent Volume size | `10Gi` |
| `shards` | Number of Clickhouse replicas | `1` | | `shards` | Number of Clickhouse replicas | `1` |
| `replicas` | Number of Clickhouse shards | `2` | | `replicas` | Number of Clickhouse shards | `2` |
| `storageClass` | StorageClass used to store the data | `""` |
### Configuration parameters ### Configuration parameters
| Name | Description | Value | | Name | Description | Value |
| ------- | ------------------- | ----- | | ------- | ------------------- | ----- |
| `users` | Users configuration | `{}` | | `users` | Users configuration | `{}` |
### Backup parameters
| Name | Description | Value |
| ------------------------ | ---------------------------------------------- | ------------------------------------------------------ |
| `backup.enabled` | Enable pereiodic backups | `false` |
| `backup.s3Region` | The AWS S3 region where backups are stored | `us-east-1` |
| `backup.s3Bucket` | The S3 bucket used for storing backups | `s3.example.org/clickhouse-backups` |
| `backup.schedule` | Cron schedule for automated backups | `0 2 * * *` |
| `backup.cleanupStrategy` | The strategy for cleaning up old backups | `--keep-last=3 --keep-daily=3 --keep-within-weekly=1m` |
| `backup.s3AccessKey` | The access key for S3, used for authentication | `oobaiRus9pah8PhohL1ThaeTa4UVa7gu` |
| `backup.s3SecretKey` | The secret key for S3, used for authentication | `ju3eum4dekeich9ahM1te8waeGai0oog` |
| `backup.resticPassword` | The password for Restic backup encryption | `ChaXoveekoh6eigh4siesheeda2quai0` |

View File

@@ -1 +0,0 @@
ghcr.io/aenix-io/cozystack/clickhouse-backup:0.5.0@sha256:dda84420cb8648721299221268a00d72a05c7af5b7fb452619bac727068b9e61

View File

@@ -1,2 +0,0 @@
FROM clickhouse/clickhouse-server:24.8.4-alpine
RUN apk add --no-cache restic uuidgen

View File

@@ -1,95 +0,0 @@
{{- if .Values.backup.enabled }}
{{ $image := .Files.Get "images/backup.json" | fromJson }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ .Release.Name }}-backup
spec:
schedule: "{{ .Values.backup.schedule }}"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
backoffLimit: 2
template:
spec:
restartPolicy: OnFailure
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/backup-script.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/backup-secret.yaml") . | sha256sum }}
spec:
imagePullSecrets:
- name: {{ .Release.Name }}-regsecret
restartPolicy: Never
containers:
- name: clickhouse-backup
image: "{{ $.Files.Get "images/clickhouse-backup.tag" | trim }}"
command:
- /bin/sh
- -x
- /scripts/backup.sh
env:
- name: REPO_PREFIX
value: {{ required "s3Bucket is not specified!" .Values.backup.s3Bucket | quote }}
- name: CLEANUP_STRATEGY
value: {{ required "cleanupPolicy is not specified!" .Values.backup.cleanupStrategy | quote }}
- name: CLICKHOUSE_USER
value: backup
- name: CLICKHOUSE_HOST
value: chi-{{ .Release.Name }}-clickhouse-0-0
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-credentials
key: backup
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-backup
key: s3AccessKey
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-backup
key: s3SecretKey
- name: AWS_DEFAULT_REGION
value: {{ .Values.backup.s3Region }}
- name: RESTIC_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-backup
key: resticPassword
volumeMounts:
- mountPath: /scripts
name: scripts
- mountPath: /tmp
name: tmp
- mountPath: /.cache
name: cache
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
volumes:
- name: scripts
secret:
secretName: {{ .Release.Name }}-backup-script
- name: tmp
emptyDir: {}
- name: cache
emptyDir: {}
securityContext:
runAsNonRoot: true
runAsUser: 9000
runAsGroup: 9000
seccompProfile:
type: RuntimeDefault
{{- end }}

View File

@@ -1,55 +0,0 @@
{{- if .Values.backup.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-backup-script
stringData:
backup.sh: |
#!/bin/sh
set -e
set -o pipefail
JOB_ID="job-$(uuidgen|cut -f1 -d-)"
TABLE_LIST=$(clickhouse-client --host "$CLICKHOUSE_HOST" -q 'SHOW TABLES;' | grep -v '^.inner.' || true)
echo DB_LIST=$(echo "$TABLE_LIST" | shuf) # shuffle list
echo "Job ID: $JOB_ID"
echo "Target repo: $REPO_PREFIX"
echo "Cleanup strategy: $CLEANUP_STRATEGY"
echo "Start backup for:"
echo "$TABLE_LIST"
echo
echo "Backup started at `date +%Y-%m-%d\ %H:%M:%S`"
for table in $TABLE_LIST; do
(
set -x
restic -r "s3:${REPO_PREFIX}/$table" cat config >/dev/null 2>&1 || \
restic -r "s3:${REPO_PREFIX}/$table" init --repository-version 2
restic -r "s3:${REPO_PREFIX}/$table" unlock --remove-all >/dev/null 2>&1 || true # no locks, k8s takes care of it
clickhouse-client --host "$CLICKHOUSE_HOST" -q "SHOW CREATE TABLE ${table}" | awk '{gsub(/\\n/, "\n")} {gsub(/\\'\''/, "'\''")} 1' | \
restic -r "s3:${REPO_PREFIX}/$table" backup --tag "$JOB_ID" --tag index --stdin --stdin-filename index.sql
clickhouse-client --host "$CLICKHOUSE_HOST" -q "SELECT * FROM ${table} FORMAT TabSeparated" | \
restic -r "s3:${REPO_PREFIX}/$table" backup --tag "$JOB_ID" --tag data --stdin --stdin-filename data.tsv
restic -r "s3:${REPO_PREFIX}/$table" tag --tag "$JOB_ID" --set "completed"
)
done
echo "Backup finished at `date +%Y-%m-%d\ %H:%M:%S`"
echo
echo "Run cleanup:"
echo
echo "Cleanup started at `date +%Y-%m-%d\ %H:%M:%S`"
for db in $DB_LIST; do
(
set -x
# keep completed snapshots only
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags --keep-tag "completed" --tag index
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags --keep-tag "completed" --tag data
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags $CLEANUP_STRATEGY --tag index
restic forget -r "s3:${REPO_PREFIX}/$db" --group-by=tags $CLEANUP_STRATEGY --tag data
restic prune -r "s3:${REPO_PREFIX}/$db"
)
done
echo "Cleanup finished at `date +%Y-%m-%d\ %H:%M:%S`"
{{- end }}

View File

@@ -1,11 +0,0 @@
{{- if .Values.backup.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-backup
stringData:
s3AccessKey: {{ required "s3AccessKey is not specified!" .Values.backup.s3AccessKey }}
s3SecretKey: {{ required "s3SecretKey is not specified!" .Values.backup.s3SecretKey }}
resticPassword: {{ required "resticPassword is not specified!" .Values.backup.resticPassword }}
{{- end }}

View File

@@ -1,32 +1,3 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
{{- $passwords := dict }}
{{- $users := .Values.users }}
{{- $_ := set $users "backup" dict }}
{{- with (index $existingSecret "data") }}
{{- range $k, $v := . }}
{{- $_ := set $passwords $k (b64dec $v) }}
{{- end }}
{{- end }}
{{- range $user, $u := $users }}
{{- if $u.password }}
{{- $_ := set $passwords $user $u.password }}
{{- else if not (index $passwords $user) }}
{{- $_ := set $passwords $user (randAlphaNum 16) }}
{{- end }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-credentials
stringData:
{{- range $user, $u := .Values.users }}
{{ quote $user }}: {{ quote (index $passwords $user) }}
{{- end }}
---
apiVersion: "clickhouse.altinity.com/v1" apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallation" kind: "ClickHouseInstallation"
metadata: metadata:
@@ -38,10 +9,10 @@ spec:
dataVolumeClaimTemplate: data-volume-template dataVolumeClaimTemplate: data-volume-template
{{- end }} {{- end }}
configuration: configuration:
{{- with $users }} {{- with .Values.users }}
users: users:
{{- range $name, $u := . }} {{- range $name, $u := . }}
{{ $name }}/password_sha256_hex: {{ sha256sum (index $passwords $name) }} {{ $name }}/password_sha256_hex: {{ sha256sum $u.password }}
{{ $name }}/profile: {{ ternary "readonly" "default" (index $u "readonly" | default false) }} {{ $name }}/profile: {{ ternary "readonly" "default" (index $u "readonly" | default false) }}
{{ $name }}/networks/ip: ["::/0"] {{ $name }}/networks/ip: ["::/0"]
{{- end }} {{- end }}
@@ -60,9 +31,6 @@ spec:
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
{{- with $.Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
resources: resources:
requests: requests:
storage: {{ . }} storage: {{ . }}

View File

@@ -1,19 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- services
resourceNames:
- chi-clickhouse-test-clickhouse-0-0
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]

View File

@@ -16,56 +16,6 @@
"type": "number", "type": "number",
"description": "Number of Clickhouse shards", "description": "Number of Clickhouse shards",
"default": 2 "default": 2
},
"storageClass": {
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"backup": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable pereiodic backups",
"default": false
},
"s3Region": {
"type": "string",
"description": "The AWS S3 region where backups are stored",
"default": "us-east-1"
},
"s3Bucket": {
"type": "string",
"description": "The S3 bucket used for storing backups",
"default": "s3.example.org/clickhouse-backups"
},
"schedule": {
"type": "string",
"description": "Cron schedule for automated backups",
"default": "0 2 * * *"
},
"cleanupStrategy": {
"type": "string",
"description": "The strategy for cleaning up old backups",
"default": "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
},
"s3AccessKey": {
"type": "string",
"description": "The access key for S3, used for authentication",
"default": "oobaiRus9pah8PhohL1ThaeTa4UVa7gu"
},
"s3SecretKey": {
"type": "string",
"description": "The secret key for S3, used for authentication",
"default": "ju3eum4dekeich9ahM1te8waeGai0oog"
},
"resticPassword": {
"type": "string",
"description": "The password for Restic backup encryption",
"default": "ChaXoveekoh6eigh4siesheeda2quai0"
}
}
} }
} }
} }

View File

@@ -3,12 +3,10 @@
## @param size Persistent Volume size ## @param size Persistent Volume size
## @param shards Number of Clickhouse replicas ## @param shards Number of Clickhouse replicas
## @param replicas Number of Clickhouse shards ## @param replicas Number of Clickhouse shards
## @param storageClass StorageClass used to store the data
## ##
size: 10Gi size: 10Gi
shards: 1 shards: 1
replicas: 2 replicas: 2
storageClass: ""
## @section Configuration parameters ## @section Configuration parameters
@@ -22,23 +20,3 @@ storageClass: ""
## password: hackme ## password: hackme
## ##
users: {} users: {}
## @section Backup parameters
## @param backup.enabled Enable pereiodic backups
## @param backup.s3Region The AWS S3 region where backups are stored
## @param backup.s3Bucket The S3 bucket used for storing backups
## @param backup.schedule Cron schedule for automated backups
## @param backup.cleanupStrategy The strategy for cleaning up old backups
## @param backup.s3AccessKey The access key for S3, used for authentication
## @param backup.s3SecretKey The secret key for S3, used for authentication
## @param backup.resticPassword The password for Restic backup encryption
backup:
enabled: false
s3Region: us-east-1
s3Bucket: s3.example.org/clickhouse-backups
schedule: "0 2 * * *"
cleanupStrategy: "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
s3AccessKey: oobaiRus9pah8PhohL1ThaeTa4UVa7gu
s3SecretKey: ju3eum4dekeich9ahM1te8waeGai0oog
resticPassword: ChaXoveekoh6eigh4siesheeda2quai0

View File

@@ -16,10 +16,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.1 version: 0.1.0
# This is the version number of the application being deployed. This version number should be # 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 # 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. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "1.24.0" appVersion: "1.22.0"

View File

@@ -1,4 +1,2 @@
include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md

View File

@@ -9,7 +9,6 @@
| `external` | Enable external access from outside the cluster | `false` | | `external` | Enable external access from outside the cluster | `false` |
| `size` | Persistent Volume size | `10Gi` | | `size` | Persistent Volume size | `10Gi` |
| `replicas` | Number of Postgres replicas | `2` | | `replicas` | Number of Postgres replicas | `2` |
| `storageClass` | StorageClass used to store the data | `""` |
| `quorum.minSyncReplicas` | Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed. | `0` | | `quorum.minSyncReplicas` | Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed. | `0` |
| `quorum.maxSyncReplicas` | Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances). | `0` | | `quorum.maxSyncReplicas` | Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances). | `0` |

View File

@@ -1 +0,0 @@
ghcr.io/aenix-io/cozystack/postgres-backup:0.7.0@sha256:d2015c6dba92293bda652d055e97d1be80e8414c2dc78037c12812d1a2e2cba1

View File

@@ -24,8 +24,8 @@ spec:
spec: spec:
restartPolicy: Never restartPolicy: Never
containers: containers:
- name: pgdump - name: mysqldump
image: "{{ $.Files.Get "images/postgres-backup.tag" | trim }}" image: "{{ index $image "image.name" }}@{{ index $image "containerimage.digest" }}"
command: command:
- /bin/sh - /bin/sh
- /scripts/backup.sh - /scripts/backup.sh

View File

@@ -1,19 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- services
resourceNames:
- {{ .Release.Name }}
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-credentials
verbs: ["get", "list", "watch"]

View File

@@ -15,7 +15,7 @@ spec:
spec: spec:
containers: containers:
- name: ferretdb - name: ferretdb
image: ghcr.io/ferretdb/ferretdb:1.24.0 image: ghcr.io/ferretdb/ferretdb:1.22.0
ports: ports:
- containerPort: 27017 - containerPort: 27017
env: env:

View File

@@ -1,30 +1,3 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (printf "%s-credentials" .Release.Name) }}
{{- $passwords := dict }}
{{- with (index $existingSecret "data") }}
{{- range $k, $v := . }}
{{- $_ := set $passwords $k (b64dec $v) }}
{{- end }}
{{- end }}
{{- range $user, $u := .Values.users }}
{{- if $u.password }}
{{- $_ := set $passwords $user $u.password }}
{{- else if not (index $passwords $user) }}
{{- $_ := set $passwords $user (randAlphaNum 16) }}
{{- end }}
{{- end }}
{{- if .Values.users }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-credentials
stringData:
{{- range $user, $u := .Values.users }}
{{ quote $user }}: {{ quote (index $passwords $user) }}
{{- end }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -34,16 +7,13 @@ stringData:
init.sh: | init.sh: |
#!/bin/bash #!/bin/bash
set -e set -e
until pg_isready ; do sleep 5; done
echo "== create users" echo "== create users"
{{- if .Values.users }} {{- if .Values.users }}
psql -v ON_ERROR_STOP=1 <<\EOT psql -v ON_ERROR_STOP=1 <<\EOT
{{- range $user, $u := .Values.users }} {{- range $user, $u := .Values.users }}
SELECT 'CREATE ROLE {{ $user }} LOGIN INHERIT;' SELECT 'CREATE ROLE {{ $user }} LOGIN INHERIT;'
WHERE NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '{{ $user }}')\gexec WHERE NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = '{{ $user }}')\gexec
ALTER ROLE {{ $user }} WITH PASSWORD '{{ index $passwords $user }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }}; ALTER ROLE {{ $user }} WITH PASSWORD '{{ $u.password }}' LOGIN INHERIT {{ ternary "REPLICATION" "NOREPLICATION" (default false $u.replication) }};
COMMENT ON ROLE {{ $user }} IS 'user managed by helm'; COMMENT ON ROLE {{ $user }} IS 'user managed by helm';
{{- end }} {{- end }}
EOT EOT
@@ -63,7 +33,7 @@ stringData:
DROP USER $user; DROP USER $user;
EOT EOT
done done
echo "== create roles" echo "== create roles"
psql -v ON_ERROR_STOP=1 --echo-all <<\EOT psql -v ON_ERROR_STOP=1 --echo-all <<\EOT
SELECT 'CREATE ROLE app_admin NOINHERIT;' SELECT 'CREATE ROLE app_admin NOINHERIT;'
@@ -83,7 +53,7 @@ stringData:
FOR schema_record IN SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('pg_catalog', 'information_schema') LOOP FOR schema_record IN SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('pg_catalog', 'information_schema') LOOP
-- Changing Schema Ownership -- Changing Schema Ownership
EXECUTE format('ALTER SCHEMA %I OWNER TO %I', schema_record.schema_name, 'app_admin'); EXECUTE format('ALTER SCHEMA %I OWNER TO %I', schema_record.schema_name, 'app_admin');
-- Add rights for the admin role -- Add rights for the admin role
EXECUTE format('GRANT ALL ON SCHEMA %I TO %I', schema_record.schema_name, 'app_admin'); EXECUTE format('GRANT ALL ON SCHEMA %I TO %I', schema_record.schema_name, 'app_admin');
EXECUTE format('GRANT ALL ON ALL TABLES IN SCHEMA %I TO %I', schema_record.schema_name, 'app_admin'); EXECUTE format('GRANT ALL ON ALL TABLES IN SCHEMA %I TO %I', schema_record.schema_name, 'app_admin');

View File

@@ -15,9 +15,6 @@ spec:
storage: storage:
size: {{ required ".Values.size is required" .Values.size }} size: {{ required ".Values.size is required" .Values.size }}
{{- with .Values.storageClass }}
storageClass: {{ . }}
{{- end }}
inheritedMetadata: inheritedMetadata:
labels: labels:

View File

@@ -17,11 +17,6 @@
"description": "Number of Postgres replicas", "description": "Number of Postgres replicas",
"default": 2 "default": 2
}, },
"storageClass": {
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"quorum": { "quorum": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -3,12 +3,10 @@
## @param external Enable external access from outside the cluster ## @param external Enable external access from outside the cluster
## @param size Persistent Volume size ## @param size Persistent Volume size
## @param replicas Number of Postgres replicas ## @param replicas Number of Postgres replicas
## @param storageClass StorageClass used to store the data
## ##
external: false external: false
size: 10Gi size: 10Gi
replicas: 2 replicas: 2
storageClass: ""
## Configuration for the quorum-based synchronous replication ## Configuration for the quorum-based synchronous replication
## @param quorum.minSyncReplicas Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed. ## @param quorum.minSyncReplicas Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed.

View File

@@ -0,0 +1,56 @@
## @section Common parameters
## @param external Enable external access from outside the cluster
## @param size Persistent Volume size
## @param replicas Number of Postgres replicas
##
external: false
size: 10Gi
replicas: 1
## Configuration for the quorum-based synchronous replication
## @param quorum.minSyncReplicas Minimum number of synchronous replicas that must acknowledge a transaction before it is considered committed.
## @param quorum.maxSyncReplicas Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances).
quorum:
minSyncReplicas: 0
maxSyncReplicas: 0
## @section Configuration parameters
## @param users [object] Users configuration
## Example:
## users:
## user1:
## password: strongpassword
## user2:
## password: hackme
##
users:
foo:
password: asd
bar:
password: asd
baz:
password: asd
boo:
password: asd
## @section Backup parameters
## @param backup.enabled Enable pereiodic backups
## @param backup.s3Region The AWS S3 region where backups are stored
## @param backup.s3Bucket The S3 bucket used for storing backups
## @param backup.schedule Cron schedule for automated backups
## @param backup.cleanupStrategy The strategy for cleaning up old backups
## @param backup.s3AccessKey The access key for S3, used for authentication
## @param backup.s3SecretKey The secret key for S3, used for authentication
## @param backup.resticPassword The password for Restic backup encryption
backup:
enabled: false
s3Region: us-east-1
s3Bucket: s3.example.org/postgres-backups
schedule: "0 2 * * *"
cleanupStrategy: "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
s3AccessKey: oobaiRus9pah8PhohL1ThaeTa4UVa7gu
s3SecretKey: ju3eum4dekeich9ahM1te8waeGai0oog
resticPassword: ChaXoveekoh6eigh4siesheeda2quai0

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: http-cache name: http-cache
description: Layer7 load balancer and caching service description: Layer7 load balacner and caching service
icon: /logos/nginx.svg icon: /logos/nginx.svg
# A chart can be either an 'application' or a 'library' chart. # A chart can be either an 'application' or a 'library' chart.
@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.1 version: 0.2.0
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,7 +1,6 @@
NGINX_CACHE_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml) NGINX_CACHE_TAG = v0.1.0
include ../../../scripts/common-envs.mk include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
image: image-nginx image: image-nginx
@@ -9,6 +8,7 @@ image-nginx:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/nginx-cache \ docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/nginx-cache \
--provenance false \ --provenance false \
--tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)) \ --tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)) \
--tag $(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/nginx-cache:latest \ --cache-from type=registry,ref=$(REGISTRY)/nginx-cache:latest \
--cache-to type=inline \ --cache-to type=inline \
--metadata-file images/nginx-cache.json \ --metadata-file images/nginx-cache.json \

View File

@@ -64,7 +64,6 @@ VTS module shows wrong upstream resonse time
| ------------------ | ----------------------------------------------- | ------- | | ------------------ | ----------------------------------------------- | ------- |
| `external` | Enable external access from outside the cluster | `false` | | `external` | Enable external access from outside the cluster | `false` |
| `size` | Persistent Volume size | `10Gi` | | `size` | Persistent Volume size | `10Gi` |
| `storageClass` | StorageClass used to store the data | `""` |
| `haproxy.replicas` | Number of HAProxy replicas | `2` | | `haproxy.replicas` | Number of HAProxy replicas | `2` |
| `nginx.replicas` | Number of Nginx replicas | `2` | | `nginx.replicas` | Number of Nginx replicas | `2` |

View File

@@ -1 +1 @@
ghcr.io/aenix-io/cozystack/nginx-cache:0.3.1@sha256:cd744b2d1d50191f4908f2db83079b32973d1c009fe9468627be72efbfa0a107 ghcr.io/aenix-io/cozystack/nginx-cache:v0.1.0@sha256:f77d5b63f1ed9dfda4725696d9170130939219a2465260b6ba941947460de2da

View File

@@ -114,9 +114,6 @@ spec:
resources: resources:
requests: requests:
storage: "{{ $.Values.size }}" storage: "{{ $.Values.size }}"
{{- with $.Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service

View File

@@ -12,11 +12,6 @@
"description": "Persistent Volume size", "description": "Persistent Volume size",
"default": "10Gi" "default": "10Gi"
}, },
"storageClass": {
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"haproxy": { "haproxy": {
"type": "object", "type": "object",
"properties": { "properties": {

View File

@@ -3,13 +3,11 @@
## @param external Enable external access from outside the cluster ## @param external Enable external access from outside the cluster
## @param size Persistent Volume size ## @param size Persistent Volume size
## @param storageClass StorageClass used to store the data
## @param haproxy.replicas Number of HAProxy replicas ## @param haproxy.replicas Number of HAProxy replicas
## @param nginx.replicas Number of Nginx replicas ## @param nginx.replicas Number of Nginx replicas
## ##
external: false external: false
size: 10Gi size: 10Gi
storageClass: ""
haproxy: haproxy:
replicas: 2 replicas: 2
nginx: nginx:

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0 version: 0.2.2
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,4 +1,2 @@
include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md

View File

@@ -4,15 +4,13 @@
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| ------------------------ | ----------------------------------------------- | ------- | | -------------------- | ----------------------------------------------- | ------- |
| `external` | Enable external access from outside the cluster | `false` | | `external` | Enable external access from outside the cluster | `false` |
| `kafka.size` | Persistent Volume size for Kafka | `10Gi` | | `kafka.size` | Persistent Volume size for Kafka | `10Gi` |
| `kafka.replicas` | Number of Kafka replicas | `3` | | `kafka.replicas` | Number of Kafka replicas | `3` |
| `kafka.storageClass` | StorageClass used to store the Kafka data | `""` | | `zookeeper.size` | Persistent Volume size for ZooKeeper | `5Gi` |
| `zookeeper.size` | Persistent Volume size for ZooKeeper | `5Gi` | | `zookeeper.replicas` | Number of ZooKeeper replicas | `3` |
| `zookeeper.replicas` | Number of ZooKeeper replicas | `3` |
| `zookeeper.storageClass` | StorageClass used to store the ZooKeeper data | `""` |
### Configuration parameters ### Configuration parameters

View File

@@ -53,9 +53,6 @@ spec:
{{- with .Values.kafka.size }} {{- with .Values.kafka.size }}
size: {{ . }} size: {{ . }}
{{- end }} {{- end }}
{{- with .Values.kafka.storageClass }}
class: {{ . }}
{{- end }}
deleteClaim: true deleteClaim: true
zookeeper: zookeeper:
replicas: {{ .Values.zookeeper.replicas }} replicas: {{ .Values.zookeeper.replicas }}
@@ -64,9 +61,6 @@ spec:
{{- with .Values.zookeeper.size }} {{- with .Values.zookeeper.size }}
size: {{ . }} size: {{ . }}
{{- end }} {{- end }}
{{- with .Values.kafka.storageClass }}
class: {{ . }}
{{- end }}
deleteClaim: false deleteClaim: false
entityOperator: entityOperator:
topicOperator: {} topicOperator: {}
@@ -76,5 +70,3 @@ spec:
metadata: metadata:
labels: labels:
policy.cozystack.io/allow-to-apiserver: "true" policy.cozystack.io/allow-to-apiserver: "true"
spec:
enableServiceLinks: false

View File

@@ -19,11 +19,6 @@
"type": "number", "type": "number",
"description": "Number of Kafka replicas", "description": "Number of Kafka replicas",
"default": 3 "default": 3
},
"storageClass": {
"type": "string",
"description": "StorageClass used to store the Kafka data",
"default": ""
} }
} }
}, },
@@ -39,11 +34,6 @@
"type": "number", "type": "number",
"description": "Number of ZooKeeper replicas", "description": "Number of ZooKeeper replicas",
"default": 3 "default": 3
},
"storageClass": {
"type": "string",
"description": "StorageClass used to store the ZooKeeper data",
"default": ""
} }
} }
}, },

View File

@@ -4,20 +4,16 @@
## @param external Enable external access from outside the cluster ## @param external Enable external access from outside the cluster
## @param kafka.size Persistent Volume size for Kafka ## @param kafka.size Persistent Volume size for Kafka
## @param kafka.replicas Number of Kafka replicas ## @param kafka.replicas Number of Kafka replicas
## @param kafka.storageClass StorageClass used to store the Kafka data
## @param zookeeper.size Persistent Volume size for ZooKeeper ## @param zookeeper.size Persistent Volume size for ZooKeeper
## @param zookeeper.replicas Number of ZooKeeper replicas ## @param zookeeper.replicas Number of ZooKeeper replicas
## @param zookeeper.storageClass StorageClass used to store the ZooKeeper data
## ##
external: false external: false
kafka: kafka:
size: 10Gi size: 10Gi
replicas: 3 replicas: 3
storageClass: ""
zookeeper: zookeeper:
size: 5Gi size: 5Gi
replicas: 3 replicas: 3
storageClass: ""
## @section Configuration parameters ## @section Configuration parameters

View File

@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.12.1 version: 0.8.2
# This is the version number of the application being deployed. This version number should be # 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 # incremented each time you make changes to the application. Versions are not expected to

View File

@@ -1,13 +1,11 @@
UBUNTU_CONTAINER_DISK_TAG = v1.30.1 UBUNTU_CONTAINER_DISK_TAG = v1.30.1
KUBERNETES_PKG_TAG = $(shell awk '$$1 == "version:" {print $$2}' Chart.yaml)
include ../../../scripts/common-envs.mk include ../../../scripts/common-envs.mk
include ../../../scripts/package.mk
generate: generate:
readme-generator -v values.yaml -s values.schema.json -r README.md readme-generator -v values.yaml -s values.schema.json -r README.md
image: image-ubuntu-container-disk image-kubevirt-cloud-provider image-kubevirt-csi-driver image-cluster-autoscaler image: image-ubuntu-container-disk
image-ubuntu-container-disk: image-ubuntu-container-disk:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/ubuntu-container-disk \ docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/ubuntu-container-disk \
@@ -22,46 +20,3 @@ image-ubuntu-container-disk:
echo "$(REGISTRY)/ubuntu-container-disk:$(call settag,$(UBUNTU_CONTAINER_DISK_TAG))@$$(yq e '."containerimage.digest"' images/ubuntu-container-disk.json -o json -r)" \ echo "$(REGISTRY)/ubuntu-container-disk:$(call settag,$(UBUNTU_CONTAINER_DISK_TAG))@$$(yq e '."containerimage.digest"' images/ubuntu-container-disk.json -o json -r)" \
> images/ubuntu-container-disk.tag > images/ubuntu-container-disk.tag
rm -f images/ubuntu-container-disk.json rm -f images/ubuntu-container-disk.json
image-kubevirt-cloud-provider:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/kubevirt-cloud-provider \
--provenance false \
--tag $(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG)) \
--tag $(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kubevirt-cloud-provider:latest \
--cache-to type=inline \
--metadata-file images/kubevirt-cloud-provider.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/kubevirt-cloud-provider:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/kubevirt-cloud-provider.json -o json -r)" \
> images/kubevirt-cloud-provider.tag
rm -f images/kubevirt-cloud-provider.json
image-kubevirt-csi-driver:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/kubevirt-csi-driver \
--provenance false \
--tag $(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG)) \
--tag $(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/kubevirt-csi-driver:latest \
--cache-to type=inline \
--metadata-file images/kubevirt-csi-driver.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/kubevirt-csi-driver:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/kubevirt-csi-driver.json -o json -r)" \
> images/kubevirt-csi-driver.tag
rm -f images/kubevirt-csi-driver.json
image-cluster-autoscaler:
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/cluster-autoscaler \
--provenance false \
--tag $(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG)) \
--tag $(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG)-$(TAG)) \
--cache-from type=registry,ref=$(REGISTRY)/cluster-autoscaler:latest \
--cache-to type=inline \
--metadata-file images/cluster-autoscaler.json \
--push=$(PUSH) \
--load=$(LOAD)
echo "$(REGISTRY)/cluster-autoscaler:$(call settag,$(KUBERNETES_PKG_TAG))@$$(yq e '."containerimage.digest"' images/cluster-autoscaler.json -o json -r)" \
> images/cluster-autoscaler.tag
rm -f images/cluster-autoscaler.json

View File

@@ -31,22 +31,18 @@ kubectl get secret -n <namespace> kubernetes-<clusterName>-admin-kubeconfig -o g
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------ | | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` | | `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` |
| `controlPlane.replicas` | Number of replicas for Kubernetes contorl-plane components | `2` | | `controlPlane.replicas` | Number of replicas for Kubernetes contorl-plane components | `2` |
| `storageClass` | StorageClass used to store user data | `replicated` | | `nodeGroups` | nodeGroups configuration | `{}` |
| `nodeGroups` | nodeGroups configuration | `{}` |
### Cluster Addons ### Cluster Addons
| Name | Description | Value | | Name | Description | Value |
| ------------------------------------ | ---------------------------------------------------------------------------------- | ------- | | ----------------------------- | ---------------------------------------------------------------------------------- | ------- |
| `addons.certManager.enabled` | Enables the cert-manager | `false` | | `addons.certManager.enabled` | Enables the cert-manager | `false` |
| `addons.certManager.valuesOverride` | Custom values to override | `{}` | | `addons.ingressNginx.enabled` | Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role) | `false` |
| `addons.ingressNginx.enabled` | Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role) | `false` | | `addons.ingressNginx.hosts` | List of domain names that should be passed through to the cluster by upper cluster | `[]` |
| `addons.ingressNginx.valuesOverride` | Custom values to override | `{}` | | `addons.fluxcd.enabled` | Enables Flux CD | `false` |
| `addons.ingressNginx.hosts` | List of domain names that should be passed through to the cluster by upper cluster | `[]` |
| `addons.fluxcd.enabled` | Enables Flux CD | `false` |
| `addons.fluxcd.valuesOverride` | Custom values to override | `{}` |

View File

@@ -1 +0,0 @@
ghcr.io/aenix-io/cozystack/cluster-autoscaler:0.12.1@sha256:7f617de5a24de790a15d9e97c6287ff2b390922e6e74c7a665cbf498f634514d

View File

@@ -1,17 +0,0 @@
# Source: https://raw.githubusercontent.com/kubernetes/autoscaler/refs/heads/master/cluster-autoscaler/Dockerfile.amd64
ARG builder_image=docker.io/library/golang:1.22.5
ARG BASEIMAGE=gcr.io/distroless/static:nonroot-amd64
FROM ${builder_image} AS builder
RUN git clone https://github.com/kubernetes/autoscaler /src/autoscaler \
&& cd /src/autoscaler/cluster-autoscaler \
&& git checkout cluster-autoscaler-1.31.0
WORKDIR /src/autoscaler/cluster-autoscaler
RUN make build
FROM $BASEIMAGE
LABEL maintainer="Marcin Wielgus <mwielgus@google.com>"
COPY --from=builder /src/autoscaler/cluster-autoscaler/cluster-autoscaler-amd64 /cluster-autoscaler
WORKDIR /
CMD ["/cluster-autoscaler"]

View File

@@ -1 +0,0 @@
ghcr.io/aenix-io/cozystack/kubevirt-cloud-provider:0.12.1@sha256:ca606d6039ed43a48d4dfd98a91fd3cec120f08c1e221cd4e99ea94239389742

View File

@@ -1,21 +0,0 @@
# Source: https://github.com/kubevirt/cloud-provider-kubevirt/blob/main/build/images/kubevirt-cloud-controller-manager/Dockerfile
FROM --platform=linux/amd64 golang:1.20.6 AS builder
RUN git clone https://github.com/kubevirt/cloud-provider-kubevirt /go/src/kubevirt.io/cloud-provider-kubevirt \
&& cd /go/src/kubevirt.io/cloud-provider-kubevirt \
&& git checkout adbd6c27468b86b020cf38490e84f124ef24ab62
WORKDIR /go/src/kubevirt.io/cloud-provider-kubevirt
# see: https://github.com/kubevirt/cloud-provider-kubevirt/pull/291
ADD patches /patches
RUN git apply /patches/external-traffic-policy-local.diff
RUN go get 'k8s.io/endpointslice/util@v0.28' 'k8s.io/apiserver@v0.28'
RUN go mod tidy
RUN go mod vendor
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -ldflags="-s -w" -o bin/kubevirt-cloud-controller-manager ./cmd/kubevirt-cloud-controller-manager
FROM registry.access.redhat.com/ubi9/ubi-micro
COPY --from=builder /go/src/kubevirt.io/cloud-provider-kubevirt/bin/kubevirt-cloud-controller-manager /bin/kubevirt-cloud-controller-manager
ENTRYPOINT [ "/bin/kubevirt-cloud-controller-manager" ]

View File

@@ -1 +0,0 @@
ghcr.io/aenix-io/cozystack/kubevirt-csi-driver:0.12.1@sha256:86029548078960feecca116087b2135230d676b83c503f292eb50e1199be2790

View File

@@ -1,25 +0,0 @@
# Source: https://github.com/kubevirt/csi-driver/blob/main/Dockerfile
ARG builder_image=docker.io/library/golang:1.22.5
FROM ${builder_image} AS builder
RUN git clone https://github.com/kubevirt/csi-driver /src/kubevirt-csi-driver \
&& cd /src/kubevirt-csi-driver \
&& git checkout 35836e0c8b68d9916d29a838ea60cdd3fc6199cf
WORKDIR /src/kubevirt-csi-driver
RUN make build
FROM quay.io/centos/centos:stream9
ARG git_url=https://github.com/kubevirt/csi-driver.git
LABEL maintainers="The KubeVirt Project <kubevirt-dev@googlegroups.com>" \
description="KubeVirt CSI Driver" \
multi.GIT_URL=${git_url}
ENTRYPOINT ["./kubevirt-csi-driver"]
RUN dnf install -y e2fsprogs xfsprogs && dnf clean all
ARG git_sha=NONE
LABEL multi.GIT_SHA=${git_sha}
COPY --from=builder /src/kubevirt-csi-driver/kubevirt-csi-driver .

View File

@@ -1 +1 @@
ghcr.io/aenix-io/cozystack/ubuntu-container-disk:v1.30.1@sha256:1f249fbe52821a62f706c6038b13401234e1b758ac498e53395b8f9a642b015f ghcr.io/aenix-io/cozystack/ubuntu-container-disk:v1.30.1@sha256:81caf89efe252ae2ca1990d08a3a314552d70ff36bcd4022b173c7150fbec805

View File

@@ -7,6 +7,4 @@ data:
loadBalancer: loadBalancer:
creationPollInterval: 5 creationPollInterval: 5
creationPollTimeout: 60 creationPollTimeout: 60
enableEPSController: true
selectorless: true
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}

View File

@@ -16,7 +16,6 @@ spec:
app: {{ .Release.Name }}-cluster-autoscaler app: {{ .Release.Name }}-cluster-autoscaler
policy.cozystack.io/allow-to-apiserver: "true" policy.cozystack.io/allow-to-apiserver: "true"
spec: spec:
enableServiceLinks: false
tolerations: tolerations:
- key: CriticalAddonsOnly - key: CriticalAddonsOnly
operator: Exists operator: Exists
@@ -24,7 +23,7 @@ spec:
operator: Exists operator: Exists
effect: "NoSchedule" effect: "NoSchedule"
containers: containers:
- image: "{{ $.Files.Get "images/cluster-autoscaler.tag" | trim }}" - image: ghcr.io/kvaps/test:cluster-autoscaller
name: cluster-autoscaler name: cluster-autoscaler
command: command:
- /cluster-autoscaler - /cluster-autoscaler

View File

@@ -18,8 +18,6 @@ spec:
runStrategy: Always runStrategy: Always
template: template:
metadata: metadata:
annotations:
kubevirt.io/allow-pod-bridge-network-live-migration: "true"
labels: labels:
{{- range .group.roles }} {{- range .group.roles }}
node-role.kubernetes.io/{{ . }}: "" node-role.kubernetes.io/{{ . }}: ""
@@ -40,9 +38,7 @@ spec:
disk: disk:
bus: virtio bus: virtio
pciAddress: 0000:08:00.0 pciAddress: 0000:08:00.0
interfaces: networkInterfaceMultiqueue: true
- name: default
bridge: {}
memory: memory:
guest: {{ .group.resources.memory }} guest: {{ .group.resources.memory }}
evictionStrategy: External evictionStrategy: External
@@ -53,9 +49,6 @@ spec:
- name: ephemeral - name: ephemeral
emptyDisk: emptyDisk:
capacity: {{ .group.ephemeralStorage | default "20Gi" }} capacity: {{ .group.ephemeralStorage | default "20Gi" }}
networks:
- name: default
pod: {}
{{- end }} {{- end }}
--- ---
apiVersion: cluster.x-k8s.io/v1beta1 apiVersion: cluster.x-k8s.io/v1beta1
@@ -210,26 +203,6 @@ spec:
name: {{ $.Release.Name }}-{{ $groupName }}-{{ $kubevirtmachinetemplateHash }} name: {{ $.Release.Name }}-{{ $groupName }}-{{ $kubevirtmachinetemplateHash }}
namespace: default namespace: default
version: v1.30.1 version: v1.30.1
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
metadata:
name: {{ $.Release.Name }}-{{ $groupName }}
namespace: {{ $.Release.Namespace }}
spec:
clusterName: {{ $.Release.Name }}
nodeStartupTimeout: 10m
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: {{ $.Release.Name }}
cluster.x-k8s.io/deployment-name: {{ $.Release.Name }}-{{ $groupName }}
unhealthyConditions:
- type: Ready
status: Unknown
timeout: 30s
- type: Ready
status: "False"
timeout: 300s
{{- end }} {{- end }}
--- ---
{{- /* {{- /*

View File

@@ -15,7 +15,6 @@ spec:
app: {{ .Release.Name }}-kcsi-driver app: {{ .Release.Name }}-kcsi-driver
policy.cozystack.io/allow-to-apiserver: "true" policy.cozystack.io/allow-to-apiserver: "true"
spec: spec:
enableServiceLinks: false
serviceAccountName: {{ .Release.Name }}-kcsi serviceAccountName: {{ .Release.Name }}-kcsi
priorityClassName: system-cluster-critical priorityClassName: system-cluster-critical
tolerations: tolerations:
@@ -27,7 +26,7 @@ spec:
containers: containers:
- name: csi-driver - name: csi-driver
imagePullPolicy: Always imagePullPolicy: Always
image: "{{ $.Files.Get "images/kubevirt-csi-driver.tag" | trim }}" image: ghcr.io/kvaps/test:kubevirt-csi-driver
args: args:
- "--endpoint=$(CSI_ENDPOINT)" - "--endpoint=$(CSI_ENDPOINT)"
- "--infra-cluster-namespace=$(INFRACLUSTER_NAMESPACE)" - "--infra-cluster-namespace=$(INFRACLUSTER_NAMESPACE)"
@@ -49,7 +48,7 @@ spec:
fieldRef: fieldRef:
fieldPath: metadata.namespace fieldPath: metadata.namespace
- name: INFRACLUSTER_LABELS - name: INFRACLUSTER_LABELS
value: "cluster.x-k8s.io/cluster-name={{ .Release.Name }}" value: "csi-driver/cluster=test"
- name: INFRA_STORAGE_CLASS_ENFORCEMENT - name: INFRA_STORAGE_CLASS_ENFORCEMENT
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef:

View File

@@ -29,13 +29,6 @@ spec:
upgrade: upgrade:
remediation: remediation:
retries: -1 retries: -1
{{- if .Values.addons.certManager.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-cert-manager-values-override
valuesKey: values
{{- end }}
dependsOn: dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }} {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }} - name: {{ .Release.Name }}
@@ -44,13 +37,3 @@ spec:
- name: {{ .Release.Name }}-cilium - name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- if .Values.addons.certManager.valuesOverride }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-cert-manager-values-override
stringData:
values: |
{{- toYaml .Values.addons.certManager.valuesOverride | nindent 4 }}
{{- end }}

View File

@@ -30,8 +30,21 @@ spec:
retries: -1 retries: -1
values: values:
cilium: cilium:
tunnel: disabled
autoDirectNodeRoutes: false
bpf:
masquerade: true
cgroup:
autoMount:
enabled: true
hostRoot: /run/cilium/cgroupv2
k8sServiceHost: {{ .Release.Name }}.{{ .Release.Namespace }}.svc k8sServiceHost: {{ .Release.Name }}.{{ .Release.Namespace }}.svc
k8sServicePort: 6443 k8sServicePort: 6443
cni:
chainingMode: ~
customConf: false
configMap: ""
routingMode: tunnel routingMode: tunnel
enableIPv4Masquerade: true enableIPv4Masquerade: true
ipv4NativeRoutingCIDR: "" ipv4NativeRoutingCIDR: ""

View File

@@ -28,10 +28,6 @@ spec:
upgrade: upgrade:
remediation: remediation:
retries: -1 retries: -1
{{- with .Values.storageClass }}
values:
storageClass: "{{ . }}"
{{- end }}
dependsOn: dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }} {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }} - name: {{ .Release.Name }}

View File

@@ -72,12 +72,6 @@ spec:
upgrade: upgrade:
remediation: remediation:
retries: -1 retries: -1
{{- if .Values.addons.fluxcd.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-fluxcd-values-override
valuesKey: values
{{- end }}
dependsOn: dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }} {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }} - name: {{ .Release.Name }}
@@ -88,14 +82,3 @@ spec:
- name: {{ .Release.Name }}-fluxcd-operator - name: {{ .Release.Name }}-fluxcd-operator
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- if .Values.addons.fluxcd.valuesOverride }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-fluxcd-values-override
stringData:
values: |
{{- toYaml .Values.addons.fluxcd.valuesOverride | nindent 4 }}
{{- end }}

View File

@@ -39,12 +39,6 @@ spec:
enabled: false enabled: false
nodeSelector: nodeSelector:
node-role.kubernetes.io/ingress-nginx: "" node-role.kubernetes.io/ingress-nginx: ""
{{- if .Values.addons.ingressNginx.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-ingress-nginx-values-override
valuesKey: values
{{- end }}
dependsOn: dependsOn:
{{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }} {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
- name: {{ .Release.Name }} - name: {{ .Release.Name }}
@@ -53,14 +47,3 @@ spec:
- name: {{ .Release.Name }}-cilium - name: {{ .Release.Name }}-cilium
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
{{- end }} {{- end }}
{{- if .Values.addons.ingressNginx.valuesOverride }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-ingress-nginx-values-override
stringData:
values: |
{{- toYaml .Values.addons.ingressNginx.valuesOverride | nindent 4 }}
{{- end }}

View File

@@ -34,12 +34,6 @@ rules:
- services - services
verbs: verbs:
- "*" - "*"
- apiGroups:
- "discovery.k8s.io"
resources:
- "endpointslices"
verbs:
- "*"
- apiGroups: - apiGroups:
- "" - ""
resources: resources:

View File

@@ -15,7 +15,6 @@ spec:
k8s-app: {{ .Release.Name }}-kccm k8s-app: {{ .Release.Name }}-kccm
policy.cozystack.io/allow-to-apiserver: "true" policy.cozystack.io/allow-to-apiserver: "true"
spec: spec:
enableServiceLinks: false
tolerations: tolerations:
- key: CriticalAddonsOnly - key: CriticalAddonsOnly
operator: Exists operator: Exists
@@ -31,7 +30,7 @@ spec:
- --cluster-name={{ .Release.Name }} - --cluster-name={{ .Release.Name }}
command: command:
- /bin/kubevirt-cloud-controller-manager - /bin/kubevirt-cloud-controller-manager
image: "{{ $.Files.Get "images/kubevirt-cloud-provider.tag" | trim }}" image: ghcr.io/kvaps/test:kubevirt-cloud-provider
imagePullPolicy: Always imagePullPolicy: Always
#securityContext: #securityContext:
# privileged: true # privileged: true

View File

@@ -17,11 +17,6 @@
} }
} }
}, },
"storageClass": {
"type": "string",
"description": "StorageClass used to store user data",
"default": "replicated"
},
"addons": { "addons": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -32,11 +27,6 @@
"type": "boolean", "type": "boolean",
"description": "Enables the cert-manager", "description": "Enables the cert-manager",
"default": false "default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
} }
} }
}, },
@@ -48,11 +38,6 @@
"description": "Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role)", "description": "Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role)",
"default": false "default": false
}, },
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
},
"hosts": { "hosts": {
"type": "array", "type": "array",
"description": "List of domain names that should be passed through to the cluster by upper cluster", "description": "List of domain names that should be passed through to the cluster by upper cluster",
@@ -68,11 +53,6 @@
"type": "boolean", "type": "boolean",
"description": "Enables Flux CD", "description": "Enables Flux CD",
"default": false "default": false
},
"valuesOverride": {
"type": "object",
"description": "Custom values to override",
"default": {}
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More