mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-02-04 16:05:52 +00:00
Compare commits
10 Commits
fix-etcd-s
...
kubermatic
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b0a7eacca | ||
|
|
35536bb26a | ||
|
|
ac5c38bacd | ||
|
|
0a89478b3d | ||
|
|
910a9e5378 | ||
|
|
7431e245b3 | ||
|
|
54fd61cd43 | ||
|
|
ec27a19afb | ||
|
|
b82ba4ac3c | ||
|
|
f8f6e0aea8 |
@@ -590,6 +590,25 @@
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -120,9 +120,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "value_and_name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "value_and_name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.0.1",
|
||||
"pluginVersion": "10.4.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -130,7 +132,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "up{job=\"coredns\", instance=~\"$instance\"}",
|
||||
"expr": "up{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ instance }}",
|
||||
"refId": "A"
|
||||
@@ -150,6 +152,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -163,6 +166,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -225,7 +229,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "rate(process_cpu_seconds_total{job=\"coredns\", instance=~\"$instance\"}[$__rate_interval])",
|
||||
"expr": "rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ instance }}",
|
||||
"refId": "A"
|
||||
@@ -245,6 +249,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -258,6 +263,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -319,7 +325,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "process_resident_memory_bytes{job=\"coredns\", instance=~\"$instance\"}",
|
||||
"expr": "process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ instance }}",
|
||||
"refId": "A"
|
||||
@@ -339,6 +345,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -352,6 +359,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -413,7 +421,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\",proto=\"$protocol\"}[$__rate_interval]))",
|
||||
"expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "total $protocol requests",
|
||||
"refId": "A"
|
||||
@@ -433,6 +441,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -446,6 +455,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -507,7 +517,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"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)",
|
||||
"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)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "average $protocol packet size",
|
||||
"refId": "A"
|
||||
@@ -527,6 +537,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -540,6 +551,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -601,7 +613,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\"}[$__rate_interval])) by (type)",
|
||||
"expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ type }}",
|
||||
"refId": "A"
|
||||
@@ -621,6 +633,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -634,6 +647,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -695,7 +709,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_dns_responses_total{instance=~\"$instance\"}[$__rate_interval])) by (rcode)",
|
||||
"expr": "sum(rate(coredns_dns_responses_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (rcode)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ rcode }}",
|
||||
"refId": "A"
|
||||
@@ -715,6 +729,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -728,6 +743,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -789,7 +805,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_forward_requests_total[$__rate_interval]))",
|
||||
"expr": "sum(rate(coredns_forward_requests_total{cluster=~\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "total forward requests",
|
||||
"refId": "A"
|
||||
@@ -809,6 +825,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -822,6 +839,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -883,7 +901,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_forward_responses_total{rcode=~\"SERVFAIL|REFUSED\"}[$__rate_interval])) by (rcode)",
|
||||
"expr": "sum(rate(coredns_forward_responses_total{rcode=~\"SERVFAIL|REFUSED\", cluster=~\"$cluster\"}[$__rate_interval])) by (rcode)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ rcode }}",
|
||||
"refId": "A"
|
||||
@@ -903,6 +921,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -916,6 +935,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -977,7 +997,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\"}[$__rate_interval])) by (type)",
|
||||
"expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ type }}",
|
||||
"refId": "A"
|
||||
@@ -988,7 +1008,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\"}[$__rate_interval])) by (type)",
|
||||
"expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "misses",
|
||||
"refId": "B"
|
||||
@@ -1008,6 +1028,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1021,6 +1042,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
@@ -1082,7 +1104,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(coredns_cache_entries) by (type)",
|
||||
"expr": "sum(coredns_cache_entries{cluster=~\"$cluster\"}) by (type)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ type }}",
|
||||
"refId": "A"
|
||||
@@ -1143,7 +1165,8 @@
|
||||
"layout": "auto"
|
||||
},
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"mode": "single",
|
||||
"showColorScale": false,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
@@ -1152,7 +1175,7 @@
|
||||
"unit": "s"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "10.0.1",
|
||||
"pluginVersion": "10.4.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -1160,7 +1183,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(increase(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[$__rate_interval])) by (le)",
|
||||
"expr": "sum(increase(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)",
|
||||
"format": "heatmap",
|
||||
"legendFormat": "{{le}}",
|
||||
"range": true,
|
||||
@@ -1196,85 +1219,6 @@
|
||||
"x": 12,
|
||||
"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,
|
||||
"options": {
|
||||
"calculate": false,
|
||||
@@ -1301,7 +1245,8 @@
|
||||
"layout": "auto"
|
||||
},
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"mode": "single",
|
||||
"showColorScale": false,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
@@ -1310,7 +1255,7 @@
|
||||
"unit": "decbytes"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "10.0.1",
|
||||
"pluginVersion": "10.4.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -1318,7 +1263,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(increase(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\", le!=\"0\"}[$__rate_interval])) by (le)",
|
||||
"expr": "sum(increase(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)",
|
||||
"format": "heatmap",
|
||||
"legendFormat": "{{le}}",
|
||||
"range": true,
|
||||
@@ -1351,7 +1296,7 @@
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"x": 0,
|
||||
"y": 53
|
||||
},
|
||||
"id": 29,
|
||||
@@ -1380,7 +1325,8 @@
|
||||
"layout": "auto"
|
||||
},
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"mode": "single",
|
||||
"showColorScale": false,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
@@ -1389,7 +1335,7 @@
|
||||
"unit": "decbytes"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "10.0.1",
|
||||
"pluginVersion": "10.4.1",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -1397,7 +1343,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(increase(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\", le!=\"0\"}[$__rate_interval])) by (le)",
|
||||
"expr": "sum(increase(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)",
|
||||
"format": "heatmap",
|
||||
"legendFormat": "{{le}}",
|
||||
"range": true,
|
||||
@@ -1409,8 +1355,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"schemaVersion": 39,
|
||||
"tags": [
|
||||
"Kubernetes",
|
||||
"Prometheus"
|
||||
@@ -1435,6 +1380,34 @@
|
||||
"skipUrlSync": false,
|
||||
"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": {
|
||||
"selected": false,
|
||||
@@ -1445,7 +1418,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"definition": "label_values(up{job=\"coredns\"}, instance)",
|
||||
"definition": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "",
|
||||
@@ -1453,8 +1426,9 @@
|
||||
"name": "instance",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(up{job=\"coredns\"}, instance)",
|
||||
"refId": "StandardVariableQuery"
|
||||
"qryType": 1,
|
||||
"query": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
@@ -1476,7 +1450,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"definition": "label_values(coredns_dns_requests_total, proto)",
|
||||
"definition": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "",
|
||||
@@ -1484,7 +1458,7 @@
|
||||
"name": "protocol",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(coredns_dns_requests_total, proto)",
|
||||
"query": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
@@ -1498,7 +1472,7 @@
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"selected": false,
|
||||
"text": "30s",
|
||||
"value": "30s"
|
||||
},
|
||||
@@ -1542,6 +1516,37 @@
|
||||
"queryValue": "",
|
||||
"skipUrlSync": false,
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1553,6 +1558,6 @@
|
||||
"timezone": "",
|
||||
"title": "Kubernetes / System / CoreDNS",
|
||||
"uid": "k8s_system_coredns",
|
||||
"version": 13,
|
||||
"version": 18,
|
||||
"weekStart": ""
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -108,6 +108,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
@@ -136,6 +137,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -143,17 +145,20 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\"}",
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "{{ created_by_kind }}: {{ created_by_name }}",
|
||||
@@ -168,12 +173,13 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"links": [
|
||||
{
|
||||
"title": "",
|
||||
"url": "/d/k8s_views_nodes/kubernetes-views-nodes?var-datasource=${datasource}&var-node=${__data.fields.node}"
|
||||
"url": "/d/k8s_views_nodes/kubernetes-views-nodes?var-datasource=${datasource}&var-node=${__field.labels.node}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
@@ -202,6 +208,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -209,17 +216,20 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\"}",
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "{{ node }}",
|
||||
@@ -234,6 +244,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
@@ -262,6 +273,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -269,17 +281,20 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\"}",
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "{{ pod_ip }}",
|
||||
@@ -294,6 +309,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
@@ -322,6 +338,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -329,9 +346,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -340,7 +359,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", priority_class!=\"\"}",
|
||||
"expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", priority_class!=\"\", cluster=\"$cluster\"}",
|
||||
"format": "time_series",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
@@ -357,6 +376,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -419,14 +439,17 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -435,7 +458,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_status_qos_class{namespace=\"$namespace\", pod=\"$pod\"} > 0",
|
||||
"expr": "kube_pod_status_qos_class{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"} > 0",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "{{ qos_class }}",
|
||||
@@ -450,6 +473,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
@@ -482,14 +506,17 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "name"
|
||||
"showPercentChange": false,
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -498,7 +525,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_container_status_last_terminated_reason{namespace=\"$namespace\", pod=\"$pod\"}",
|
||||
"expr": "kube_pod_container_status_last_terminated_reason{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "{{ reason }}",
|
||||
@@ -513,6 +540,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"description": "Panel only works when a single pod is selected.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
@@ -549,14 +577,17 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [],
|
||||
"fields": "",
|
||||
"values": true
|
||||
},
|
||||
"textMode": "value"
|
||||
"showPercentChange": false,
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -565,7 +596,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "kube_pod_container_status_last_terminated_exitcode{namespace=\"$namespace\", pod=\"$pod\"}",
|
||||
"expr": "kube_pod_container_status_last_terminated_exitcode{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
"legendFormat": "__auto",
|
||||
@@ -646,6 +677,8 @@
|
||||
},
|
||||
"id": 39,
|
||||
"options": {
|
||||
"minVizHeight": 75,
|
||||
"minVizWidth": 75,
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
@@ -655,9 +688,10 @@
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true
|
||||
"showThresholdMarkers": true,
|
||||
"sizing": "auto"
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -666,7 +700,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"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\"})",
|
||||
"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\"})",
|
||||
"instant": true,
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Requests",
|
||||
@@ -716,6 +750,8 @@
|
||||
},
|
||||
"id": 48,
|
||||
"options": {
|
||||
"minVizHeight": 75,
|
||||
"minVizWidth": 75,
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
@@ -725,9 +761,10 @@
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true
|
||||
"showThresholdMarkers": true,
|
||||
"sizing": "auto"
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -736,7 +773,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"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\"})",
|
||||
"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\"})",
|
||||
"instant": true,
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Limits",
|
||||
@@ -790,6 +827,8 @@
|
||||
},
|
||||
"id": 40,
|
||||
"options": {
|
||||
"minVizHeight": 75,
|
||||
"minVizWidth": 75,
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
@@ -799,17 +838,19 @@
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true
|
||||
"showThresholdMarkers": true,
|
||||
"sizing": "auto"
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"})",
|
||||
"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\"})",
|
||||
"instant": true,
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Requests",
|
||||
@@ -859,6 +900,8 @@
|
||||
},
|
||||
"id": 49,
|
||||
"options": {
|
||||
"minVizHeight": 75,
|
||||
"minVizWidth": 75,
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
@@ -868,17 +911,19 @@
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true
|
||||
"showThresholdMarkers": true,
|
||||
"sizing": "auto"
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) ",
|
||||
"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\"}) ",
|
||||
"instant": true,
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Limits",
|
||||
@@ -988,7 +1033,7 @@
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "10.1.0",
|
||||
"pluginVersion": "11.2.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -997,7 +1042,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)",
|
||||
"expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
@@ -1012,7 +1057,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}) by (container)",
|
||||
"expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
@@ -1027,7 +1072,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)",
|
||||
"expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
@@ -1041,7 +1086,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}) by (container)",
|
||||
"expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
@@ -1055,7 +1100,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}[$__rate_interval])) by (container)",
|
||||
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)",
|
||||
"format": "table",
|
||||
"hide": false,
|
||||
"instant": true,
|
||||
@@ -1070,7 +1115,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}) by (container)",
|
||||
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}) by (container)",
|
||||
"format": "table",
|
||||
"hide": false,
|
||||
"instant": true,
|
||||
@@ -1181,11 +1226,13 @@
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "Percent",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1271,7 +1318,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"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)",
|
||||
"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)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ container }} REQUESTS",
|
||||
"range": true,
|
||||
@@ -1283,7 +1330,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"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)",
|
||||
"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)",
|
||||
"hide": false,
|
||||
"legendFormat": "{{ container }} LIMITS",
|
||||
"range": true,
|
||||
@@ -1305,11 +1352,13 @@
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "Percent",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1398,7 +1447,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"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)",
|
||||
"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)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ container }} REQUESTS",
|
||||
"range": true,
|
||||
@@ -1410,7 +1459,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"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)",
|
||||
"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)",
|
||||
"hide": false,
|
||||
"legendFormat": "{{ container }} LIMITS",
|
||||
"range": true,
|
||||
@@ -1431,11 +1480,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "CPU Cores",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1532,7 +1583,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}[$__rate_interval])) by (container)",
|
||||
"expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ container }}",
|
||||
"range": true,
|
||||
@@ -1553,11 +1604,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "Bytes",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1637,7 +1690,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}) by (container)",
|
||||
"expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}) by (container)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ container }}",
|
||||
"range": true,
|
||||
@@ -1659,11 +1712,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "SECONDS",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1745,7 +1800,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", pod=\"$pod\", image!=\"\", container!=\"\"}[$__rate_interval])) by (container)",
|
||||
"expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "{{ container }}",
|
||||
"range": true,
|
||||
@@ -1780,11 +1835,13 @@
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "Percent",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1873,7 +1930,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(increase(container_oom_events_total{namespace=\"${namespace}\", pod=\"${pod}\", container!=\"\"}[$__rate_interval])) by (container)",
|
||||
"expr": "sum(increase(container_oom_events_total{namespace=\"${namespace}\", pod=\"${pod}\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ container }}",
|
||||
"range": true,
|
||||
@@ -1895,11 +1952,13 @@
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "Percent",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -1988,7 +2047,7 @@
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": true,
|
||||
"expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\", pod=\"${pod}\", container!=\"\"}[$__rate_interval])) by (container)",
|
||||
"expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\", pod=\"${pod}\", container!=\"\", job=~\"$job\", cluster=\"$cluster\"}[$__rate_interval])) by (container)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{ container }}",
|
||||
"range": true,
|
||||
@@ -2035,11 +2094,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -2079,7 +2140,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "bytes"
|
||||
"unit": "binBps"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -2110,7 +2171,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Received",
|
||||
"refId": "A"
|
||||
@@ -2121,7 +2182,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "- sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "- sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Transmitted",
|
||||
"refId": "B"
|
||||
@@ -2141,11 +2202,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -2216,7 +2279,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Received",
|
||||
"refId": "A"
|
||||
@@ -2227,7 +2290,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "- sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "- sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Transmitted",
|
||||
"refId": "B"
|
||||
@@ -2247,11 +2310,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -2282,7 +2347,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2321,7 +2387,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Received",
|
||||
"refId": "A"
|
||||
@@ -2332,7 +2398,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "- sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "- sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Transmitted",
|
||||
"refId": "B"
|
||||
@@ -2352,11 +2418,13 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"barWidthFactor": 0.6,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 25,
|
||||
"gradientMode": "opacity",
|
||||
@@ -2387,7 +2455,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2426,7 +2495,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Received",
|
||||
"refId": "A"
|
||||
@@ -2437,7 +2506,7 @@
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"exemplar": true,
|
||||
"expr": "- sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))",
|
||||
"expr": "- sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))",
|
||||
"interval": "$resolution",
|
||||
"legendFormat": "Transmitted",
|
||||
"refId": "B"
|
||||
@@ -2448,8 +2517,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 38,
|
||||
"style": "dark",
|
||||
"schemaVersion": 39,
|
||||
"tags": [
|
||||
"Kubernetes",
|
||||
"Prometheus"
|
||||
@@ -2459,8 +2527,8 @@
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "Prometheus",
|
||||
"value": "Prometheus"
|
||||
"text": "",
|
||||
"value": ""
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
@@ -2474,6 +2542,34 @@
|
||||
"skipUrlSync": false,
|
||||
"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": {
|
||||
"selected": false,
|
||||
@@ -2484,14 +2580,14 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"definition": "label_values(kube_pod_info, namespace)",
|
||||
"definition": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"multi": false,
|
||||
"name": "namespace",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(kube_pod_info, namespace)",
|
||||
"query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
|
||||
"refId": "Prometheus-namespace-Variable-Query"
|
||||
},
|
||||
"refresh": 1,
|
||||
@@ -2513,14 +2609,14 @@
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"definition": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
|
||||
"definition": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"}, pod)",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"multi": false,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "pod",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(kube_pod_info{namespace=\"$namespace\"}, pod)",
|
||||
"query": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"}, pod)",
|
||||
"refId": "Prometheus-pod-Variable-Query"
|
||||
},
|
||||
"refresh": 2,
|
||||
@@ -2534,7 +2630,7 @@
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"selected": false,
|
||||
"text": "30s",
|
||||
"value": "30s"
|
||||
},
|
||||
@@ -2578,6 +2674,33 @@
|
||||
"queryValue": "",
|
||||
"skipUrlSync": false,
|
||||
"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"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2589,6 +2712,6 @@
|
||||
"timezone": "",
|
||||
"title": "Kubernetes / Views / Pods",
|
||||
"uid": "k8s_views_pods",
|
||||
"version": 22,
|
||||
"version": 30,
|
||||
"weekStart": ""
|
||||
}
|
||||
|
||||
@@ -1339,11 +1339,7 @@
|
||||
},
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "short"
|
||||
},
|
||||
{
|
||||
"id": "decimals",
|
||||
"value": 2
|
||||
"value": "none"
|
||||
},
|
||||
{
|
||||
"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
@@ -12,7 +12,7 @@
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "9.0.4"
|
||||
"version": "10.4.0"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
@@ -124,9 +124,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -198,9 +200,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -260,9 +264,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -323,9 +329,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -399,9 +407,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -471,9 +481,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -546,9 +558,11 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -577,7 +591,9 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"displayMode": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
@@ -630,7 +646,9 @@
|
||||
},
|
||||
"id": 22,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
@@ -645,7 +663,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -700,7 +718,9 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"displayMode": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
@@ -753,7 +773,9 @@
|
||||
},
|
||||
"id": 21,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
@@ -768,7 +790,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"pluginVersion": "9.0.4",
|
||||
"pluginVersion": "10.4.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -885,7 +907,7 @@
|
||||
"min",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": false
|
||||
},
|
||||
@@ -1106,7 +1128,9 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"displayMode": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
@@ -1251,7 +1275,8 @@
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
@@ -1343,7 +1368,7 @@
|
||||
"max",
|
||||
"mean"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"displayMode": "list",
|
||||
"placement": "right",
|
||||
"showLegend": false
|
||||
},
|
||||
@@ -1436,7 +1461,8 @@
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
@@ -1657,8 +1683,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": "1m",
|
||||
"schemaVersion": 36,
|
||||
"style": "dark",
|
||||
"schemaVersion": 39,
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"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
@@ -6,7 +6,7 @@
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "9.2.7"
|
||||
"version": "10.4.2"
|
||||
},
|
||||
{
|
||||
"type": "datasource",
|
||||
@@ -59,7 +59,7 @@
|
||||
"uid": "$ds"
|
||||
},
|
||||
"enable": true,
|
||||
"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))",
|
||||
"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))",
|
||||
"hide": true,
|
||||
"iconColor": "dark-blue",
|
||||
"name": "version",
|
||||
@@ -72,15 +72,14 @@
|
||||
"uid": "$ds"
|
||||
},
|
||||
"enable": true,
|
||||
"expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"})) by(job, instance)",
|
||||
"hide": true,
|
||||
"expr": "sum(changes(vm_app_start_timestamp{job=~\"$job\", instance=~\"$instance\"}[$__interval])) by(job, instance)",
|
||||
"iconColor": "dark-yellow",
|
||||
"name": "restarts",
|
||||
"textFormat": "{{job}}:{{instance}} restarted"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "Overview for VictoriaMetrics vmalert v1.96.0 or higher",
|
||||
"description": "Overview for VictoriaMetrics vmalert v1.102.0 or higher",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
@@ -96,7 +95,7 @@
|
||||
"title": "vmalert docs",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "https://docs.victoriametrics.com/vmalert.html"
|
||||
"url": "https://docs.victoriametrics.com/vmalert/"
|
||||
},
|
||||
{
|
||||
"asDropdown": false,
|
||||
@@ -201,10 +200,12 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.2.7",
|
||||
"pluginVersion": "10.4.2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -261,10 +262,12 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.2.7",
|
||||
"pluginVersion": "10.4.2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -321,10 +324,12 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.2.7",
|
||||
"pluginVersion": "10.4.2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -385,10 +390,12 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.2.7",
|
||||
"pluginVersion": "10.4.2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -449,10 +456,12 @@
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "9.2.7",
|
||||
"pluginVersion": "10.4.2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -483,7 +492,9 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"displayMode": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false,
|
||||
"minWidth": 50
|
||||
},
|
||||
@@ -537,7 +548,9 @@
|
||||
},
|
||||
"id": 45,
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
@@ -546,7 +559,7 @@
|
||||
},
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "9.2.7",
|
||||
"pluginVersion": "10.4.2",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -575,6 +588,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -588,6 +602,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "stepAfter",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -706,6 +721,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -719,6 +735,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -809,6 +826,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -822,6 +840,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -912,6 +931,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -925,6 +945,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1013,6 +1034,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1026,6 +1048,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1114,7 +1137,9 @@
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"displayMode": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
@@ -1122,8 +1147,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1234,7 +1258,7 @@
|
||||
"type": "prometheus",
|
||||
"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.html#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/Troubleshooting.html#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/#groups\n\nIf rule expressions are taking longer than expected, please see https://docs.victoriametrics.com/troubleshooting/#slow-queries.\"",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -1275,8 +1299,7 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1356,6 +1379,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1369,6 +1393,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1400,7 +1425,8 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percentunit"
|
||||
"unit": "percentunit",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -1408,14 +1434,14 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 33
|
||||
"y": 3
|
||||
},
|
||||
"id": 37,
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Profiling",
|
||||
"url": "https://docs.victoriametrics.com/vmagent.html#profiling"
|
||||
"url": "https://docs.victoriametrics.com/vmagent/#profiling"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
@@ -1467,6 +1493,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1480,6 +1507,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1511,7 +1539,8 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "bytes"
|
||||
"unit": "bytes",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -1519,14 +1548,14 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 33
|
||||
"y": 3
|
||||
},
|
||||
"id": 57,
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Profiling",
|
||||
"url": "https://docs.victoriametrics.com/vmagent.html#profiling"
|
||||
"url": "https://docs.victoriametrics.com/vmagent/#profiling"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
@@ -1578,6 +1607,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1591,6 +1621,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1622,7 +1653,8 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percentunit"
|
||||
"unit": "percentunit",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -1630,14 +1662,14 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 41
|
||||
"y": 11
|
||||
},
|
||||
"id": 35,
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Profiling",
|
||||
"url": "https://docs.victoriametrics.com/vmagent.html#profiling"
|
||||
"url": "https://docs.victoriametrics.com/vmagent/#profiling"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
@@ -1691,6 +1723,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1704,6 +1737,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1735,7 +1769,8 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
"unit": "short",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -1743,14 +1778,14 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 41
|
||||
"y": 11
|
||||
},
|
||||
"id": 56,
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Profiling",
|
||||
"url": "https://docs.victoriametrics.com/vmagent.html#profiling"
|
||||
"url": "https://docs.victoriametrics.com/vmagent/#profiling"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
@@ -1820,6 +1855,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1833,6 +1869,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1865,7 +1902,8 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "percentunit"
|
||||
"unit": "percentunit",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -1873,7 +1911,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 49
|
||||
"y": 19
|
||||
},
|
||||
"id": 39,
|
||||
"links": [],
|
||||
@@ -1925,6 +1963,7 @@
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
@@ -1938,6 +1977,7 @@
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
@@ -1970,7 +2010,8 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
"unit": "short",
|
||||
"unitScale": true
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
@@ -1978,7 +2019,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 49
|
||||
"y": 19
|
||||
},
|
||||
"id": 41,
|
||||
"links": [],
|
||||
@@ -2017,6 +2058,114 @@
|
||||
],
|
||||
"title": "Goroutines ($instance)",
|
||||
"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": [
|
||||
@@ -2107,7 +2256,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 28
|
||||
"y": 36
|
||||
},
|
||||
"id": 14,
|
||||
"options": {
|
||||
@@ -2209,7 +2358,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 28
|
||||
"y": 36
|
||||
},
|
||||
"id": 13,
|
||||
"options": {
|
||||
@@ -2311,7 +2460,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 36
|
||||
"y": 44
|
||||
},
|
||||
"id": 20,
|
||||
"options": {
|
||||
@@ -2414,7 +2563,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 36
|
||||
"y": 44
|
||||
},
|
||||
"id": 32,
|
||||
"options": {
|
||||
@@ -2513,7 +2662,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 44
|
||||
"y": 52
|
||||
},
|
||||
"id": 26,
|
||||
"options": {
|
||||
@@ -2583,7 +2732,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "$ds"
|
||||
},
|
||||
"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.",
|
||||
"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.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -2640,7 +2789,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 43
|
||||
"y": 51
|
||||
},
|
||||
"id": 31,
|
||||
"options": {
|
||||
@@ -2685,7 +2834,7 @@
|
||||
"type": "prometheus",
|
||||
"uid": "$ds"
|
||||
},
|
||||
"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.",
|
||||
"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.",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -2742,7 +2891,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 43
|
||||
"y": 51
|
||||
},
|
||||
"id": 33,
|
||||
"options": {
|
||||
@@ -2843,7 +2992,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 51
|
||||
"y": 59
|
||||
},
|
||||
"id": 30,
|
||||
"options": {
|
||||
@@ -2964,7 +3113,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
"y": 17
|
||||
},
|
||||
"id": 52,
|
||||
"options": {
|
||||
@@ -3056,7 +3205,7 @@
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 9
|
||||
"y": 17
|
||||
},
|
||||
"id": 53,
|
||||
"options": {
|
||||
@@ -3086,15 +3235,221 @@
|
||||
],
|
||||
"title": "Datapoints drop rate ($instance)",
|
||||
"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",
|
||||
"type": "row"
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"refresh": "",
|
||||
"schemaVersion": 39,
|
||||
"tags": [
|
||||
"victoriametrics",
|
||||
"vmalert"
|
||||
@@ -3104,8 +3459,8 @@
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "VictoriaMetrics - cluster",
|
||||
"value": "VictoriaMetrics - cluster"
|
||||
"text": "VictoriaMetrics",
|
||||
"value": "P4169E866C3094E38"
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
@@ -3171,14 +3526,14 @@
|
||||
"type": "prometheus",
|
||||
"uid": "$ds"
|
||||
},
|
||||
"definition": "label_values(vmalert_iteration_duration_seconds{job=~\"$job\", instance=~\"$instance\"}, group)",
|
||||
"definition": "label_values(vmalert_iteration_total{job=~\"$job\", instance=~\"$instance\"}, group)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "group",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(vmalert_iteration_duration_seconds{job=~\"$job\", instance=~\"$instance\"}, group)",
|
||||
"query": "label_values(vmalert_iteration_total{job=~\"$job\", instance=~\"$instance\"}, group)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
|
||||
@@ -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
|
||||
base=https://github.com/deckhouse/deckhouse/raw/main/
|
||||
dir="grafana-dashboards"
|
||||
dir="dashboards"
|
||||
mkdir -p "$dir"
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.10.0
|
||||
version: 0.11.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
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/package.mk
|
||||
@@ -6,7 +7,7 @@ include ../../../scripts/package.mk
|
||||
generate:
|
||||
readme-generator -v values.yaml -s values.schema.json -r README.md
|
||||
|
||||
image: image-ubuntu-container-disk
|
||||
image: image-ubuntu-container-disk image-kubevirt-cloud-provider image-kubevirt-csi-driver image-cluster-autoscaler
|
||||
|
||||
image-ubuntu-container-disk:
|
||||
docker buildx build --platform linux/amd64 --build-arg ARCH=amd64 images/ubuntu-container-disk \
|
||||
@@ -21,3 +22,46 @@ 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)" \
|
||||
> images/ubuntu-container-disk.tag
|
||||
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
|
||||
|
||||
1
packages/apps/kubernetes/images/cluster-autoscaler.tag
Normal file
1
packages/apps/kubernetes/images/cluster-autoscaler.tag
Normal file
@@ -0,0 +1 @@
|
||||
ghcr.io/aenix-io/cozystack/cluster-autoscaler:latest@sha256:7f617de5a24de790a15d9e97c6287ff2b390922e6e74c7a665cbf498f634514d
|
||||
@@ -0,0 +1,17 @@
|
||||
# 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"]
|
||||
@@ -0,0 +1 @@
|
||||
ghcr.io/aenix-io/cozystack/kubevirt-cloud-provider:latest@sha256:735aa8092501fc0f2904b685b15bc0137ea294cb08301ca1185d3dec5f467f0f
|
||||
@@ -0,0 +1,21 @@
|
||||
# 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" ]
|
||||
File diff suppressed because it is too large
Load Diff
1
packages/apps/kubernetes/images/kubevirt-csi-driver.tag
Normal file
1
packages/apps/kubernetes/images/kubevirt-csi-driver.tag
Normal file
@@ -0,0 +1 @@
|
||||
ghcr.io/aenix-io/cozystack/kubevirt-csi-driver:latest@sha256:e56b46591cdf9140e97c3220a0c2681aadd4a4b3f7ea8473fb2504dc96e8b53a
|
||||
@@ -0,0 +1,25 @@
|
||||
# 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 .
|
||||
@@ -7,4 +7,6 @@ data:
|
||||
loadBalancer:
|
||||
creationPollInterval: 5
|
||||
creationPollTimeout: 60
|
||||
enableEPSController: true
|
||||
selectorless: true
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
operator: Exists
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- image: ghcr.io/kvaps/test:cluster-autoscaller
|
||||
- image: "{{ $.Files.Get "images/cluster-autoscaler.tag" | trim }}"
|
||||
name: cluster-autoscaler
|
||||
command:
|
||||
- /cluster-autoscaler
|
||||
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
containers:
|
||||
- name: csi-driver
|
||||
imagePullPolicy: Always
|
||||
image: ghcr.io/kvaps/test:kubevirt-csi-driver
|
||||
image: "{{ $.Files.Get "images/kubevirt-csi-driver.tag" | trim }}"
|
||||
args:
|
||||
- "--endpoint=$(CSI_ENDPOINT)"
|
||||
- "--infra-cluster-namespace=$(INFRACLUSTER_NAMESPACE)"
|
||||
|
||||
@@ -34,6 +34,12 @@ rules:
|
||||
- services
|
||||
verbs:
|
||||
- "*"
|
||||
- apiGroups:
|
||||
- "discovery.k8s.io"
|
||||
resources:
|
||||
- "endpointslices"
|
||||
verbs:
|
||||
- "*"
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
- --cluster-name={{ .Release.Name }}
|
||||
command:
|
||||
- /bin/kubevirt-cloud-controller-manager
|
||||
image: ghcr.io/kvaps/test:kubevirt-cloud-provider
|
||||
image: "{{ $.Files.Get "images/kubevirt-cloud-provider.tag" | trim }}"
|
||||
imagePullPolicy: Always
|
||||
#securityContext:
|
||||
# privileged: true
|
||||
|
||||
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.6.2
|
||||
version: 0.7.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -35,14 +35,15 @@ more details:
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `external` | Enable external access from outside the cluster | `false` |
|
||||
| `size` | Persistent Volume size | `10Gi` |
|
||||
| `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.maxSyncReplicas` | Maximum number of synchronous replicas that can acknowledge a transaction (must be lower than the number of instances). | `0` |
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------- |
|
||||
| `external` | Enable external access from outside the cluster | `false` |
|
||||
| `size` | Persistent Volume size | `10Gi` |
|
||||
| `replicas` | Number of Postgres replicas | `2` |
|
||||
| `storageClass` | StorageClass used to store the data | `""` |
|
||||
| `postgresql.parameters.max_connections` | Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections | `100` |
|
||||
| `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` |
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ spec:
|
||||
postgresql:
|
||||
parameters:
|
||||
max_wal_senders: "30"
|
||||
max_connections: “{{ .Values.postgresql.parameters.max_connections }}”
|
||||
|
||||
minSyncReplicas: {{ .Values.quorum.minSyncReplicas }}
|
||||
maxSyncReplicas: {{ .Values.quorum.maxSyncReplicas }}
|
||||
|
||||
@@ -22,6 +22,21 @@
|
||||
"description": "StorageClass used to store the data",
|
||||
"default": ""
|
||||
},
|
||||
"postgresql": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"max_connections": {
|
||||
"type": "string",
|
||||
"description": "Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections",
|
||||
"default": "100"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"quorum": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -10,6 +10,12 @@ size: 10Gi
|
||||
replicas: 2
|
||||
storageClass: ""
|
||||
|
||||
## Server Configuration
|
||||
## @param postgresql.parameters.max_connections Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections
|
||||
postgresql:
|
||||
parameters:
|
||||
max_connections: "100"
|
||||
|
||||
## 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).
|
||||
|
||||
@@ -4,9 +4,12 @@
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ----------------- | --------------------------------------------------------------------------------------------------------- | ------- |
|
||||
| `host` | The hostname used to access the grafana externally (defaults to 'grafana' subdomain for the tenant host). | `""` |
|
||||
| `metricsStorages` | Configuration of metrics storage instances | `[]` |
|
||||
| `logsStorages` | Configuration of logs storage instances | `[]` |
|
||||
| `oncall.enabled` | Enable Grafana OnCall | `false` |
|
||||
| Name | Description | Value |
|
||||
| ------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
|
||||
| `host` | The hostname used to access the grafana externally (defaults to 'grafana' subdomain for the tenant host). | `""` |
|
||||
| `metricsStorages` | Configuration of metrics storage instances | `[]` |
|
||||
| `logsStorages` | Configuration of logs storage instances | `[]` |
|
||||
| `alerta.storage` | Persistent Volume size for alerta database | `10Gi` |
|
||||
| `alerta.storageClassName` | StorageClass used to store the data | `""` |
|
||||
| `alerta.alerts.telegram.token` | telegram token for your bot | `7262461387:AAGtwq16iwuVtWtzoN6TUEMpF00fpC9Xz34` |
|
||||
| `alerta.alerts.telegram.chatID` | specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot | `-4520856007` |
|
||||
|
||||
16
packages/extra/monitoring/templates/alerta/alerta-db.yaml
Normal file
16
packages/extra/monitoring/templates/alerta/alerta-db.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: alerta-db
|
||||
spec:
|
||||
instances: 2
|
||||
storage:
|
||||
size: {{ required ".Values.alerta.storage is required" .Values.alerta.storage }}
|
||||
{{- with .Values.alerta.storageClassName }}
|
||||
storageClass: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
inheritedMetadata:
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
214
packages/extra/monitoring/templates/alerta/alerta.yaml
Normal file
214
packages/extra/monitoring/templates/alerta/alerta.yaml
Normal file
@@ -0,0 +1,214 @@
|
||||
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
|
||||
{{- $ingress := index $myNS.metadata.annotations "namespace.cozystack.io/ingress" }}
|
||||
{{- $host := index $myNS.metadata.annotations "namespace.cozystack.io/host" }}
|
||||
|
||||
{{- $apiKey := randAlphaNum 32 }}
|
||||
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "alerta" }}
|
||||
{{- if $existingSecret }}
|
||||
{{- $apiKey = index $existingSecret.data "alerta-api-key" | b64dec }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: alerta
|
||||
labels:
|
||||
app: alerta
|
||||
type: Opaque
|
||||
data:
|
||||
alerta-api-key: {{ $apiKey | b64enc }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: alerta
|
||||
labels:
|
||||
app: alerta
|
||||
data:
|
||||
config.js: |
|
||||
// contents of config.js
|
||||
'use strict';
|
||||
angular.module('config', [])
|
||||
.constant('config', {
|
||||
'endpoint' : "/api",
|
||||
'provider' : "basic"
|
||||
})
|
||||
.constant('colors', {});
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: alerta
|
||||
labels:
|
||||
app: alerta
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: alerta
|
||||
release: alerta
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: alerta
|
||||
labels:
|
||||
app: alerta
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: alerta
|
||||
release: alerta
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: alerta
|
||||
release: alerta
|
||||
spec:
|
||||
containers:
|
||||
- name: alerta
|
||||
image: "alerta/alerta-web:9.0.4"
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: ADMIN_USERS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: user
|
||||
name: grafana-admin-password
|
||||
- name: ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: password
|
||||
name: grafana-admin-password
|
||||
- name: ADMIN_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: alerta
|
||||
key: alerta-api-key
|
||||
- name: ALERTA_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: alerta
|
||||
key: alerta-api-key
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: alerta-db-app
|
||||
key: uri
|
||||
|
||||
- name: AUTH_REQUIRED
|
||||
value: "True"
|
||||
|
||||
{{- if and .Values.alerta.alerts.telegram.chatID .Values.alerta.alerts.telegram.token }}
|
||||
- name: "PLUGINS"
|
||||
value: "telegram"
|
||||
- name: TELEGRAM_CHAT_ID
|
||||
value: "{{ .Values.alerta.alerts.telegram.chatID }}"
|
||||
- name: TELEGRAM_TOKEN
|
||||
value: "{{ .Values.alerta.alerts.telegram.token }}"
|
||||
- name: TELEGRAM_WEBHOOK_URL
|
||||
value: "https://alerta.infra.aenix.org/api/webhooks/telegram?api-key={{ $apiKey }}"
|
||||
{{- end }}
|
||||
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 300
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
volumeMounts:
|
||||
- name: alerta-config
|
||||
mountPath: /app/config.js
|
||||
subPath: config.js
|
||||
volumes:
|
||||
- name: alerta-config
|
||||
configMap:
|
||||
name: alerta
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: alerta
|
||||
labels:
|
||||
app: alerta
|
||||
annotations:
|
||||
acme.cert-manager.io/http01-ingress-class: {{ $ingress }}
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: {{ $ingress }}
|
||||
tls:
|
||||
- hosts:
|
||||
- "{{ .Values.host | default (printf "alerta.%s" $host) }}"
|
||||
secretName: alerta-tls
|
||||
rules:
|
||||
- host: "{{ .Values.host | default (printf "alerta.%s" $host) }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: alerta
|
||||
port:
|
||||
name: http
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: alertmanager
|
||||
type: Opaque
|
||||
stringData:
|
||||
alertmanager.yaml: |
|
||||
global:
|
||||
resolve_timeout: 5m
|
||||
route:
|
||||
group_by: [alertname, namespace, cluster]
|
||||
group_wait: 15s
|
||||
group_interval: 15s
|
||||
repeat_interval: 1h
|
||||
receiver: 'alerta'
|
||||
routes:
|
||||
- receiver: alerta_no_resolve
|
||||
repeat_interval: 1m
|
||||
matchers:
|
||||
- 'event="Heartbeat"'
|
||||
- receiver: blackhole
|
||||
matchers:
|
||||
- 'severity="none"'
|
||||
- receiver: blackhole
|
||||
matchers:
|
||||
- 'alertname=~"CDIDefaultStorageClassDegraded|CDINoDefaultStorageClass"'
|
||||
receivers:
|
||||
- name: blackhole
|
||||
- name: "alerta"
|
||||
webhook_configs:
|
||||
- url: 'http://alerta/api/webhooks/prometheus?api-key={{ $apiKey }}'
|
||||
send_resolved: true
|
||||
- name: "alerta_no_resolve"
|
||||
webhook_configs:
|
||||
- url: 'http://alerta/api/webhooks/prometheus?api-key={{ $apiKey }}'
|
||||
send_resolved: false
|
||||
---
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMAlertmanager
|
||||
metadata:
|
||||
name: alertmanager
|
||||
spec:
|
||||
replicaCount: 3
|
||||
configSecret: alertmanager
|
||||
podMetadata:
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
@@ -9,6 +9,7 @@ rules:
|
||||
- ingresses
|
||||
resourceNames:
|
||||
- grafana-ingress
|
||||
- alerta
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups:
|
||||
- ""
|
||||
@@ -23,4 +24,5 @@ rules:
|
||||
- services
|
||||
resourceNames:
|
||||
- grafana-service
|
||||
- alerta
|
||||
verbs: ["get", "list", "watch"]
|
||||
|
||||
@@ -56,7 +56,7 @@ spec:
|
||||
mountPath: /var/lib/grafana
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:10.1.0
|
||||
image: grafana/grafana:11.2.0
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: false
|
||||
@@ -64,7 +64,7 @@ spec:
|
||||
failureThreshold: 3
|
||||
env:
|
||||
- name: GF_INSTALL_PLUGINS
|
||||
value: grafana-worldmap-panel,flant-statusmap-panel,grafana-oncall-app,natel-discrete-panel
|
||||
value: grafana-worldmap-panel,natel-discrete-panel
|
||||
- name: ONCALL_API_URL
|
||||
value: http://grafana-oncall-engine:8080
|
||||
- name: GF_DATABASE_HOST
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{{- if .Values.oncall.enabled }}
|
||||
---
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: grafana-oncall-db
|
||||
spec:
|
||||
instances: 2
|
||||
storage:
|
||||
size: 10Gi
|
||||
|
||||
inheritedMetadata:
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
{{- end }}
|
||||
@@ -1,66 +0,0 @@
|
||||
{{- if .Values.oncall.enabled }}
|
||||
---
|
||||
apiVersion: databases.spotahome.com/v1
|
||||
kind: RedisFailover
|
||||
metadata:
|
||||
name: grafana-oncall
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
sentinel:
|
||||
replicas: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 100Mi
|
||||
redis:
|
||||
replicas: 2
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
memory: 400Mi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 1000Mi
|
||||
storage:
|
||||
persistentVolumeClaim:
|
||||
metadata:
|
||||
name: redisfailover-persistent-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
exporter:
|
||||
enabled: true
|
||||
image: oliver006/redis_exporter:v1.55.0-alpine
|
||||
args:
|
||||
- --web.telemetry-path
|
||||
- /metrics
|
||||
env:
|
||||
- name: REDIS_EXPORTER_LOG_FORMAT
|
||||
value: txt
|
||||
customConfig:
|
||||
- tcp-keepalive 0
|
||||
- loglevel notice
|
||||
auth:
|
||||
secretPath: grafana-oncall-redis-password
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: grafana-oncall-redis-password
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
data:
|
||||
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "grafana-oncall-redis-password" }}
|
||||
{{- if $existingSecret }}
|
||||
password: {{ index $existingSecret.data "password" }}
|
||||
{{- else }}
|
||||
password: {{ randAlphaNum 32 | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,40 +0,0 @@
|
||||
{{- if .Values.oncall.enabled }}
|
||||
{{- $myNS := lookup "v1" "Namespace" "" .Release.Namespace }}
|
||||
{{- $host := index $myNS.metadata.annotations "namespace.cozystack.io/host" }}
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: grafana-oncall-system
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: cozy-grafana-oncall
|
||||
reconcileStrategy: Revision
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: cozystack-system
|
||||
namespace: cozy-system
|
||||
version: '*'
|
||||
interval: 1m0s
|
||||
timeout: 5m0s
|
||||
values:
|
||||
oncall:
|
||||
fullnameOverride: grafana-oncall
|
||||
externalGrafana:
|
||||
url: "https://{{ .Values.host | default (printf "grafana.%s" $host) }}/"
|
||||
|
||||
externalPostgresql:
|
||||
host: grafana-oncall-db-rw
|
||||
db_name: app
|
||||
user: app
|
||||
existingSecret: grafana-oncall-db-app
|
||||
passwordKey: password
|
||||
|
||||
externalRedis:
|
||||
host: rfrm-grafana-oncall
|
||||
existingSecret: {{ .Release.Name }}-oncall-redis-password
|
||||
passwordKey: password
|
||||
{{- end }}
|
||||
@@ -11,7 +11,7 @@ spec:
|
||||
extraArgs:
|
||||
remoteWrite.disablePathAppend: "true"
|
||||
notifiers:
|
||||
- url: http://vmalertmanager.{{ $.Release.Namespace }}.svc:9093
|
||||
- url: http://vmalertmanager-alertmanager.{{ $.Release.Namespace }}.svc:9093
|
||||
remoteRead:
|
||||
url: http://vmselect-{{ .name }}.{{ $.Release.Namespace }}.svc:8481/select/0/prometheus
|
||||
remoteWrite:
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: alertmanager
|
||||
type: Opaque
|
||||
stringData:
|
||||
alertmanager.yaml: |
|
||||
global:
|
||||
resolve_timeout: 5m
|
||||
route:
|
||||
group_by:
|
||||
- job
|
||||
- alertname
|
||||
group_wait: 30s
|
||||
group_interval: 5m
|
||||
repeat_interval: 12h
|
||||
receiver: 'webhook'
|
||||
receivers:
|
||||
- name: 'webhook'
|
||||
webhook_configs:
|
||||
- url: http://{{ .Release.Name }}-oncall-engine.{{ .Release.Namespace }}.svc:8080/integrations/v1/alertmanager/Kjb2NWxxSlgGtxz9F4ihovQBB/
|
||||
---
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMAlertmanager
|
||||
metadata:
|
||||
name: alertmanager
|
||||
spec:
|
||||
replicaCount: 2
|
||||
configSecret: alertmanager
|
||||
podMetadata:
|
||||
labels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
@@ -23,13 +23,38 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"oncall": {
|
||||
"alerta": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "Enable Grafana OnCall",
|
||||
"default": false
|
||||
"storage": {
|
||||
"type": "string",
|
||||
"description": "Persistent Volume size for alerta database",
|
||||
"default": "10Gi"
|
||||
},
|
||||
"storageClassName": {
|
||||
"type": "string",
|
||||
"description": "StorageClass used to store the data",
|
||||
"default": ""
|
||||
},
|
||||
"alerts": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"telegram": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string",
|
||||
"description": "telegram token for your bot",
|
||||
"default": "7262461387:AAGtwq16iwuVtWtzoN6TUEMpF00fpC9Xz34"
|
||||
},
|
||||
"chatID": {
|
||||
"type": "string",
|
||||
"description": "specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot",
|
||||
"default": "-4520856007"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,22 @@ logsStorages:
|
||||
storage: 10Gi
|
||||
storageClassName: replicated
|
||||
|
||||
## @param oncall.enabled Enable Grafana OnCall
|
||||
##
|
||||
oncall:
|
||||
enabled: false
|
||||
## Configuration for Alerta
|
||||
## @param alerta.storage Persistent Volume size for alerta database
|
||||
## @param alerta.storageClassName StorageClass used to store the data
|
||||
##
|
||||
alerta:
|
||||
storage: 10Gi
|
||||
storageClassName: ""
|
||||
|
||||
alerts:
|
||||
## @param alerta.alerts.telegram.token telegram token for your bot
|
||||
## @param alerta.alerts.telegram.chatID specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot
|
||||
## example:
|
||||
## telegram:
|
||||
## token: "7262461387:AAGtwq16iwuVtWtzoN6TUEMpF00fpC9Xz34"
|
||||
## chatID: "-4520856007"
|
||||
##
|
||||
telegram:
|
||||
token: ""
|
||||
chatID: ""
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
name: cluster-api
|
||||
spec:
|
||||
# https://github.com/kubernetes-sigs/cluster-api
|
||||
version: v1.7.3
|
||||
version: v1.8.3
|
||||
---
|
||||
apiVersion: operator.cluster.x-k8s.io/v1alpha2
|
||||
kind: ControlPlaneProvider
|
||||
@@ -13,7 +13,7 @@ metadata:
|
||||
name: kamaji
|
||||
spec:
|
||||
# https://github.com/clastix/cluster-api-control-plane-provider-kamaji
|
||||
version: v0.10.0
|
||||
version: v0.11.0
|
||||
---
|
||||
apiVersion: operator.cluster.x-k8s.io/v1alpha2
|
||||
kind: BootstrapProvider
|
||||
@@ -21,7 +21,7 @@ metadata:
|
||||
name: kubeadm
|
||||
spec:
|
||||
# https://github.com/kubernetes-sigs/cluster-api
|
||||
version: v1.7.3
|
||||
version: v1.8.3
|
||||
---
|
||||
apiVersion: operator.cluster.x-k8s.io/v1alpha2
|
||||
kind: InfrastructureProvider
|
||||
@@ -29,4 +29,4 @@ metadata:
|
||||
name: kubevirt
|
||||
spec:
|
||||
# https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt
|
||||
version: v0.1.8
|
||||
version: v0.1.9
|
||||
|
||||
@@ -73,7 +73,6 @@ rules:
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- etcd.aenix.io
|
||||
resources:
|
||||
|
||||
@@ -8,7 +8,7 @@ annotations:
|
||||
- name: Upstream Project
|
||||
url: https://github.com/controlplaneio-fluxcd/flux-operator
|
||||
apiVersion: v2
|
||||
appVersion: v0.6.0
|
||||
appVersion: v0.9.0
|
||||
description: 'A Helm chart for deploying the Flux Operator. '
|
||||
home: https://github.com/controlplaneio-fluxcd
|
||||
icon: https://raw.githubusercontent.com/cncf/artwork/main/projects/flux/icon/color/flux-icon-color.png
|
||||
@@ -18,13 +18,11 @@ keywords:
|
||||
- gitops
|
||||
kubeVersion: '>=1.22.0-0'
|
||||
maintainers:
|
||||
- email: stefan.prodan@control-plane.io
|
||||
name: Stefan Prodan
|
||||
- name: Soule Ba
|
||||
url: soule.ba@control-plane.io
|
||||
- email: flux-enterprise@control-plane.io
|
||||
name: ControlPlane Flux Team
|
||||
name: flux-operator
|
||||
sources:
|
||||
- https://github.com/controlplaneio-fluxcd/flux-operator
|
||||
- https://github.com/controlplaneio-fluxcd/charts
|
||||
type: application
|
||||
version: 0.6.0
|
||||
version: 0.9.0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# flux-operator
|
||||
|
||||
  
|
||||
  
|
||||
|
||||
The [Flux Operator](https://github.com/controlplaneio-fluxcd) provides a declarative API
|
||||
for the installation and upgrade of CNCF [Flux](https://fluxcd.io) and the
|
||||
The [Flux Operator](https://github.com/controlplaneio-fluxcd/flux-operator) provides a
|
||||
declarative API for the installation and upgrade of CNCF [Flux](https://fluxcd.io) and the
|
||||
ControlPlane [enterprise distribution](https://control-plane.io/enterprise-for-flux-cd/).
|
||||
|
||||
The operator automates the patching for hotfixes and CVEs affecting the Flux controllers container images
|
||||
@@ -49,6 +49,7 @@ see the Flux Operator [documentation](https://fluxcd.control-plane.io/operator/)
|
||||
| resources | object | `{"limits":{"cpu":"1000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"64Mi"}}` | Container resources requests and limits settings. |
|
||||
| securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Container security context settings. The default is compliant with the pod security restricted profile. |
|
||||
| serviceAccount | object | `{"automount":true,"create":true,"name":""}` | Pod service account settings. The name of the service account defaults to the release name. |
|
||||
| serviceMonitor | object | `{"create":false,"interval":"60s","labels":{},"scrapeTimeout":"30s"}` | Prometheus Operator scraping settings. |
|
||||
| tolerations | list | `[]` | Pod tolerations settings. |
|
||||
|
||||
## Source Code
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.15.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
helm.sh/resource-policy: keep
|
||||
labels:
|
||||
app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||
@@ -77,6 +77,12 @@ spec:
|
||||
NetworkPolicy restricts network access to the current namespace.
|
||||
Defaults to true.
|
||||
type: boolean
|
||||
tenantDefaultServiceAccount:
|
||||
description: |-
|
||||
TenantDefaultServiceAccount is the name of the service account
|
||||
to use as default when the multitenant lockdown is enabled.
|
||||
Defaults to the 'default' service account from the tenant namespace.
|
||||
type: string
|
||||
type:
|
||||
default: kubernetes
|
||||
description: |-
|
||||
@@ -202,6 +208,29 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
migrateResources:
|
||||
default: true
|
||||
description: |-
|
||||
MigrateResources instructs the controller to migrate the Flux custom resources
|
||||
from the previous version to the latest API version specified in the CRD.
|
||||
Defaults to true.
|
||||
type: boolean
|
||||
sharding:
|
||||
description: Sharding holds the specification of the sharding configuration.
|
||||
properties:
|
||||
key:
|
||||
default: sharding.fluxcd.io/key
|
||||
description: Key is the label key used to shard the resources.
|
||||
type: string
|
||||
shards:
|
||||
description: Shards is the list of shard names.
|
||||
items:
|
||||
type: string
|
||||
minItems: 1
|
||||
type: array
|
||||
required:
|
||||
- shards
|
||||
type: object
|
||||
storage:
|
||||
description: |-
|
||||
Storage holds the specification of the source-controller
|
||||
@@ -274,7 +303,6 @@ spec:
|
||||
type: boolean
|
||||
required:
|
||||
- distribution
|
||||
- wait
|
||||
type: object
|
||||
status:
|
||||
description: FluxInstanceStatus defines the observed state of FluxInstance
|
||||
@@ -307,16 +335,8 @@ spec:
|
||||
conditions:
|
||||
description: Conditions contains the readiness conditions of the object.
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
@@ -357,12 +377,7 @@ spec:
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
@@ -429,7 +444,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.15.0
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
helm.sh/resource-policy: keep
|
||||
labels:
|
||||
app.kubernetes.io/instance: '{{ .Release.Name }}'
|
||||
@@ -622,16 +637,8 @@ spec:
|
||||
conditions:
|
||||
description: Conditions contains the readiness conditions of the object.
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
description: Condition contains details for one aspect of the current
|
||||
state of this API Resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
@@ -672,12 +679,7 @@ spec:
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
|
||||
@@ -18,10 +18,13 @@ spec:
|
||||
{{- include "flux-operator.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
prometheus.io/path: "/metrics"
|
||||
{{- with .Values.commonAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "flux-operator.labels" . | nindent 8 }}
|
||||
{{- with .Values.commonLabels }}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{{- if .Values.serviceMonitor.create }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "flux-operator.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "flux-operator.labels" . | nindent 4 }}
|
||||
{{- with .Values.commonLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.serviceMonitor.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace | quote }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "flux-operator.selectorLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- targetPort: 8080
|
||||
path: /metrics
|
||||
interval: {{ .Values.serviceMonitor.interval }}
|
||||
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
@@ -293,6 +293,29 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"serviceMonitor": {
|
||||
"default": {
|
||||
"create": false,
|
||||
"interval": "60s",
|
||||
"scrapeTimeout": "30s"
|
||||
},
|
||||
"properties": {
|
||||
"create": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"interval": {
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"properties": {},
|
||||
"type": "object"
|
||||
},
|
||||
"scrapeTimeout": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"tolerations": {
|
||||
"items": {
|
||||
"type": "object"
|
||||
|
||||
@@ -84,14 +84,21 @@ affinity: # @schema default: {"nodeAffinity":{"requiredDuringSchedulingIgnoredDu
|
||||
# -- Pod tolerations settings.
|
||||
tolerations: [ ] # @schema item: object ; uniqueItems: true
|
||||
|
||||
# -- Marketplace settings.
|
||||
marketplace:
|
||||
type: ""
|
||||
license: ""
|
||||
account: ""
|
||||
|
||||
# -- If `true`, the container ports (`8080` and `8081`) are exposed on the host network.
|
||||
hostNetwork: false # @schema default: false
|
||||
|
||||
# -- Container extra environment variables.
|
||||
extraEnvs: [ ] # @schema item: object ; uniqueItems: true
|
||||
|
||||
# -- Prometheus Operator scraping settings.
|
||||
serviceMonitor: # @schema default: {"create":false,"interval":"60s","scrapeTimeout":"30s"}
|
||||
create: false
|
||||
interval: 60s
|
||||
scrapeTimeout: 30s
|
||||
labels: { }
|
||||
|
||||
# -- Marketplace settings.
|
||||
marketplace:
|
||||
type: ""
|
||||
license: ""
|
||||
account: ""
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
apiVersion: v2
|
||||
name: cozy-grafana-oncall
|
||||
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
|
||||
@@ -1,10 +0,0 @@
|
||||
NAME=grafana-oncall-system
|
||||
|
||||
include ../../../scripts/package.mk
|
||||
|
||||
update:
|
||||
rm -rf charts
|
||||
helm repo add grafana https://grafana.github.io/helm-charts
|
||||
helm repo update grafana
|
||||
helm pull grafana/oncall --untar --untardir charts
|
||||
rm -rf charts/oncall/charts
|
||||
@@ -1,27 +0,0 @@
|
||||
dependencies:
|
||||
- name: cert-manager
|
||||
repository: https://charts.jetstack.io
|
||||
version: v1.8.0
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 12.2.5
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 11.9.10
|
||||
- name: rabbitmq
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 12.0.0
|
||||
- name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 16.13.2
|
||||
- name: grafana
|
||||
repository: https://grafana.github.io/helm-charts
|
||||
version: 6.57.1
|
||||
- name: ingress-nginx
|
||||
repository: https://kubernetes.github.io/ingress-nginx
|
||||
version: 4.1.4
|
||||
- name: prometheus
|
||||
repository: https://prometheus-community.github.io/helm-charts
|
||||
version: 25.8.2
|
||||
digest: sha256:edc9fef449a694cd319135e37ac84f8247ac9ad0c48ac86099dae4e428beb7b7
|
||||
generated: "2024-01-26T17:54:48.132209769Z"
|
||||
@@ -1,39 +0,0 @@
|
||||
apiVersion: v2
|
||||
appVersion: v1.3.94
|
||||
dependencies:
|
||||
- condition: cert-manager.enabled
|
||||
name: cert-manager
|
||||
repository: https://charts.jetstack.io
|
||||
version: v1.8.0
|
||||
- condition: mariadb.enabled
|
||||
name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 12.2.5
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 11.9.10
|
||||
- condition: rabbitmq.enabled
|
||||
name: rabbitmq
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 12.0.0
|
||||
- condition: redis.enabled
|
||||
name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 16.13.2
|
||||
- condition: grafana.enabled
|
||||
name: grafana
|
||||
repository: https://grafana.github.io/helm-charts
|
||||
version: 6.57.1
|
||||
- condition: ingress-nginx.enabled
|
||||
name: ingress-nginx
|
||||
repository: https://kubernetes.github.io/ingress-nginx
|
||||
version: 4.1.4
|
||||
- condition: prometheus.enabled
|
||||
name: prometheus
|
||||
repository: https://prometheus-community.github.io/helm-charts
|
||||
version: 25.8.2
|
||||
description: Developer-friendly incident response with brilliant Slack integration
|
||||
name: oncall
|
||||
type: application
|
||||
version: 1.3.94
|
||||
@@ -1,431 +0,0 @@
|
||||
# Grafana OnCall Helm Chart
|
||||
|
||||
This Grafana OnCall Chart is the best way to operate Grafana OnCall on Kubernetes.
|
||||
It will deploy Grafana OnCall engine and celery workers, along with RabbitMQ cluster, Redis Cluster, and MySQL 5.7 database.
|
||||
It will also deploy cert manager and nginx ingress controller, as Grafana OnCall backend might need to be externally available
|
||||
to receive alerts from other monitoring systems. Grafana OnCall engine acts as a backend and can be connected to the
|
||||
Grafana frontend plugin named Grafana OnCall.
|
||||
Architecture diagram can be found [here](https://raw.githubusercontent.com/grafana/oncall/dev/docs/img/architecture_diagram.png)
|
||||
|
||||
## Production usage
|
||||
|
||||
**Default helm chart configuration is not intended for production.**
|
||||
The helm chart includes all the services into a single release, which is not recommended for production usage.
|
||||
It is recommended to run stateful services such as MySQL and RabbitMQ separately from this release or use managed
|
||||
PaaS solutions. It will significantly reduce the overhead of managing them.
|
||||
Here are the instructions on how to set up your own [ingress](#set-up-external-access), [MySQL](#connect-external-mysql),
|
||||
[RabbitMQ](#connect-external-rabbitmq), [Redis](#connect-external-redis)
|
||||
|
||||
### Cluster requirements
|
||||
|
||||
- ensure you can run x86-64/amd64 workloads. arm64 architecture is currently not supported
|
||||
- kubernetes version 1.25+ is not supported, if cert-manager is enabled
|
||||
|
||||
## Install
|
||||
|
||||
### Prepare the repo
|
||||
|
||||
```bash
|
||||
# Add the repository
|
||||
helm repo add grafana https://grafana.github.io/helm-charts
|
||||
helm repo update
|
||||
```
|
||||
|
||||
### Installing the helm chart
|
||||
|
||||
```bash
|
||||
# Install the chart
|
||||
helm install \
|
||||
--wait \
|
||||
--set base_url=example.com \
|
||||
--set grafana."grafana\.ini".server.domain=example.com \
|
||||
release-oncall \
|
||||
grafana/oncall
|
||||
```
|
||||
|
||||
Follow the `helm install` output to finish setting up Grafana OnCall backend and Grafana OnCall frontend plugin e.g.
|
||||
|
||||
```bash
|
||||
👋 Your Grafana OnCall instance has been successfully deployed
|
||||
|
||||
❗ Set up a DNS record for your domain (use A Record and "@" to point a root domain to the IP address)
|
||||
Get the external IP address by running the following commands and point example.com to it:
|
||||
|
||||
kubectl get ingress release-oncall -o jsonpath="{.status.loadBalancer.ingress[0].ip}"
|
||||
|
||||
Wait until the dns record got propagated.
|
||||
NOTE: Check with the following command: nslookup example.com
|
||||
Try reaching https://example.com/ready/ from the browser, make sure it is not cached locally
|
||||
|
||||
🦎 Grafana was installed as a part of this helm release. Open https://example.com/grafana/plugins/grafana-oncall-app
|
||||
The User is admin
|
||||
Get password by running this command:
|
||||
|
||||
kubectl get secret --namespace default release-oncall-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
|
||||
|
||||
🔗 Connect Grafana OnCall Plugin to Grafana OnCall backend:
|
||||
|
||||
Fill the Grafana OnCall Backend URL:
|
||||
|
||||
http://release-oncall-engine:8080
|
||||
|
||||
🎉🎉🎉 Done! 🎉🎉🎉
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
You can edit values.yml to make changes to the helm chart configuration and re-deploy the release with the following command:
|
||||
|
||||
```bash
|
||||
helm upgrade \
|
||||
--install \
|
||||
--wait \
|
||||
--set base_url=example.com \
|
||||
--set grafana."grafana\.ini".server.domain=example.com \
|
||||
release-oncall \
|
||||
grafana/oncall
|
||||
```
|
||||
|
||||
### Passwords and external secrets
|
||||
|
||||
As OnCall subcharts are Bitname charts, there is a common approach to secrets. Bundled charts allow specifying passwords
|
||||
in values.yaml explicitly or as K8s secret value. OnCall chart refers either to secret created in sub-chart or
|
||||
to specified external secret.
|
||||
Similarly, if component chart is disabled, the password(s) can be supplied in `external<Component>` value
|
||||
(e.g. externalMysql) explicitly or as K8s secret value. In the first case, the secret is created with the specified
|
||||
value. In the second case the external secret is used.
|
||||
|
||||
- If `<subchart>.auth.existingSecret` is non-empty, then this secret is used. Secret keys are pre-defined by chart.
|
||||
- If subchart supports password files and `<subchart>.customPasswordFiles` dictionary is non-empty, then password files
|
||||
are used. Dictionary keys are pre-defined per sub-chart. Password files are not supported by OnCall chart and should
|
||||
not be used with bundled sub-charts.
|
||||
- Passwords are specified via `auth` section values, e.g. `auth.password`. K8s secret is created.
|
||||
- If `<subchart>.auth.forcePassword` is `true`, then passwords MUST be specified. Otherwise, missing passwords
|
||||
are generated.
|
||||
|
||||
If external component is used instead of the bundled one:
|
||||
|
||||
- If existingSecret within appropriate external component values is non-empty (e.g. `externalMysql.existingSecret`) then
|
||||
it is used together with corresponding key names, e.g. `externalMysql.passwordKey`.
|
||||
- Otherwise, corresponding password values are used, e.g. `externalMysql.password`. K8s secret is created by OnCall chart.
|
||||
|
||||
Below is the summary for the dependent charts.
|
||||
|
||||
MySQL/MariaDB:
|
||||
|
||||
```yaml
|
||||
database:
|
||||
type: "mysql" # This is default
|
||||
mariaDB:
|
||||
enabled: true # Default
|
||||
auth:
|
||||
existingSecret: ""
|
||||
forcePassword: false
|
||||
# Secret name: `<release>-mariadb`
|
||||
rootPassword: "" # Secret key: mariadb-root-password
|
||||
password: "" # Secret key: mariadb-password
|
||||
replicationPassword: "" # Secret key: mariadb-replication-password
|
||||
externalMysql:
|
||||
password: ""
|
||||
existingSecret: ""
|
||||
passwordKey: ""
|
||||
```
|
||||
|
||||
Postgres:
|
||||
|
||||
```yaml
|
||||
database:
|
||||
type: postgresql
|
||||
mariadb:
|
||||
enabled: false # Must be set to false for Postgres
|
||||
postgresql:
|
||||
enabled: true # Must be set to true for bundled Postgres
|
||||
auth:
|
||||
existingSecret: ""
|
||||
secretKeys:
|
||||
adminPasswordKey: ""
|
||||
userPasswordKey: "" # Not needed
|
||||
replicationPasswordKey: "" # Not needed with disabled replication
|
||||
# Secret name: `<release>-postgresql`
|
||||
postgresPassword: "" # password for admin user postgres. As non-admin user is not created, only this one is relevant.
|
||||
password: "" # Not needed
|
||||
replicationPassword: "" # Not needed with disabled replication
|
||||
externalPostgresql:
|
||||
user: ""
|
||||
password: ""
|
||||
existingSecret: ""
|
||||
passwordKey: ""
|
||||
```
|
||||
|
||||
Rabbitmq:
|
||||
|
||||
```yaml
|
||||
rabbitmq:
|
||||
enabled: true
|
||||
auth:
|
||||
existingPasswordSecret: "" # Must contain `rabbitmq-password` key
|
||||
existingErlangSecret: "" # Must contain `rabbitmq-erlang-cookie` key
|
||||
# Secret name: `<release>-rabbitmq`
|
||||
password: ""
|
||||
erlangCookie: ""
|
||||
externalRabbitmq:
|
||||
user: ""
|
||||
password: ""
|
||||
existingSecret: ""
|
||||
passwordKey: ""
|
||||
usernameKey: ""
|
||||
```
|
||||
|
||||
Redis:
|
||||
|
||||
```yaml
|
||||
redis:
|
||||
enabled: true
|
||||
auth:
|
||||
existingSecret: ""
|
||||
existingSecretPasswordKey: ""
|
||||
# Secret name: `<release>-redis`
|
||||
password: ""
|
||||
externalRedis:
|
||||
password: ""
|
||||
existingSecret: ""
|
||||
passwordKey: ""
|
||||
```
|
||||
|
||||
### Running split ingestion and API services
|
||||
|
||||
You can run a detached service for handling integrations by setting up the following variables:
|
||||
|
||||
```yaml
|
||||
detached_integrations:
|
||||
enabled: true
|
||||
detached_integrations_service:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
This will run an integrations-only service listening by default in port 30003.
|
||||
|
||||
### Set up Slack and Telegram
|
||||
|
||||
You can set up Slack connection via following variables:
|
||||
|
||||
```yaml
|
||||
oncall:
|
||||
slack:
|
||||
enabled: true
|
||||
commandName: oncall
|
||||
clientId: ~
|
||||
clientSecret: ~
|
||||
signingSecret: ~
|
||||
existingSecret: ""
|
||||
clientIdKey: ""
|
||||
clientSecretKey: ""
|
||||
signingSecretKey: ""
|
||||
redirectHost: ~
|
||||
```
|
||||
|
||||
`oncall.slack.commandName` is used for changing default bot slash command,
|
||||
`oncall`. In slack, it could be called via `/<oncall.slack.commandName>`.
|
||||
|
||||
To set up Telegram token and webhook url use:
|
||||
|
||||
```yaml
|
||||
oncall:
|
||||
telegram:
|
||||
enabled: true
|
||||
token: ~
|
||||
webhookUrl: ~
|
||||
```
|
||||
|
||||
To use Telegram long polling instead of webhook use:
|
||||
|
||||
```yaml
|
||||
telegramPolling:
|
||||
enabled: true
|
||||
```
|
||||
|
||||
### Set up external access
|
||||
|
||||
Grafana OnCall can be connected to the external monitoring systems or grafana deployed to the other cluster.
|
||||
Nginx Ingress Controller and Cert Manager charts are included in the helm chart with the default configuration.
|
||||
If you set the DNS A Record pointing to the external IP address of the installation with the Hostname matching
|
||||
base_url parameter, https will be automatically set up. If grafana is enabled in the chart values, it will also be
|
||||
available on `https://<base_url>/grafana/`. See the details in `helm install` output.
|
||||
|
||||
To use a different ingress controller or tls certificate management system, set the following values to
|
||||
false and edit ingress settings
|
||||
|
||||
```yaml
|
||||
ingress-nginx:
|
||||
enabled: false
|
||||
|
||||
cert-manager:
|
||||
enabled: false
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
cert-manager.io/issuer: "letsencrypt-prod"
|
||||
```
|
||||
|
||||
### Use PostgreSQL instead of MySQL
|
||||
|
||||
It is possible to use PostgreSQL instead of MySQL. To do so, set mariadb.enabled to `false`,
|
||||
postgresql.enabled to `true` and database.type to `postgresql`.
|
||||
|
||||
```yaml
|
||||
mariadb:
|
||||
enabled: false
|
||||
|
||||
postgresql:
|
||||
enabled: true
|
||||
|
||||
database:
|
||||
type: postgresql
|
||||
```
|
||||
|
||||
### Connect external MySQL
|
||||
|
||||
It is recommended to use the managed MySQL 5.7 database provided by your cloud provider
|
||||
Make sure to create the database with the following parameters before installing this chart
|
||||
|
||||
```sql
|
||||
CREATE DATABASE oncall CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
```
|
||||
|
||||
To use an external MySQL instance set mariadb.enabled to `false` and configure the `externalMysql` parameters.
|
||||
|
||||
```yaml
|
||||
mariadb:
|
||||
enabled: false
|
||||
|
||||
# Make sure to create the database with the following parameters:
|
||||
# CREATE DATABASE oncall CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
externalMysql:
|
||||
host:
|
||||
port:
|
||||
db_name:
|
||||
user:
|
||||
password:
|
||||
existingSecret: ""
|
||||
usernameKey: username
|
||||
passwordKey: password
|
||||
```
|
||||
|
||||
### Connect external PostgreSQL
|
||||
|
||||
To use an external PostgreSQL instance set mariadb.enabled to `false`,
|
||||
postgresql.enabled to `false`, database.type to `postgresql` and configure
|
||||
the `externalPostgresql` parameters.
|
||||
|
||||
```yaml
|
||||
mariadb:
|
||||
enabled: false
|
||||
|
||||
postgresql:
|
||||
enabled: false
|
||||
|
||||
database:
|
||||
type: postgresql
|
||||
|
||||
# Make sure to create the database with the following parameters:
|
||||
# CREATE DATABASE oncall WITH ENCODING UTF8;
|
||||
externalPostgresql:
|
||||
host:
|
||||
port:
|
||||
db_name:
|
||||
user:
|
||||
password:
|
||||
existingSecret: ""
|
||||
passwordKey: password
|
||||
```
|
||||
|
||||
### Connect external RabbitMQ
|
||||
|
||||
Option 1. Install RabbitMQ separately into the cluster using the [official documentation](https://www.rabbitmq.com/kubernetes/operator/operator-overview.html)
|
||||
Option 2. Use managed solution such as [CloudAMPQ](https://www.cloudamqp.com/)
|
||||
|
||||
To use an external RabbitMQ instance set rabbitmq.enabled to `false` and configure the `externalRabbitmq` parameters.
|
||||
|
||||
```yaml
|
||||
rabbitmq:
|
||||
enabled: false # Disable the RabbitMQ dependency from the release
|
||||
|
||||
externalRabbitmq:
|
||||
host:
|
||||
port:
|
||||
user:
|
||||
password:
|
||||
protocol:
|
||||
vhost:
|
||||
existingSecret: ""
|
||||
passwordKey: password
|
||||
usernameKey: username
|
||||
```
|
||||
|
||||
### Connect external Redis
|
||||
|
||||
To use an external Redis instance set redis.enabled to `false` and configure the `externalRedis` parameters.
|
||||
|
||||
```yaml
|
||||
redis:
|
||||
enabled: false # Disable the Redis dependency from the release
|
||||
|
||||
externalRedis:
|
||||
host:
|
||||
password:
|
||||
existingSecret: ""
|
||||
passwordKey: password
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
```bash
|
||||
# Add & upgrade the repository
|
||||
helm repo add grafana https://grafana.github.io/helm-charts
|
||||
helm repo update
|
||||
|
||||
# Re-deploy
|
||||
helm upgrade \
|
||||
--install \
|
||||
--wait \
|
||||
--set base_url=example.com \
|
||||
--set grafana."grafana\.ini".server.domain=example.com \
|
||||
release-oncall \
|
||||
grafana/oncall
|
||||
```
|
||||
|
||||
After re-deploying, please also update the Grafana OnCall plugin on the plugin version page.
|
||||
See [Grafana docs](https://grafana.com/docs/grafana/latest/administration/plugin-management/#update-a-plugin) for
|
||||
more info on updating Grafana plugins.
|
||||
|
||||
## Uninstall
|
||||
|
||||
### Uninstalling the helm chart
|
||||
|
||||
```bash
|
||||
helm delete release-oncall
|
||||
```
|
||||
|
||||
### Clean up PVC's
|
||||
|
||||
```bash
|
||||
kubectl delete pvc data-release-oncall-mariadb-0 data-release-oncall-rabbitmq-0 \
|
||||
redis-data-release-oncall-redis-master-0 redis-data-release-oncall-redis-replicas-0 \
|
||||
redis-data-release-oncall-redis-replicas-1 redis-data-release-oncall-redis-replicas-2
|
||||
```
|
||||
|
||||
### Clean up secrets
|
||||
|
||||
```bash
|
||||
kubectl delete secrets certificate-tls release-oncall-cert-manager-webhook-ca release-oncall-ingress-nginx-admission
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issues during initial configuration
|
||||
|
||||
In the event that you run into issues during initial configuration, it is possible that mismatching versions between
|
||||
your OnCall backend and UI is the culprit. Ensure that the versions match, and if not,
|
||||
consider updating your `helm` deployment.
|
||||
@@ -1,41 +0,0 @@
|
||||
=================================================================
|
||||
📞 Grafana OnCall Notes
|
||||
=================================================================
|
||||
|
||||
👋 Your Grafana OnCall instance has been successfully deployed
|
||||
|
||||
{{- if not .Values.migrate.enabled }}
|
||||
🤖 To migrate the database run these commands:
|
||||
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oncall.name" . }},app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=engine" -o jsonpath="{.items[0].metadata.name}")
|
||||
kubectl exec -it $POD_NAME -c wait-for-db -- bash -c "python manage.py migrate;"
|
||||
{{- end }}
|
||||
|
||||
❗ Set up a DNS record for your domain (use A Record and "@" to point a root domain to the IP address)
|
||||
Get the external IP address by running the following commands and point {{ .Values.base_url }} to it:
|
||||
|
||||
kubectl get ingress {{ include "oncall.fullname" . }} -o jsonpath="{.status.loadBalancer.ingress[0].ip}"
|
||||
|
||||
Wait until the dns record got propagated.
|
||||
NOTE: Check with the following command: nslookup {{ .Values.base_url }}
|
||||
Try reaching https://{{ .Values.base_url }}/ready/ from the browser, make sure it is not cached locally
|
||||
|
||||
{{- if .Values.grafana.enabled }}
|
||||
🦎 Grafana was installed as a part of this helm release. Open https://{{ .Values.base_url }}/grafana/plugins/grafana-oncall-app
|
||||
The User is {{ .Values.grafana.adminUser }}
|
||||
Get password by running this command:
|
||||
|
||||
kubectl get secret --namespace {{ .Release.Namespace }} {{ template "oncall.grafana.fullname" . }} -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
|
||||
|
||||
{{- else }}
|
||||
🦎 Grafana was NOT installed as a part of this helm release. Open external Grafana, go to "Configuration" - "Plugins" and find Grafana OnCall plugin
|
||||
NOTE: Make sure your external Grafana is available by the network for the containers installed by this release.
|
||||
{{- end }}
|
||||
|
||||
🔗 Connect Grafana OnCall Plugin to Grafana OnCall backend:
|
||||
|
||||
Fill the Grafana OnCall Backend URL:
|
||||
|
||||
http://{{ include "oncall.engine.fullname" . }}:8080
|
||||
|
||||
🎉🎉🎉 Done! 🎉🎉🎉
|
||||
@@ -1,656 +0,0 @@
|
||||
{{- define "snippet.oncall.env" -}}
|
||||
- name: BASE_URL
|
||||
value: {{ .Values.base_url_protocol }}://{{ .Values.base_url }}
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.oncall.secret.name" . }}
|
||||
key: {{ include "snippet.oncall.secret.secretKey" . | quote }}
|
||||
- name: MIRAGE_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.oncall.secret.name" . }}
|
||||
key: {{ include "snippet.oncall.secret.mirageSecretKey" . | quote }}
|
||||
- name: MIRAGE_CIPHER_IV
|
||||
value: {{ .Values.oncall.mirageCipherIV | default "1234567890abcdef" | quote }}
|
||||
- name: DJANGO_SETTINGS_MODULE
|
||||
value: "settings.helm"
|
||||
- name: AMIXR_DJANGO_ADMIN_PATH
|
||||
value: "admin"
|
||||
- name: OSS
|
||||
value: "True"
|
||||
- name: DETACHED_INTEGRATIONS_SERVER
|
||||
value: {{ .Values.detached_integrations.enabled | toString | title | quote }}
|
||||
{{- include "snippet.oncall.uwsgi" . }}
|
||||
- name: BROKER_TYPE
|
||||
value: {{ .Values.broker.type | default "rabbitmq" }}
|
||||
- name: GRAFANA_API_URL
|
||||
value: {{ include "snippet.grafana.url" . | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.secret.name" -}}
|
||||
{{ if .Values.oncall.secrets.existingSecret -}}
|
||||
{{ .Values.oncall.secrets.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.secret.secretKey" -}}
|
||||
{{ if .Values.oncall.secrets.existingSecret -}}
|
||||
{{ required "oncall.secrets.secretKey is required if oncall.secret.existingSecret is not empty" .Values.oncall.secrets.secretKey }}
|
||||
{{- else -}}
|
||||
SECRET_KEY
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.secret.mirageSecretKey" -}}
|
||||
{{ if .Values.oncall.secrets.existingSecret -}}
|
||||
{{ required "oncall.secrets.mirageSecretKey is required if oncall.secret.existingSecret is not empty" .Values.oncall.secrets.mirageSecretKey }}
|
||||
{{- else -}}
|
||||
MIRAGE_SECRET_KEY
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.uwsgi" -}}
|
||||
{{- if .Values.uwsgi }}
|
||||
{{- range $key, $value := .Values.uwsgi }}
|
||||
- name: UWSGI_{{ $key | upper | replace "-" "_" }}
|
||||
value: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.slack.env" -}}
|
||||
- name: FEATURE_SLACK_INTEGRATION_ENABLED
|
||||
value: {{ .Values.oncall.slack.enabled | toString | title | quote }}
|
||||
{{- if .Values.oncall.slack.enabled }}
|
||||
- name: SLACK_SLASH_COMMAND_NAME
|
||||
value: "/{{ .Values.oncall.slack.commandName | default "oncall" }}"
|
||||
{{- if .Values.oncall.slack.existingSecret }}
|
||||
- name: SLACK_CLIENT_OAUTH_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.oncall.slack.existingSecret }}
|
||||
key: {{ required "oncall.slack.clientIdKey is required if oncall.slack.existingSecret is not empty" .Values.oncall.slack.clientIdKey | quote }}
|
||||
- name: SLACK_CLIENT_OAUTH_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.oncall.slack.existingSecret }}
|
||||
key: {{ required "oncall.slack.clientSecretKey is required if oncall.slack.existingSecret is not empty" .Values.oncall.slack.clientSecretKey | quote }}
|
||||
- name: SLACK_SIGNING_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.oncall.slack.existingSecret }}
|
||||
key: {{ required "oncall.slack.signingSecretKey is required if oncall.slack.existingSecret is not empty" .Values.oncall.slack.signingSecretKey | quote }}
|
||||
{{- else }}
|
||||
- name: SLACK_CLIENT_OAUTH_ID
|
||||
value: {{ .Values.oncall.slack.clientId | default "" | quote }}
|
||||
- name: SLACK_CLIENT_OAUTH_SECRET
|
||||
value: {{ .Values.oncall.slack.clientSecret | default "" | quote }}
|
||||
- name: SLACK_SIGNING_SECRET
|
||||
value: {{ .Values.oncall.slack.signingSecret | default "" | quote }}
|
||||
{{- end }}
|
||||
- name: SLACK_INSTALL_RETURN_REDIRECT_HOST
|
||||
value: {{ .Values.oncall.slack.redirectHost | default (printf "https://%s" .Values.base_url) | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.telegram.env" -}}
|
||||
{{- if .Values.telegramPolling.enabled -}}
|
||||
{{- $_ := set .Values.oncall.telegram "enabled" true -}}
|
||||
{{- end -}}
|
||||
- name: FEATURE_TELEGRAM_INTEGRATION_ENABLED
|
||||
value: {{ .Values.oncall.telegram.enabled | toString | title | quote }}
|
||||
{{- if .Values.oncall.telegram.enabled }}
|
||||
{{- if .Values.telegramPolling.enabled }}
|
||||
- name: FEATURE_TELEGRAM_LONG_POLLING_ENABLED
|
||||
value: {{ .Values.telegramPolling.enabled | toString | title | quote }}
|
||||
{{- end }}
|
||||
- name: TELEGRAM_WEBHOOK_HOST
|
||||
value: {{ .Values.oncall.telegram.webhookUrl | default (printf "https://%s" .Values.base_url) | quote }}
|
||||
{{- if .Values.oncall.telegram.existingSecret }}
|
||||
- name: TELEGRAM_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.oncall.telegram.existingSecret }}
|
||||
key: {{ required "oncall.telegram.tokenKey is required if oncall.telegram.existingSecret is not empty" .Values.oncall.telegram.tokenKey | quote }}
|
||||
{{- else }}
|
||||
- name: TELEGRAM_TOKEN
|
||||
value: {{ .Values.oncall.telegram.token | default "" | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.twilio.env" }}
|
||||
{{- with .Values.oncall.twilio }}
|
||||
{{- if .existingSecret }}
|
||||
- name: TWILIO_ACCOUNT_SID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .existingSecret }}
|
||||
key: {{ required "oncall.twilio.accountSid is required if oncall.twilio.existingSecret is not empty" .accountSid | quote }}
|
||||
{{- if .authTokenKey }}
|
||||
- name: TWILIO_AUTH_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .existingSecret }}
|
||||
key: {{ required "oncall.twilio.authTokenKey is required if oncall.twilio.existingSecret is not empty" .authTokenKey | quote }}
|
||||
{{- end }}
|
||||
- name: TWILIO_NUMBER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .existingSecret }}
|
||||
key: {{ required "oncall.twilio.phoneNumberKey is required if oncall.twilio.existingSecret is not empty" .phoneNumberKey | quote }}
|
||||
- name: TWILIO_VERIFY_SERVICE_SID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .existingSecret }}
|
||||
key: {{ required "oncall.twilio.verifySidKey is required if oncall.twilio.existingSecret is not empty" .verifySidKey | quote }}
|
||||
{{- if and .apiKeySidKey .apiKeySecretKey }}
|
||||
- name: TWILIO_API_KEY_SID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .existingSecret }}
|
||||
key: {{ required "oncall.twilio.apiKeySidKey is required if oncall.twilio.existingSecret is not empty" .apiKeySidKey | quote }}
|
||||
- name: TWILIO_API_KEY_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .existingSecret }}
|
||||
key: {{ required "oncall.twilio.apiKeySecretKey is required if oncall.twilio.existingSecret is not empty" .apiKeySecretKey | quote }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- if .accountSid }}
|
||||
- name: TWILIO_ACCOUNT_SID
|
||||
value: {{ .accountSid | quote }}
|
||||
{{- end }}
|
||||
{{- if .authToken }}
|
||||
- name: TWILIO_AUTH_TOKEN
|
||||
value: {{ .authToken | quote }}
|
||||
{{- end }}
|
||||
{{- if .phoneNumber }}
|
||||
- name: TWILIO_NUMBER
|
||||
value: {{ .phoneNumber | quote }}
|
||||
{{- end }}
|
||||
{{- if .verifySid }}
|
||||
- name: TWILIO_VERIFY_SERVICE_SID
|
||||
value: {{ .verifySid | quote }}
|
||||
{{- end }}
|
||||
{{- if .apiKeySid }}
|
||||
- name: TWILIO_API_KEY_SID
|
||||
value: {{ .apiKeySid | quote }}
|
||||
{{- end }}
|
||||
{{- if .apiKeySecret }}
|
||||
- name: TWILIO_API_KEY_SECRET
|
||||
value: {{ .apiKeySecret | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .limitPhone }}
|
||||
- name: PHONE_NOTIFICATIONS_LIMIT
|
||||
value: {{ .limitPhone | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.celery.env" }}
|
||||
{{- if .Values.celery.worker_queue }}
|
||||
- name: CELERY_WORKER_QUEUE
|
||||
value: {{ .Values.celery.worker_queue | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.celery.worker_concurrency }}
|
||||
- name: CELERY_WORKER_CONCURRENCY
|
||||
value: {{ .Values.celery.worker_concurrency | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.celery.worker_max_tasks_per_child }}
|
||||
- name: CELERY_WORKER_MAX_TASKS_PER_CHILD
|
||||
value: {{ .Values.celery.worker_max_tasks_per_child | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.celery.worker_beat_enabled }}
|
||||
- name: CELERY_WORKER_BEAT_ENABLED
|
||||
value: {{ .Values.celery.worker_beat_enabled | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.celery.worker_shutdown_interval }}
|
||||
- name: CELERY_WORKER_SHUTDOWN_INTERVAL
|
||||
value: {{ .Values.celery.worker_shutdown_interval | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.grafana.url" -}}
|
||||
{{ if .Values.grafana.enabled -}}
|
||||
http://{{ include "oncall.grafana.fullname" . }}
|
||||
{{- else -}}
|
||||
{{ required "externalGrafana.url is required when not grafana.enabled" .Values.externalGrafana.url }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.env" -}}
|
||||
- name: MYSQL_HOST
|
||||
value: {{ include "snippet.mysql.host" . | quote }}
|
||||
- name: MYSQL_PORT
|
||||
value: {{ include "snippet.mysql.port" . | quote }}
|
||||
- name: MYSQL_DB_NAME
|
||||
value: {{ include "snippet.mysql.db" . | quote }}
|
||||
- name: MYSQL_USER
|
||||
{{- if and (not .Values.mariadb.enabled) .Values.externalMysql.existingSecret .Values.externalMysql.usernameKey (not .Values.externalMysql.user) }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.mysql.password.secret.name" . }}
|
||||
key: {{ .Values.externalMysql.usernameKey | quote }}
|
||||
{{- else }}
|
||||
value: {{ include "snippet.mysql.user" . | quote }}
|
||||
{{- end }}
|
||||
- name: MYSQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.mysql.password.secret.name" . }}
|
||||
key: {{ include "snippet.mysql.password.secret.key" . | quote }}
|
||||
{{- if not .Values.mariadb.enabled }}
|
||||
{{- with .Values.externalMysql.options }}
|
||||
- name: MYSQL_OPTIONS
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.password.secret.name" -}}
|
||||
{{ if .Values.mariadb.enabled -}}
|
||||
{{ if .Values.mariadb.auth.existingSecret -}}
|
||||
{{ .Values.mariadb.auth.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.mariadb.fullname" . }}
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{ if .Values.externalMysql.existingSecret -}}
|
||||
{{ .Values.externalMysql.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.fullname" . }}-mysql-external
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.password.secret.key" -}}
|
||||
{{ if and (not .Values.mariadb.enabled) .Values.externalMysql.existingSecret .Values.externalMysql.passwordKey -}}
|
||||
{{ .Values.externalMysql.passwordKey }}
|
||||
{{- else -}}
|
||||
mariadb-root-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.host" -}}
|
||||
{{ if and (not .Values.mariadb.enabled) .Values.externalMysql.host -}}
|
||||
{{ .Values.externalMysql.host }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.mariadb.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.port" -}}
|
||||
{{ if and (not .Values.mariadb.enabled) .Values.externalMysql.port -}}
|
||||
{{ .Values.externalMysql.port }}
|
||||
{{- else -}}
|
||||
3306
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.db" -}}
|
||||
{{ if and (not .Values.mariadb.enabled) .Values.externalMysql.db_name -}}
|
||||
{{ .Values.externalMysql.db_name }}
|
||||
{{- else -}}
|
||||
{{ .Values.mariadb.auth.database | default "oncall" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.mysql.user" -}}
|
||||
{{ if and (not .Values.mariadb.enabled) .Values.externalMysql.user -}}
|
||||
{{ .Values.externalMysql.user }}
|
||||
{{- else -}}
|
||||
{{ .Values.mariadb.auth.username | default "root" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.env" -}}
|
||||
- name: DATABASE_TYPE
|
||||
value: {{ .Values.database.type | quote }}
|
||||
- name: DATABASE_HOST
|
||||
value: {{ include "snippet.postgresql.host" . | quote }}
|
||||
- name: DATABASE_PORT
|
||||
value: {{ include "snippet.postgresql.port" . | quote }}
|
||||
- name: DATABASE_NAME
|
||||
value: {{ include "snippet.postgresql.db" . | quote }}
|
||||
- name: DATABASE_USER
|
||||
value: {{ include "snippet.postgresql.user" . | quote }}
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.postgresql.password.secret.name" . }}
|
||||
key: {{ include "snippet.postgresql.password.secret.key" . | quote }}
|
||||
{{- if not .Values.postgresql.enabled }}
|
||||
{{- with .Values.externalPostgresql.options }}
|
||||
- name: DATABASE_OPTIONS
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.sqlite.env" -}}
|
||||
- name: DATABASE_TYPE
|
||||
value: sqlite3
|
||||
- name: DATABASE_NAME
|
||||
value: /etc/app/oncall.db
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.password.secret.name" -}}
|
||||
{{ if .Values.postgresql.enabled -}}
|
||||
{{ if .Values.postgresql.auth.existingSecret -}}
|
||||
{{ .Values.postgresql.auth.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.postgresql.fullname" . }}
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{ if .Values.externalPostgresql.existingSecret -}}
|
||||
{{ .Values.externalPostgresql.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.fullname" . }}-postgresql-external
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.password.secret.key" -}}
|
||||
{{ if .Values.postgresql.enabled -}}
|
||||
{{ if .Values.postgresql.auth.existingSecret -}}
|
||||
{{ required "postgresql.auth.secretKeys.adminPasswordKey is required if database.type=postgres and postgresql.enabled and postgresql.auth.existingSecret" .Values.postgresql.auth.secretKeys.adminPasswordKey }}
|
||||
{{- else -}}
|
||||
{{ include "postgresql.userPasswordKey" .Subcharts.postgresql }}
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{ if .Values.externalPostgresql.existingSecret -}}
|
||||
{{ required "externalPostgresql.passwordKey is required if database.type=postgres and not postgresql.enabled and postgresql.auth.existingSecret" .Values.externalPostgresql.passwordKey }}
|
||||
{{- else -}}
|
||||
postgres-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.host" -}}
|
||||
{{ if not .Values.postgresql.enabled -}}
|
||||
{{ required "externalPostgresql.host is required if database.type=postgres and not postgresql.enabled" .Values.externalPostgresql.host }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.postgresql.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.port" -}}
|
||||
{{ if and (not .Values.postgresql.enabled) .Values.externalPostgresql.port -}}
|
||||
{{ .Values.externalPostgresql.port }}
|
||||
{{- else -}}
|
||||
5432
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.db" -}}
|
||||
{{ if not .Values.postgresql.enabled -}}
|
||||
{{ .Values.externalPostgresql.db_name | default "oncall" }}
|
||||
{{- else -}}
|
||||
{{ .Values.postgresql.auth.database | default "oncall" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.postgresql.user" -}}
|
||||
{{ if not .Values.postgresql.enabled -}}
|
||||
{{ .Values.externalPostgresql.user | default "postgres" }}
|
||||
{{- else -}}
|
||||
{{ .Values.postgresql.auth.username | default "postgres" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.env" }}
|
||||
- name: RABBITMQ_USERNAME
|
||||
{{- if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.existingSecret .Values.externalRabbitmq.usernameKey (not .Values.externalRabbitmq.user) }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.rabbitmq.password.secret.name" . }}
|
||||
key: {{ .Values.externalRabbitmq.usernameKey | quote }}
|
||||
{{- else }}
|
||||
value: {{ include "snippet.rabbitmq.user" . | quote }}
|
||||
{{- end }}
|
||||
- name: RABBITMQ_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.rabbitmq.password.secret.name" . }}
|
||||
key: {{ include "snippet.rabbitmq.password.secret.key" . | quote }}
|
||||
- name: RABBITMQ_HOST
|
||||
value: {{ include "snippet.rabbitmq.host" . | quote }}
|
||||
- name: RABBITMQ_PORT
|
||||
value: {{ include "snippet.rabbitmq.port" . | quote }}
|
||||
- name: RABBITMQ_PROTOCOL
|
||||
value: {{ include "snippet.rabbitmq.protocol" . | quote }}
|
||||
- name: RABBITMQ_VHOST
|
||||
value: {{ include "snippet.rabbitmq.vhost" . | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.user" -}}
|
||||
{{ if not .Values.rabbitmq.enabled -}}
|
||||
{{ required "externalRabbitmq.user is required if not rabbitmq.enabled" .Values.externalRabbitmq.user }}
|
||||
{{- else -}}
|
||||
user
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.host" -}}
|
||||
{{ if not .Values.rabbitmq.enabled -}}
|
||||
{{ required "externalRabbitmq.host is required if not rabbitmq.enabled" .Values.externalRabbitmq.host }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.rabbitmq.fullname" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.port" -}}
|
||||
{{ if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.port -}}
|
||||
{{ required "externalRabbitmq.port is required if not rabbitmq.enabled" .Values.externalRabbitmq.port }}
|
||||
{{- else -}}
|
||||
5672
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.protocol" -}}
|
||||
{{ if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.protocol -}}
|
||||
{{ .Values.externalRabbitmq.protocol }}
|
||||
{{- else -}}
|
||||
amqp
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.vhost" -}}
|
||||
{{ if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.vhost -}}
|
||||
{{ .Values.externalRabbitmq.vhost }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.password.secret.name" -}}
|
||||
{{ if .Values.rabbitmq.enabled -}}
|
||||
{{ if .Values.rabbitmq.auth.existingPasswordSecret -}}
|
||||
{{ .Values.rabbitmq.auth.existingPasswordSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.rabbitmq.fullname" . }}
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{ if .Values.externalRabbitmq.existingSecret -}}
|
||||
{{ .Values.externalRabbitmq.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.fullname" . }}-rabbitmq-external
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.rabbitmq.password.secret.key" -}}
|
||||
{{ if and (not .Values.rabbitmq.enabled) .Values.externalRabbitmq.passwordKey -}}
|
||||
{{ .Values.externalRabbitmq.passwordKey }}
|
||||
{{- else -}}
|
||||
rabbitmq-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.protocol" -}}
|
||||
{{ default "redis" .Values.externalRedis.protocol | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.host" -}}
|
||||
{{ if not .Values.redis.enabled -}}
|
||||
{{ required "externalRedis.host is required if not redis.enabled" .Values.externalRedis.host | quote }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.redis.fullname" . }}-master
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.port" -}}
|
||||
{{ default 6379 .Values.externalRedis.port | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.database" -}}
|
||||
{{ default 0 .Values.externalRedis.database | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.password.secret.name" -}}
|
||||
{{ if .Values.redis.enabled -}}
|
||||
{{ if .Values.redis.auth.existingSecret -}}
|
||||
{{ .Values.redis.auth.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.redis.fullname" . }}
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{ if .Values.externalRedis.existingSecret -}}
|
||||
{{ .Values.externalRedis.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "oncall.fullname" . }}-redis-external
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.password.secret.key" -}}
|
||||
{{ if .Values.redis.enabled -}}
|
||||
{{ if .Values.redis.auth.existingSecret -}}
|
||||
{{ required "redis.auth.existingSecretPasswordKey is required if redis.auth.existingSecret is non-empty" .Values.redis.auth.existingSecretPasswordKey }}
|
||||
{{- else -}}
|
||||
redis-password
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{ if .Values.externalRedis.existingSecret -}}
|
||||
{{ required "externalRedis.passwordKey is required if externalRedis.existingSecret is non-empty" .Values.externalRedis.passwordKey }}
|
||||
{{- else -}}
|
||||
redis-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.redis.env" -}}
|
||||
- name: REDIS_PROTOCOL
|
||||
value: {{ include "snippet.redis.protocol" . }}
|
||||
- name: REDIS_HOST
|
||||
value: {{ include "snippet.redis.host" . }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ include "snippet.redis.port" . }}
|
||||
- name: REDIS_DATABASE
|
||||
value: {{ include "snippet.redis.database" . }}
|
||||
- name: REDIS_USERNAME
|
||||
value: {{ default "" .Values.externalRedis.username | quote }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "snippet.redis.password.secret.name" . }}
|
||||
key: {{ include "snippet.redis.password.secret.key" . | quote}}
|
||||
{{- if and (not .Values.redis.enabled) .Values.externalRedis.ssl_options.enabled }}
|
||||
- name: REDIS_USE_SSL
|
||||
value: "true"
|
||||
{{- with .Values.externalRedis.ssl_options.ca_certs }}
|
||||
- name: REDIS_SSL_CA_CERTS
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.externalRedis.ssl_options.certfile }}
|
||||
- name: REDIS_SSL_CERTFILE
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.externalRedis.ssl_options.keyfile }}
|
||||
- name: REDIS_SSL_KEYFILE
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.externalRedis.ssl_options.cert_reqs }}
|
||||
- name: REDIS_SSL_CERT_REQS
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /*
|
||||
when broker.type != rabbitmq, we do not need to include rabbitmq environment variables
|
||||
*/}}
|
||||
{{- define "snippet.broker.env" -}}
|
||||
{{- include "snippet.redis.env" . }}
|
||||
{{- if eq .Values.broker.type "rabbitmq" -}}
|
||||
{{- include "snippet.rabbitmq.env" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.db.env" -}}
|
||||
{{- if eq .Values.database.type "mysql" }}
|
||||
{{- include "snippet.mysql.env" . }}
|
||||
{{- else if eq .Values.database.type "postgresql" }}
|
||||
{{- include "snippet.postgresql.env" . }}
|
||||
{{- else if eq .Values.database.type "sqlite" -}}
|
||||
{{- include "snippet.sqlite.env" . }}
|
||||
{{- else -}}
|
||||
{{- fail "value for .Values.db.type must be either 'mysql', 'postgresql', or 'sqlite'" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.smtp.env" -}}
|
||||
- name: FEATURE_EMAIL_INTEGRATION_ENABLED
|
||||
value: {{ .Values.oncall.smtp.enabled | toString | title | quote }}
|
||||
{{- if .Values.oncall.smtp.enabled }}
|
||||
- name: EMAIL_HOST
|
||||
value: {{ .Values.oncall.smtp.host | quote }}
|
||||
- name: EMAIL_PORT
|
||||
value: {{ .Values.oncall.smtp.port | default "587" | quote }}
|
||||
- name: EMAIL_HOST_USER
|
||||
value: {{ .Values.oncall.smtp.username | quote }}
|
||||
- name: EMAIL_HOST_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "oncall.fullname" . }}-smtp
|
||||
key: smtp-password
|
||||
optional: true
|
||||
- name: EMAIL_USE_TLS
|
||||
value: {{ .Values.oncall.smtp.tls | default true | toString | title | quote }}
|
||||
- name: EMAIL_FROM_ADDRESS
|
||||
value: {{ .Values.oncall.smtp.fromEmail | quote }}
|
||||
- name: EMAIL_NOTIFICATIONS_LIMIT
|
||||
value: {{ .Values.oncall.smtp.limitEmail | default "200" | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.exporter.env" -}}
|
||||
{{ if .Values.oncall.exporter.enabled -}}
|
||||
- name: FEATURE_PROMETHEUS_EXPORTER_ENABLED
|
||||
value: {{ .Values.oncall.exporter.enabled | toString | title | quote }}
|
||||
- name: PROMETHEUS_EXPORTER_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "oncall.fullname" . }}-exporter
|
||||
key: exporter-secret
|
||||
optional: true
|
||||
{{- else -}}
|
||||
- name: FEATURE_PROMETHEUS_EXPORTER_ENABLED
|
||||
value: {{ .Values.oncall.exporter.enabled | toString | title | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "snippet.oncall.engine.env" -}}
|
||||
{{ include "snippet.oncall.env" . }}
|
||||
{{ include "snippet.oncall.slack.env" . }}
|
||||
{{ include "snippet.oncall.telegram.env" . }}
|
||||
{{ include "snippet.oncall.smtp.env" . }}
|
||||
{{ include "snippet.oncall.twilio.env" . }}
|
||||
{{ include "snippet.oncall.exporter.env" . }}
|
||||
{{ include "snippet.db.env" . }}
|
||||
{{ include "snippet.broker.env" . }}
|
||||
{{ include "oncall.extraEnvs" . }}
|
||||
{{- end }}
|
||||
@@ -1,121 +0,0 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "oncall.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "oncall.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "oncall.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "oncall.labels" -}}
|
||||
helm.sh/chart: {{ include "oncall.chart" . }}
|
||||
{{ include "oncall.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "oncall.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "oncall.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "oncall.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "oncall.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Generate the fullname of mariadb subchart */}}
|
||||
{{- define "oncall.mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Generate the fullname of postgresql subchart */}}
|
||||
{{- define "oncall.postgresql.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "oncall.grafana.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "grafana" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Generate the fullname of rabbitmq subchart */}}
|
||||
{{- define "oncall.rabbitmq.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "rabbitmq" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Generate the fullname of redis subchart */}}
|
||||
{{- define "oncall.redis.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Generate engine image name */}}
|
||||
{{- define "oncall.engine.image" -}}
|
||||
{{- printf "%s:%s" .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "oncall.initContainer" }}
|
||||
- name: wait-for-db
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ['sh', '-c', "until (python manage.py migrate --check); do echo Waiting for database migrations; sleep 2; done"]
|
||||
securityContext:
|
||||
{{ toYaml .Values.init.securityContext | nindent 4 }}
|
||||
resources:
|
||||
{{ toYaml .Values.init.resources | nindent 4 }}
|
||||
env:
|
||||
{{- include "snippet.oncall.env" . | nindent 4 }}
|
||||
{{- include "snippet.db.env" . | nindent 4 }}
|
||||
{{- include "snippet.broker.env" . | nindent 4 }}
|
||||
{{- include "oncall.extraEnvs" . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "oncall.extraEnvs" -}}
|
||||
{{- if .Values.env }}
|
||||
{{- if (kindIs "map" .Values.env) }}
|
||||
{{- range $key, $value := .Values.env }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $value }}
|
||||
{{- end -}}
|
||||
{{/* support previous schema */}}
|
||||
{{- else }}
|
||||
{{- toYaml .Values.env }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{/*
|
||||
Maximum of 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "oncall.celery.name" -}}
|
||||
{{ include "oncall.name" . | trunc 55 }}-celery
|
||||
{{- end }}
|
||||
|
||||
{{- define "oncall.celery.fullname" -}}
|
||||
{{ include "oncall.fullname" . | trunc 55 }}-celery
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Engine common labels
|
||||
*/}}
|
||||
{{- define "oncall.celery.labels" -}}
|
||||
{{ include "oncall.labels" . }}
|
||||
app.kubernetes.io/component: celery
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Engine selector labels
|
||||
*/}}
|
||||
{{- define "oncall.celery.selectorLabels" -}}
|
||||
{{ include "oncall.selectorLabels" . }}
|
||||
app.kubernetes.io/component: celery
|
||||
{{- end }}
|
||||
@@ -1,89 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "oncall.celery.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.celery.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.celery.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "oncall.celery.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
random-annotation: {{ randAlphaNum 10 | lower }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "oncall.celery.selectorLabels" . | nindent 8 }}
|
||||
{{- if .Values.celery.podLabels }}
|
||||
{{- toYaml .Values.celery.podLabels | nindent 8}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "oncall.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
{{- include "oncall.initContainer" . | indent 8 }}
|
||||
{{- with .Values.celery.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: {{ include "oncall.engine.image" . }}
|
||||
{{- if .Values.oncall.devMode }}
|
||||
command: ["python", "manage.py", "start_celery"]
|
||||
{{- else }}
|
||||
command: ["./celery_with_exporter.sh"]
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
{{- include "snippet.celery.env" . | nindent 12 }}
|
||||
{{- include "snippet.oncall.engine.env" . | nindent 12 }}
|
||||
{{- if .Values.celery.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: [
|
||||
"bash",
|
||||
"-c",
|
||||
"celery -A engine inspect ping -d celery@$HOSTNAME"
|
||||
]
|
||||
initialDelaySeconds: {{ .Values.celery.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.celery.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.celery.livenessProbe.timeoutSeconds }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.celery.resources | nindent 12 }}
|
||||
{{- with .Values.celery.extraVolumeMounts }}
|
||||
volumeMounts: {{- . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.extraContainers }}
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.extraVolumes }}
|
||||
volumes: {{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -1,22 +0,0 @@
|
||||
{{- if (index .Values "cert-manager").enabled }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: letsencrypt-prod
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
spec:
|
||||
acme:
|
||||
# The ACME server URL
|
||||
server: https://acme-v02.api.letsencrypt.org/directory
|
||||
# Email address used for ACME registration
|
||||
email: no-reply@{{ .Values.base_url }}
|
||||
# Name of a secret used to store the ACME account private key
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt-prod
|
||||
# Enable the HTTP-01 challenge provider
|
||||
solvers:
|
||||
- http01:
|
||||
ingress:
|
||||
class: nginx
|
||||
{{- end }}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{/*
|
||||
Maximum of 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "oncall.engine.name" -}}
|
||||
{{ include "oncall.name" . | trunc 55 }}-engine
|
||||
{{- end }}
|
||||
|
||||
{{- define "oncall.engine.fullname" -}}
|
||||
{{ include "oncall.fullname" . | trunc 55 }}-engine
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Engine common labels
|
||||
*/}}
|
||||
{{- define "oncall.engine.labels" -}}
|
||||
{{ include "oncall.labels" . }}
|
||||
app.kubernetes.io/component: engine
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Engien selector labels
|
||||
*/}}
|
||||
{{- define "oncall.engine.selectorLabels" -}}
|
||||
{{ include "oncall.selectorLabels" . }}
|
||||
app.kubernetes.io/component: engine
|
||||
{{- end }}
|
||||
@@ -1,98 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "oncall.engine.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.engine.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.engine.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "oncall.engine.selectorLabels" . | nindent 6 }}
|
||||
strategy:
|
||||
{{- toYaml .Values.engine.updateStrategy | nindent 4 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
random-annotation: {{ randAlphaNum 10 | lower }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "oncall.engine.selectorLabels" . | nindent 8 }}
|
||||
{{- if .Values.engine.podLabels }}
|
||||
{{- toYaml .Values.engine.podLabels | nindent 8}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "oncall.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
{{- include "oncall.initContainer" . | indent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: {{ include "oncall.engine.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.oncall.devMode }}
|
||||
command: ["sh", "-c", "uwsgi --disable-logging --py-autoreload 3 --ini uwsgi.ini"]
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
env:
|
||||
{{- include "snippet.oncall.engine.env" . | nindent 12 }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health/
|
||||
port: http
|
||||
periodSeconds: 60
|
||||
timeoutSeconds: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready/
|
||||
port: http
|
||||
periodSeconds: 60
|
||||
timeoutSeconds: 3
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /startupprobe/
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
resources:
|
||||
{{- toYaml .Values.engine.resources | nindent 12 }}
|
||||
{{- with .Values.engine.extraVolumeMounts }}
|
||||
volumeMounts: {{- . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.extraContainers }}
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.engine.extraVolumes }}
|
||||
volumes: {{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -1,102 +0,0 @@
|
||||
{{- if .Values.migrate.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
{{- if .Values.migrate.useHook }}
|
||||
name: {{ printf "%s-migrate" (include "oncall.engine.fullname" .) }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-1"
|
||||
{{- with .Values.migrate.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
name: {{ printf "%s-migrate-%s" (include "oncall.engine.fullname" .) (now | date "2006-01-02-15-04-05") }}
|
||||
{{- with .Values.migrate.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "oncall.engine.labels" . | nindent 4 }}
|
||||
spec:
|
||||
backoffLimit: 15
|
||||
{{- if .Values.migrate.ttlSecondsAfterFinished }}
|
||||
ttlSecondsAfterFinished: {{ .Values.migrate.ttlSecondsAfterFinished }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ printf "%s-migrate-%s" (include "oncall.engine.fullname" .) (now | date "2006-01-02-15-04-05") }}
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
random-annotation: {{ randAlphaNum 10 | lower }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "oncall.engine.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "oncall.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- with .Values.migrate.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.migrate.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.migrate.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-migrate
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: {{ include "oncall.engine.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
{{- if eq .Values.database.type "mysql" }}
|
||||
- |
|
||||
until (nc -vz $MYSQL_HOST $MYSQL_PORT);
|
||||
do
|
||||
echo "waiting for MySQL"; sleep 1;
|
||||
done
|
||||
python manage.py migrate
|
||||
{{- else if eq .Values.database.type "postgresql" }}
|
||||
- |
|
||||
until (nc -vz $DATABASE_HOST $DATABASE_PORT);
|
||||
do
|
||||
echo "waiting for PostgreSQL"; sleep 1;
|
||||
done
|
||||
python manage.py migrate
|
||||
{{- else }}
|
||||
- python manage.py migrate
|
||||
{{- end }}
|
||||
env:
|
||||
{{- include "snippet.oncall.env" . | nindent 12 }}
|
||||
{{- include "snippet.oncall.smtp.env" . | nindent 12 }}
|
||||
{{- include "snippet.oncall.exporter.env" . | nindent 12 }}
|
||||
{{- include "snippet.db.env" . | nindent 12 }}
|
||||
{{- include "snippet.broker.env" . | nindent 12 }}
|
||||
{{- include "oncall.extraEnvs" . | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.migrate.resources | nindent 12 }}
|
||||
{{- with .Values.migrate.extraVolumeMounts }}
|
||||
volumeMounts: {{- . | toYaml | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.migrate.extraContainers }}
|
||||
{{- tpl . $ | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.migrate.extraVolumes }}
|
||||
volumes: {{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,24 +0,0 @@
|
||||
{{- if .Values.service.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "oncall.engine.fullname" . }}-external
|
||||
labels:
|
||||
{{- include "oncall.engine.labels" . | nindent 4 }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- if and (eq .Values.service.type "NodePort") (.Values.service.nodePort) }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "oncall.engine.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,15 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "oncall.engine.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.engine.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "oncall.engine.selectorLabels" . | nindent 4 }}
|
||||
@@ -1,65 +0,0 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "oncall.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "oncall.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- tpl (toYaml .Values.ingress.tls) . | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.base_url | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.ingress.extraPaths }}
|
||||
{{ toYaml .Values.ingress.extraPaths | indent 6}}
|
||||
{{- end }}
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "oncall.engine.fullname" . }}
|
||||
port:
|
||||
number: 8080
|
||||
{{ if .Values.grafana.enabled }}
|
||||
- path: /grafana
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "oncall.grafana.fullname" . }}
|
||||
port:
|
||||
number: 80
|
||||
{{- end }}
|
||||
{{ if .Values.detached_integrations.enabled }}
|
||||
- path: /integrations
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "oncall.detached_integrations.fullname" . }}
|
||||
port:
|
||||
number: 8080
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,26 +0,0 @@
|
||||
{{/*
|
||||
Maximum of 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "oncall.detached_integrations.name" -}}
|
||||
{{ include "oncall.name" . | trunc 55 }}-integrations
|
||||
{{- end }}
|
||||
|
||||
{{- define "oncall.detached_integrations.fullname" -}}
|
||||
{{ include "oncall.fullname" . | trunc 55 }}-integrations
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Integrations common labels
|
||||
*/}}
|
||||
{{- define "oncall.detached_integrations.labels" -}}
|
||||
{{ include "oncall.labels" . }}
|
||||
app.kubernetes.io/component: integrations
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Integrations selector labels
|
||||
*/}}
|
||||
{{- define "oncall.detached_integrations.selectorLabels" -}}
|
||||
{{ include "oncall.selectorLabels" . }}
|
||||
app.kubernetes.io/component: integrations
|
||||
{{- end }}
|
||||
@@ -1,99 +0,0 @@
|
||||
{{- if .Values.detached_integrations.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "oncall.detached_integrations.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.detached_integrations.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.detached_integrations.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "oncall.detached_integrations.selectorLabels" . | nindent 6 }}
|
||||
strategy:
|
||||
{{- toYaml .Values.detached_integrations.updateStrategy | nindent 4 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
random-annotation: {{ randAlphaNum 10 | lower }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "oncall.detached_integrations.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "oncall.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
{{- include "oncall.initContainer" . | indent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: {{ include "oncall.engine.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.oncall.devMode }}
|
||||
command: ["sh", "-c", "uwsgi --disable-logging --py-autoreload 3 --ini uwsgi.ini"]
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
env:
|
||||
{{- include "snippet.oncall.engine.env" . | nindent 12 }}
|
||||
- name: ROOT_URLCONF
|
||||
value: "engine.integrations_urls"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health/
|
||||
port: http
|
||||
periodSeconds: 60
|
||||
timeoutSeconds: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready/
|
||||
port: http
|
||||
periodSeconds: 60
|
||||
timeoutSeconds: 3
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /startupprobe/
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
resources:
|
||||
{{- toYaml .Values.detached_integrations.resources | nindent 12 }}
|
||||
{{- with .Values.detached_integrations.extraVolumeMounts }}
|
||||
volumeMounts: {{- . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.extraContainers }}
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.detached_integrations.extraVolumes }}
|
||||
volumes: {{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -1,24 +0,0 @@
|
||||
{{- if .Values.detached_integrations_service.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "oncall.detached_integrations.fullname" . }}-external
|
||||
labels:
|
||||
{{- include "oncall.detached_integrations.labels" . | nindent 4 }}
|
||||
{{- with .Values.detached_integrations_service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.detached_integrations_service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.detached_integrations_service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- if and (eq .Values.detached_integrations_service.type "NodePort") (.Values.detached_integrations_service.nodePort) }}
|
||||
nodePort: {{ .Values.detached_integrations_service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "oncall.detached_integrations.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -1,17 +0,0 @@
|
||||
{{- if .Values.detached_integrations.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "oncall.detached_integrations.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.detached_integrations.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "oncall.detached_integrations.selectorLabels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
@@ -1,98 +0,0 @@
|
||||
{{- if not .Values.oncall.secrets.existingSecret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.labels" . | nindent 4 }}
|
||||
{{- if .Values.migrate.useHook }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{ include "snippet.oncall.secret.secretKey" . }}: {{ randAlphaNum 40 | b64enc | quote }}
|
||||
{{ include "snippet.oncall.secret.mirageSecretKey" . }}: {{ randAlphaNum 40 | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.database.type "mysql") (not .Values.mariadb.enabled) (not .Values.externalMysql.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}-mysql-external
|
||||
{{- if .Values.migrate.useHook }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
mariadb-root-password: {{ required "externalMysql.password is required if not mariadb.enabled and not externalMysql.existingSecret" .Values.externalMysql.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (not .Values.postgresql.enabled) (eq .Values.database.type "postgresql") (not .Values.externalPostgresql.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}-postgresql-external
|
||||
{{- if .Values.migrate.useHook }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
postgres-password: {{ required "externalPostgresql.password is required if not postgresql.enabled and not externalPostgresql.existingSecret" .Values.externalPostgresql.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.broker.type "rabbitmq") (not .Values.rabbitmq.enabled) (not .Values.externalRabbitmq.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}-rabbitmq-external
|
||||
{{- if .Values.migrate.useHook }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
rabbitmq-password: {{ required "externalRabbitmq.password is required if not rabbitmq.enabled and not externalRabbitmq.existingSecret" .Values.externalRabbitmq.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.broker.type "redis") (not .Values.redis.enabled) (not .Values.externalRedis.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}-redis-external
|
||||
{{- if .Values.migrate.useHook }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
redis-password: {{ required "externalRedis.password is required if not redis.enabled and not externalRedis.existingSecret" .Values.externalRedis.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and .Values.oncall.smtp.enabled .Values.oncall.smtp.password }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}-smtp
|
||||
type: Opaque
|
||||
data:
|
||||
smtp-password: {{ .Values.oncall.smtp.password | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- if and .Values.oncall.exporter.enabled .Values.oncall.exporter.authToken }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "oncall.fullname" . }}-exporter
|
||||
type: Opaque
|
||||
data:
|
||||
exporter-secret: {{ .Values.oncall.exporter.authToken | b64enc | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
@@ -1,18 +0,0 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "oncall.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "oncall.labels" . | nindent 4 }}
|
||||
{{- if or (.Values.migrate.useHook) (.Values.serviceAccount.annotations) }}
|
||||
annotations:
|
||||
{{- if .Values.migrate.useHook }}
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- end }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,22 +0,0 @@
|
||||
{{/*
|
||||
Maximum of 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "oncall.telegramPolling.fullname" -}}
|
||||
{{ include "oncall.fullname" . | trunc 45 }}-telegram-polling
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Telegram polling common labels
|
||||
*/}}
|
||||
{{- define "oncall.telegramPolling.labels" -}}
|
||||
{{ include "oncall.labels" . }}
|
||||
app.kubernetes.io/component: telegram-polling
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Telegram polling selector labels
|
||||
*/}}
|
||||
{{- define "oncall.telegramPolling.selectorLabels" -}}
|
||||
{{ include "oncall.selectorLabels" . }}
|
||||
app.kubernetes.io/component: telegram-polling
|
||||
{{- end }}
|
||||
@@ -1,53 +0,0 @@
|
||||
{{- if .Values.telegramPolling.enabled -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "oncall.telegramPolling.fullname" . }}
|
||||
labels:
|
||||
{{- include "oncall.telegramPolling.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "oncall.telegramPolling.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "oncall.telegramPolling.selectorLabels" . | nindent 8 }}
|
||||
{{- if .Values.telegramPolling.podLabels }}
|
||||
{{- toYaml .Values.telegramPolling.podLabels | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "oncall.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
{{- include "oncall.initContainer" . | nindent 8 }}
|
||||
containers:
|
||||
- name: telegram-polling
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: {{ include "oncall.engine.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ['sh', '-c', 'python manage.py start_telegram_polling']
|
||||
env:
|
||||
{{- include "snippet.oncall.env" . | nindent 12 }}
|
||||
{{- include "snippet.oncall.telegram.env" . | nindent 12 }}
|
||||
{{- include "snippet.db.env" . | nindent 12 }}
|
||||
{{- include "snippet.broker.env" . | nindent 12 }}
|
||||
{{- include "oncall.extraEnvs" . | nindent 12 }}
|
||||
{{- with .Values.telegramPolling.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.telegramPolling.extraVolumeMounts }}
|
||||
volumeMounts: {{- . | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.telegramPolling.extraVolumes }}
|
||||
volumes: {{- . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -1,8 +0,0 @@
|
||||
{{- define "ui.env" -}}
|
||||
{{- if .Values.ui.env }}
|
||||
{{- range $key, $value := .Values.ui.env }}
|
||||
- name: {{ $key }}
|
||||
value: "{{ $value }}"
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,31 +0,0 @@
|
||||
{{- if .Values.ui.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: oncall-ui
|
||||
labels:
|
||||
app.kubernetes.io/component: oncall-ui
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: oncall-ui
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: oncall-ui
|
||||
spec:
|
||||
containers:
|
||||
- name: oncall-ui
|
||||
image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
{{- include "ui.env" . | nindent 12 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/app
|
||||
name: hot-reloaded-plugin
|
||||
volumes:
|
||||
- name: hot-reloaded-plugin
|
||||
hostPath:
|
||||
path: /oncall-plugin
|
||||
{{- end }}
|
||||
@@ -1,719 +0,0 @@
|
||||
# Values for configuring the deployment of Grafana OnCall
|
||||
|
||||
# Set the domain name Grafana OnCall will be installed on.
|
||||
# If you want to install grafana as a part of this release make sure to configure grafana.grafana.ini.server.domain too
|
||||
base_url: example.com
|
||||
base_url_protocol: https
|
||||
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
## e.g:
|
||||
## imagePullSecrets:
|
||||
## - name: myRegistryKeySecretName
|
||||
imagePullSecrets: []
|
||||
|
||||
image:
|
||||
# Grafana OnCall docker image repository
|
||||
repository: grafana/oncall
|
||||
tag:
|
||||
pullPolicy: Always
|
||||
|
||||
# Whether to create additional service for external connections
|
||||
# ClusterIP service is always created
|
||||
service:
|
||||
enabled: false
|
||||
type: LoadBalancer
|
||||
port: 8080
|
||||
annotations: {}
|
||||
|
||||
# Engine pods configuration
|
||||
engine:
|
||||
replicaCount: 1
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# Labels for engine pods
|
||||
podLabels: {}
|
||||
|
||||
## Deployment update strategy
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 0
|
||||
type: RollingUpdate
|
||||
|
||||
## Affinity for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: []
|
||||
|
||||
## Topology spread constraints for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
|
||||
topologySpreadConstraints: []
|
||||
|
||||
## Priority class for the pods
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
|
||||
priorityClassName: ""
|
||||
|
||||
# Extra containers which runs as sidecar
|
||||
extraContainers: ""
|
||||
# extraContainers: |
|
||||
# - name: cloud-sql-proxy
|
||||
# image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
|
||||
# args:
|
||||
# - --private-ip
|
||||
# - --port=5432
|
||||
# - example:europe-west3:grafana-oncall-db
|
||||
|
||||
# Extra volume mounts for the main app container
|
||||
extraVolumeMounts: []
|
||||
# - mountPath: /mnt/postgres-tls
|
||||
# name: postgres-tls
|
||||
# - mountPath: /mnt/redis-tls
|
||||
# name: redis-tls
|
||||
|
||||
# Extra volumes for the pod
|
||||
extraVolumes: []
|
||||
# - name: postgres-tls
|
||||
# configMap:
|
||||
# name: my-postgres-tls
|
||||
# defaultMode: 0640
|
||||
# - name: redis-tls
|
||||
# configMap:
|
||||
# name: my-redis-tls
|
||||
# defaultMode: 0640
|
||||
|
||||
detached_integrations_service:
|
||||
enabled: false
|
||||
type: LoadBalancer
|
||||
port: 8080
|
||||
annotations: {}
|
||||
|
||||
# Integrations pods configuration
|
||||
detached_integrations:
|
||||
enabled: false
|
||||
replicaCount: 1
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Deployment update strategy
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 0
|
||||
type: RollingUpdate
|
||||
|
||||
## Affinity for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: []
|
||||
|
||||
## Topology spread constraints for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
|
||||
topologySpreadConstraints: []
|
||||
|
||||
## Priority class for the pods
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
|
||||
priorityClassName: ""
|
||||
|
||||
# Extra containers which runs as sidecar
|
||||
extraContainers: ""
|
||||
# extraContainers: |
|
||||
# - name: cloud-sql-proxy
|
||||
# image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
|
||||
# args:
|
||||
# - --private-ip
|
||||
# - --port=5432
|
||||
# - example:europe-west3:grafana-oncall-db
|
||||
|
||||
# Extra volume mounts for the container
|
||||
extraVolumeMounts: []
|
||||
# - mountPath: /mnt/postgres-tls
|
||||
# name: postgres-tls
|
||||
# - mountPath: /mnt/redis-tls
|
||||
# name: redis-tls
|
||||
|
||||
# Extra volumes for the pod
|
||||
extraVolumes: []
|
||||
# - name: postgres-tls
|
||||
# configMap:
|
||||
# name: my-postgres-tls
|
||||
# defaultMode: 0640
|
||||
# - name: redis-tls
|
||||
# configMap:
|
||||
# name: my-redis-tls
|
||||
# defaultMode: 0640
|
||||
|
||||
# Celery workers pods configuration
|
||||
celery:
|
||||
replicaCount: 1
|
||||
worker_queue: "default,critical,long,slack,telegram,webhook,celery,grafana"
|
||||
worker_concurrency: "1"
|
||||
worker_max_tasks_per_child: "100"
|
||||
worker_beat_enabled: "True"
|
||||
## Restart of the celery workers once in a given interval as an additional precaution to the probes
|
||||
## If this setting is enabled TERM signal will be sent to celery workers
|
||||
## It will lead to warm shutdown (waiting for the tasks to complete) and restart the container
|
||||
## If this setting is set numbers of pod restarts will increase
|
||||
## Comment this line out if you want to remove restarts
|
||||
worker_shutdown_interval: "65m"
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 300
|
||||
timeoutSeconds: 10
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# Labels for celery pods
|
||||
podLabels: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: []
|
||||
|
||||
## Topology spread constraints for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
|
||||
topologySpreadConstraints: []
|
||||
|
||||
## Priority class for the pods
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
|
||||
priorityClassName: ""
|
||||
|
||||
# Extra containers which runs as sidecar
|
||||
extraContainers: ""
|
||||
# extraContainers: |
|
||||
# - name: cloud-sql-proxy
|
||||
# image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
|
||||
# args:
|
||||
# - --private-ip
|
||||
# - --port=5432
|
||||
# - example:europe-west3:grafana-oncall-db
|
||||
|
||||
# Extra volume mounts for the main container
|
||||
extraVolumeMounts: []
|
||||
# - mountPath: /mnt/postgres-tls
|
||||
# name: postgres-tls
|
||||
# - mountPath: /mnt/redis-tls
|
||||
# name: redis-tls
|
||||
|
||||
# Extra volumes for the pod
|
||||
extraVolumes: []
|
||||
# - name: postgres-tls
|
||||
# configMap:
|
||||
# name: my-postgres-tls
|
||||
# defaultMode: 0640
|
||||
# - name: redis-tls
|
||||
# configMap:
|
||||
# name: my-redis-tls
|
||||
# defaultMode: 0640
|
||||
|
||||
# Telegram polling pod configuration
|
||||
telegramPolling:
|
||||
enabled: false
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# Labels for telegram-polling pods
|
||||
podLabels: {}
|
||||
|
||||
# Extra volume mounts for the main container
|
||||
extraVolumeMounts: []
|
||||
# - mountPath: /mnt/postgres-tls
|
||||
# name: postgres-tls
|
||||
# - mountPath: /mnt/redis-tls
|
||||
# name: redis-tls
|
||||
|
||||
# Extra volumes for the pod
|
||||
extraVolumes: []
|
||||
# - name: postgres-tls
|
||||
# configMap:
|
||||
# name: my-postgres-tls
|
||||
# defaultMode: 0640
|
||||
# - name: redis-tls
|
||||
# configMap:
|
||||
# name: my-redis-tls
|
||||
# defaultMode: 0640
|
||||
|
||||
oncall:
|
||||
# this is intended to be used for local development. In short, it will mount the ./engine dir into
|
||||
# any backend related containers, to allow hot-reloading + also run the containers with slightly modified
|
||||
# startup commands (which configures the hot-reloading)
|
||||
devMode: false
|
||||
|
||||
# Override default MIRAGE_CIPHER_IV (must be 16 bytes long)
|
||||
# For existing installation, this should not be changed.
|
||||
# mirageCipherIV: 1234567890abcdef
|
||||
# oncall secrets
|
||||
secrets:
|
||||
# Use existing secret. (secretKey and mirageSecretKey is required)
|
||||
existingSecret: ""
|
||||
# The key in the secret containing secret key
|
||||
secretKey: ""
|
||||
# The key in the secret containing mirage secret key
|
||||
mirageSecretKey: ""
|
||||
# Slack configures the Grafana Oncall Slack ChatOps integration.
|
||||
slack:
|
||||
# Enable the Slack ChatOps integration for the Oncall Engine.
|
||||
enabled: false
|
||||
# Sets the Slack bot slash-command
|
||||
commandName: oncall
|
||||
# clientId configures the Slack app OAuth2 client ID.
|
||||
# api.slack.com/apps/<yourApp> -> Basic Information -> App Credentials -> Client ID
|
||||
clientId: ~
|
||||
# clientSecret configures the Slack app OAuth2 client secret.
|
||||
# api.slack.com/apps/<yourApp> -> Basic Information -> App Credentials -> Client Secret
|
||||
clientSecret: ~
|
||||
# signingSecret - configures the Slack app signature secret used to sign
|
||||
# requests comming from Slack.
|
||||
# api.slack.com/apps/<yourApp> -> Basic Information -> App Credentials -> Signing Secret
|
||||
signingSecret: ~
|
||||
# Use existing secret for clientId, clientSecret and signingSecret.
|
||||
# clientIdKey, clientSecretKey and signingSecretKey are required
|
||||
existingSecret: ""
|
||||
# The key in the secret containing OAuth2 client ID
|
||||
clientIdKey: ""
|
||||
# The key in the secret containing OAuth2 client secret
|
||||
clientSecretKey: ""
|
||||
# The key in the secret containing the Slack app signature secret
|
||||
signingSecretKey: ""
|
||||
# OnCall external URL
|
||||
redirectHost: ~
|
||||
telegram:
|
||||
enabled: false
|
||||
token: ~
|
||||
webhookUrl: ~
|
||||
# Use existing secret. (tokenKey is required)
|
||||
existingSecret: ""
|
||||
# The key in the secret containing Telegram token
|
||||
tokenKey: ""
|
||||
smtp:
|
||||
enabled: true
|
||||
host: ~
|
||||
port: ~
|
||||
username: ~
|
||||
password: ~
|
||||
tls: ~
|
||||
fromEmail: ~
|
||||
exporter:
|
||||
enabled: false
|
||||
authToken: ~
|
||||
twilio:
|
||||
# Twilio account SID/username to allow OnCall to send SMSes and make phone calls
|
||||
accountSid: ""
|
||||
# Twilio password to allow OnCall to send SMSes and make calls
|
||||
authToken: ""
|
||||
# Number from which you will receive calls and SMS
|
||||
# (NOTE: must be quoted, otherwise would be rendered as float value)
|
||||
phoneNumber: ""
|
||||
# SID of Twilio service for number verification. You can create a service in Twilio web interface.
|
||||
# twilio.com -> verify -> create new service
|
||||
verifySid: ""
|
||||
# Twilio API key SID/username to allow OnCall to send SMSes and make phone calls
|
||||
apiKeySid: ""
|
||||
# Twilio API key secret/password to allow OnCall to send SMSes and make phone calls
|
||||
apiKeySecret: ""
|
||||
# Use existing secret for authToken, phoneNumber, verifySid, apiKeySid and apiKeySecret.
|
||||
existingSecret: ""
|
||||
# Twilio password to allow OnCall to send SMSes and make calls
|
||||
# The key in the secret containing the auth token
|
||||
authTokenKey: ""
|
||||
# The key in the secret containing the phone number
|
||||
phoneNumberKey: ""
|
||||
# The key in the secret containing verify service sid
|
||||
verifySidKey: ""
|
||||
# The key in the secret containing api key sid
|
||||
apiKeySidKey: ""
|
||||
# The key in the secret containing the api key secret
|
||||
apiKeySecretKey: ""
|
||||
# Phone notifications limit (the only non-secret value).
|
||||
# TODO: rename to phoneNotificationLimit
|
||||
limitPhone:
|
||||
|
||||
# Whether to run django database migrations automatically
|
||||
migrate:
|
||||
enabled: true
|
||||
# TTL can be unset by setting ttlSecondsAfterFinished: ""
|
||||
ttlSecondsAfterFinished: 20
|
||||
# use a helm hook to manage the migration job
|
||||
useHook: false
|
||||
annotations: {}
|
||||
|
||||
## Affinity for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
tolerations: []
|
||||
|
||||
# Extra containers which runs as sidecar
|
||||
extraContainers: ""
|
||||
# extraContainers: |
|
||||
# - name: cloud-sql-proxy
|
||||
# image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.1.2
|
||||
# args:
|
||||
# - --private-ip
|
||||
# - --port=5432
|
||||
# - example:europe-west3:grafana-oncall-db
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
# Extra volume mounts for the main container
|
||||
extraVolumeMounts: []
|
||||
# - mountPath: /mnt/postgres-tls
|
||||
# name: postgres-tls
|
||||
# - mountPath: /mnt/redis-tls
|
||||
# name: redis-tls
|
||||
|
||||
# Extra volumes for the pod
|
||||
extraVolumes: []
|
||||
# - name: postgres-tls
|
||||
# configMap:
|
||||
# name: my-postgres-tls
|
||||
# defaultMode: 0640
|
||||
# - name: redis-tls
|
||||
# configMap:
|
||||
# name: my-redis-tls
|
||||
# defaultMode: 0640
|
||||
|
||||
# Sets environment variables with name capitalized and prefixed with UWSGI_,
|
||||
# and dashes are substituted with underscores.
|
||||
# see more: https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#environment-variables
|
||||
# Set null to disable all UWSGI environment variables
|
||||
uwsgi:
|
||||
listen: 1024
|
||||
|
||||
# Additional env variables to add to deployments
|
||||
env: {}
|
||||
|
||||
# Enable ingress object for external access to the resources
|
||||
ingress:
|
||||
enabled: true
|
||||
# className: ""
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
cert-manager.io/issuer: "letsencrypt-prod"
|
||||
tls:
|
||||
- hosts:
|
||||
- "{{ .Values.base_url }}"
|
||||
secretName: certificate-tls
|
||||
# Extra paths to prepend to the host configuration. If using something
|
||||
# like an ALB ingress controller, you may want to configure SSL redirects
|
||||
extraPaths: []
|
||||
# - path: /*
|
||||
# backend:
|
||||
# serviceName: ssl-redirect
|
||||
# servicePort: use-annotation
|
||||
## Or for k8s > 1.19
|
||||
# - path: /*
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: ssl-redirect
|
||||
# port:
|
||||
# name: use-annotation
|
||||
|
||||
# Whether to install ingress controller
|
||||
ingress-nginx:
|
||||
enabled: true
|
||||
|
||||
# Install cert-manager as a part of the release
|
||||
cert-manager:
|
||||
enabled: true
|
||||
# Instal CRD resources
|
||||
installCRDs: true
|
||||
webhook:
|
||||
timeoutSeconds: 30
|
||||
# cert-manager tries to use the already used port, changing to another one
|
||||
# https://github.com/cert-manager/cert-manager/issues/3237
|
||||
# https://cert-manager.io/docs/installation/compatibility/
|
||||
securePort: 10260
|
||||
# Fix self-checks https://github.com/jetstack/cert-manager/issues/4286
|
||||
podDnsPolicy: None
|
||||
podDnsConfig:
|
||||
nameservers:
|
||||
- 8.8.8.8
|
||||
- 1.1.1.1
|
||||
|
||||
database:
|
||||
# can be either mysql or postgresql
|
||||
type: mysql
|
||||
|
||||
# MySQL is included into this release for the convenience.
|
||||
# It is recommended to host it separately from this release
|
||||
# Set mariadb.enabled = false and configure externalMysql
|
||||
mariadb:
|
||||
enabled: true
|
||||
auth:
|
||||
database: oncall
|
||||
existingSecret:
|
||||
primary:
|
||||
extraEnvVars:
|
||||
- name: MARIADB_COLLATE
|
||||
value: utf8mb4_unicode_ci
|
||||
- name: MARIADB_CHARACTER_SET
|
||||
value: utf8mb4
|
||||
secondary:
|
||||
extraEnvVars:
|
||||
- name: MARIADB_COLLATE
|
||||
value: utf8mb4_unicode_ci
|
||||
- name: MARIADB_CHARACTER_SET
|
||||
value: utf8mb4
|
||||
|
||||
# Make sure to create the database with the following parameters:
|
||||
# CREATE DATABASE oncall CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
externalMysql:
|
||||
host:
|
||||
port:
|
||||
db_name:
|
||||
user:
|
||||
password:
|
||||
# Use an existing secret for the mysql password.
|
||||
existingSecret:
|
||||
# The key in the secret containing the mysql username
|
||||
usernameKey:
|
||||
# The key in the secret containing the mysql password
|
||||
passwordKey:
|
||||
# Extra options (see example below)
|
||||
# Reference: https://pymysql.readthedocs.io/en/latest/modules/connections.html
|
||||
options:
|
||||
# options: >-
|
||||
# ssl_verify_cert=true
|
||||
# ssl_verify_identity=true
|
||||
# ssl_ca=/mnt/mysql-tls/ca.crt
|
||||
# ssl_cert=/mnt/mysql-tls/client.crt
|
||||
# ssl_key=/mnt/mysql-tls/client.key
|
||||
|
||||
# PostgreSQL is included into this release for the convenience.
|
||||
# It is recommended to host it separately from this release
|
||||
# Set postgresql.enabled = false and configure externalPostgresql
|
||||
postgresql:
|
||||
enabled: false
|
||||
auth:
|
||||
database: oncall
|
||||
existingSecret:
|
||||
|
||||
# Make sure to create the database with the following parameters:
|
||||
# CREATE DATABASE oncall WITH ENCODING UTF8;
|
||||
externalPostgresql:
|
||||
host:
|
||||
port:
|
||||
db_name:
|
||||
user:
|
||||
password:
|
||||
# Use an existing secret for the database password
|
||||
existingSecret:
|
||||
# The key in the secret containing the database password
|
||||
passwordKey:
|
||||
# Extra options (see example below)
|
||||
# Reference: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
|
||||
options:
|
||||
# options: >-
|
||||
# sslmode=verify-full
|
||||
# sslrootcert=/mnt/postgres-tls/ca.crt
|
||||
# sslcert=/mnt/postgres-tls/client.crt
|
||||
# sslkey=/mnt/postgres-tls/client.key
|
||||
|
||||
# RabbitMQ is included into this release for the convenience.
|
||||
# It is recommended to host it separately from this release
|
||||
# Set rabbitmq.enabled = false and configure externalRabbitmq
|
||||
rabbitmq:
|
||||
enabled: true
|
||||
auth:
|
||||
existingPasswordSecret:
|
||||
|
||||
broker:
|
||||
type: rabbitmq
|
||||
|
||||
externalRabbitmq:
|
||||
host:
|
||||
port:
|
||||
user:
|
||||
password:
|
||||
protocol:
|
||||
vhost:
|
||||
# Use an existing secret for the rabbitmq password
|
||||
existingSecret:
|
||||
# The key in the secret containing the rabbitmq password
|
||||
passwordKey: ""
|
||||
# The key in the secret containing the rabbitmq username
|
||||
usernameKey: username
|
||||
|
||||
# Redis is included into this release for the convenience.
|
||||
# It is recommended to host it separately from this release
|
||||
redis:
|
||||
enabled: true
|
||||
auth:
|
||||
existingSecret:
|
||||
|
||||
externalRedis:
|
||||
protocol:
|
||||
host:
|
||||
port:
|
||||
database:
|
||||
username:
|
||||
password:
|
||||
# Use an existing secret for the redis password
|
||||
existingSecret:
|
||||
# The key in the secret containing the redis password
|
||||
passwordKey:
|
||||
|
||||
# SSL options
|
||||
ssl_options:
|
||||
enabled: false
|
||||
# CA certificate
|
||||
ca_certs:
|
||||
# Client SSL certs
|
||||
certfile:
|
||||
keyfile:
|
||||
# SSL verification mode: "cert_none" | "cert_optional" | "cert_required"
|
||||
cert_reqs:
|
||||
|
||||
# Grafana is included into this release for the convenience.
|
||||
# It is recommended to host it separately from this release
|
||||
grafana:
|
||||
enabled: true
|
||||
grafana.ini:
|
||||
server:
|
||||
domain: example.com
|
||||
root_url: "%(protocol)s://%(domain)s/grafana"
|
||||
serve_from_sub_path: true
|
||||
persistence:
|
||||
enabled: true
|
||||
# Disable psp as PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
|
||||
rbac:
|
||||
pspEnabled: false
|
||||
plugins:
|
||||
- grafana-oncall-app
|
||||
|
||||
externalGrafana:
|
||||
# Example: https://grafana.mydomain.com
|
||||
url:
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext:
|
||||
{}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext:
|
||||
{}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsGroup: 2000
|
||||
# runAsUser: 1000
|
||||
|
||||
init:
|
||||
securityContext:
|
||||
{}
|
||||
# allowPrivilegeEscalation: false
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# privileged: false
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsGroup: 2000
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
ui:
|
||||
# this is intended to be used for local development. In short, it will spin up an additional container
|
||||
# running the plugin frontend, such that hot reloading can be enabled
|
||||
enabled: false
|
||||
image:
|
||||
repository: oncall/ui
|
||||
tag: dev
|
||||
# Additional env vars for the ui container
|
||||
env: {}
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
# extraScrapeConfigs: |
|
||||
# - job_name: 'oncall-exporter'
|
||||
# metrics_path: /metrics/
|
||||
# static_configs:
|
||||
# - targets:
|
||||
# - oncall-dev-engine.default.svc.cluster.local:8080
|
||||
@@ -1,19 +0,0 @@
|
||||
oncall:
|
||||
database:
|
||||
type: "postgresql"
|
||||
broker:
|
||||
type: "redis"
|
||||
ingress:
|
||||
enabled: false
|
||||
cert-manager:
|
||||
enabled: false
|
||||
mariadb:
|
||||
enabled: false
|
||||
postgresql:
|
||||
enabled: false
|
||||
rabbitmq:
|
||||
enabled: false
|
||||
redis:
|
||||
enabled: false
|
||||
grafana:
|
||||
enabled: false
|
||||
@@ -15,10 +15,10 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.2
|
||||
version: 0.3.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "v5.6.0"
|
||||
appVersion: "v5.13.0"
|
||||
|
||||
@@ -7,18 +7,45 @@ linkTitle: "Helm installation"
|
||||
|
||||
[grafana-operator](https://github.com/grafana/grafana-operator) for Kubernetes to manage Grafana instances and grafana resources.
|
||||
|
||||
  
|
||||
 
|
||||
|
||||
## Installation
|
||||
|
||||
This is a OCI helm chart, helm started support OCI in version 3.8.0.
|
||||
|
||||
```shell
|
||||
helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.6.0
|
||||
helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-operator --version v5.13.0
|
||||
```
|
||||
|
||||
Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000).
|
||||
|
||||
### Using Terraform
|
||||
|
||||
To install the helm chart using terraform, make sure you use the right values for `repository` and `name` as shown below:
|
||||
|
||||
```hcl
|
||||
resource "helm_release" "grafana_kubernetes_operator" {
|
||||
name = "grafana-operator"
|
||||
namespace = "default"
|
||||
repository = "oci://ghcr.io/grafana/helm-charts"
|
||||
chart = "grafana-operator"
|
||||
verify = false
|
||||
version = "v5.13.0"
|
||||
}
|
||||
```
|
||||
|
||||
## Upgrading
|
||||
|
||||
Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.
|
||||
To avoid issues due to outdated or missing definitions, run the following command before updating an existing installation:
|
||||
|
||||
```shell
|
||||
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/v5.13.0/crds.yaml
|
||||
```
|
||||
|
||||
The `--server-side` and `--force-conflict` flags are required to avoid running into issues with the `kubectl.kubernetes.io/last-applied-configuration` annotation.
|
||||
By using server side apply, this annotation is not considered. `--force-conflict` allows kubectl to modify fields previously managed by helm.
|
||||
|
||||
## Development
|
||||
|
||||
For general and helm specific development instructions please read the [CONTRIBUTING.md](../../../CONTRIBUTING.md)
|
||||
@@ -38,24 +65,39 @@ It's easier to just manage this configuration outside of the operator.
|
||||
| additionalLabels | object | `{}` | additional labels to add to all resources |
|
||||
| affinity | object | `{}` | pod affinity |
|
||||
| env | list | `[]` | Additional environment variables |
|
||||
| fullnameOverride | string | `""` | |
|
||||
| extraObjects | list | `[]` | Array of extra K8s objects to deploy |
|
||||
| fullnameOverride | string | `""` | Overrides the fully qualified app name. |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | The image pull policy to use in grafana operator container |
|
||||
| image.repository | string | `"ghcr.io/grafana/grafana-operator"` | grafana operator image repository |
|
||||
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
|
||||
| imagePullSecrets | list | `[]` | image pull secrets |
|
||||
| isOpenShift | bool | `false` | Determines if the target cluster is OpenShift. Additional rbac permissions for routes will be added on OpenShift |
|
||||
| leaderElect | bool | `false` | If you want to run multiple replicas of the grafana-operator, this is not recommended. |
|
||||
| metricsService.metricsPort | int | `9090` | metrics service port |
|
||||
| metricsService.pprofPort | int | `8888` | port for the pprof profiling endpoint |
|
||||
| metricsService.type | string | `"ClusterIP"` | metrics service type |
|
||||
| nameOverride | string | `""` | |
|
||||
| nameOverride | string | `""` | Overrides the name of the chart. |
|
||||
| namespaceOverride | string | `""` | Overrides the namespace name. |
|
||||
| namespaceScope | bool | `false` | If the operator should run in namespace-scope or not, if true the operator will only be able to manage instances in the same namespace |
|
||||
| nodeSelector | object | `{}` | pod node selector |
|
||||
| podAnnotations | object | `{}` | pod annotations |
|
||||
| podSecurityContext | object | `{}` | pod security context |
|
||||
| priorityClassName | string | `""` | pod priority class name |
|
||||
| rbac.create | bool | `true` | Specifies whether to create the ClusterRole and ClusterRoleBinding. If "namespaceScope" is true or "watchNamespaces" is set, this will create Role and RoleBinding instead. |
|
||||
| resources | object | `{}` | grafana operator container resources |
|
||||
| securityContext | object | `{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true}` | grafana operator container security context |
|
||||
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
|
||||
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
|
||||
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
|
||||
| serviceMonitor | object | `{"additionalLabels":{},"enabled":false,"interval":"1m","metricRelabelings":[],"relabelings":[],"scrapeTimeout":"10s","targetLabels":[],"telemetryPath":"/metrics"}` | Enable this to use with Prometheus Operator |
|
||||
| serviceMonitor.additionalLabels | object | `{}` | Set of labels to transfer from the Kubernetes Service onto the target |
|
||||
| serviceMonitor.enabled | bool | `false` | When set true then use a ServiceMonitor to configure scraping |
|
||||
| serviceMonitor.interval | string | `"1m"` | Set how frequently Prometheus should scrape |
|
||||
| serviceMonitor.metricRelabelings | list | `[]` | MetricRelabelConfigs to apply to samples before ingestion |
|
||||
| serviceMonitor.relabelings | list | `[]` | Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config |
|
||||
| serviceMonitor.scrapeTimeout | string | `"10s"` | Set timeout for scrape |
|
||||
| serviceMonitor.targetLabels | list | `[]` | Set of labels to transfer from the Kubernetes Service onto the target |
|
||||
| serviceMonitor.telemetryPath | string | `"/metrics"` | Set path to metrics path |
|
||||
| tolerations | list | `[]` | pod tolerations |
|
||||
| watchNamespaceSelector | string | `""` | Sets the WATCH_NAMESPACE_SELECTOR environment variable, it defines which namespaces the operator should be listening for based on label and key value pair added on namespace kind. By default it's all namespaces. |
|
||||
| watchNamespaces | string | `""` | Sets the WATCH_NAMESPACE environment variable, it defines which namespaces the operator should be listening for. By default it's all namespaces, if you only want to listen for the same namespace as the operator is deployed to look at namespaceScope. |
|
||||
|
||||
@@ -7,7 +7,7 @@ linkTitle: "Helm installation"
|
||||
|
||||
[grafana-operator](https://github.com/grafana/grafana-operator) for Kubernetes to manage Grafana instances and grafana resources.
|
||||
|
||||
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
|
||||
{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -19,6 +19,34 @@ helm upgrade -i grafana-operator oci://ghcr.io/grafana/helm-charts/grafana-opera
|
||||
|
||||
Sadly helm OCI charts currently don't support searching for available versions of a helm [oci registry](https://github.com/helm/helm/issues/11000).
|
||||
|
||||
### Using Terraform
|
||||
|
||||
To install the helm chart using terraform, make sure you use the right values for `repository` and `name` as shown below:
|
||||
|
||||
```hcl
|
||||
resource "helm_release" "grafana_kubernetes_operator" {
|
||||
name = "grafana-operator"
|
||||
namespace = "default"
|
||||
repository = "oci://ghcr.io/grafana/helm-charts"
|
||||
chart = "grafana-operator"
|
||||
verify = false
|
||||
version = "{{ template "chart.appVersion" . }}"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Upgrading
|
||||
|
||||
Helm does not provide functionality to update custom resource definitions. This can result in the operator misbehaving when a release contains updates to the custom resource definitions.
|
||||
To avoid issues due to outdated or missing definitions, run the following command before updating an existing installation:
|
||||
|
||||
```shell
|
||||
kubectl apply --server-side --force-conflicts -f https://github.com/grafana/grafana-operator/releases/download/{{ template "chart.appVersion" . }}/crds.yaml
|
||||
```
|
||||
|
||||
The `--server-side` and `--force-conflict` flags are required to avoid running into issues with the `kubectl.kubernetes.io/last-applied-configuration` annotation.
|
||||
By using server side apply, this annotation is not considered. `--force-conflict` allows kubectl to modify fields previously managed by helm.
|
||||
|
||||
## Development
|
||||
|
||||
For general and helm specific development instructions please read the [CONTRIBUTING.md](../../../CONTRIBUTING.md)
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanaalertrulegroups.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaAlertRuleGroup
|
||||
listKind: GrafanaAlertRuleGroupList
|
||||
plural: grafanaalertrulegroups
|
||||
singular: grafanaalertrulegroup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaAlertRuleGroup is the Schema for the grafanaalertrulegroups
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaAlertRuleGroupSpec defines the desired state of GrafanaAlertRuleGroup
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
type: boolean
|
||||
folderRef:
|
||||
description: Match GrafanaFolders CRs to infer the uid
|
||||
type: string
|
||||
folderUID:
|
||||
description: |-
|
||||
UID of the folder containing this rule group
|
||||
Overrides the FolderSelector
|
||||
type: string
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
interval:
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
rules:
|
||||
items:
|
||||
description: AlertRule defines a specific rule to be evaluated.
|
||||
It is based on the upstream model with some k8s specific type
|
||||
mappings
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
condition:
|
||||
type: string
|
||||
data:
|
||||
items:
|
||||
properties:
|
||||
datasourceUid:
|
||||
description: Grafana data source unique identifier; it
|
||||
should be '__expr__' for a Server Side Expression operation.
|
||||
type: string
|
||||
model:
|
||||
description: JSON is the raw JSON query and includes the
|
||||
above properties as well as custom properties.
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
queryType:
|
||||
description: |-
|
||||
QueryType is an optional identifier for the type of query.
|
||||
It can be used to distinguish different types of queries.
|
||||
type: string
|
||||
refId:
|
||||
description: RefID is the unique identifier of the query,
|
||||
set by the frontend call.
|
||||
type: string
|
||||
relativeTimeRange:
|
||||
description: relative time range
|
||||
properties:
|
||||
from:
|
||||
description: from
|
||||
format: int64
|
||||
type: integer
|
||||
to:
|
||||
description: to
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
execErrState:
|
||||
enum:
|
||||
- OK
|
||||
- Alerting
|
||||
- Error
|
||||
- KeepLast
|
||||
type: string
|
||||
for:
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
isPaused:
|
||||
type: boolean
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
noDataState:
|
||||
enum:
|
||||
- Alerting
|
||||
- NoData
|
||||
- OK
|
||||
- KeepLast
|
||||
type: string
|
||||
notificationSettings:
|
||||
properties:
|
||||
group_by:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
group_interval:
|
||||
type: string
|
||||
group_wait:
|
||||
type: string
|
||||
mute_time_intervals:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
receiver:
|
||||
type: string
|
||||
repeat_interval:
|
||||
type: string
|
||||
required:
|
||||
- receiver
|
||||
type: object
|
||||
title:
|
||||
example: Always firing
|
||||
maxLength: 190
|
||||
minLength: 1
|
||||
type: string
|
||||
uid:
|
||||
pattern: ^[a-zA-Z0-9-_]+$
|
||||
type: string
|
||||
required:
|
||||
- condition
|
||||
- data
|
||||
- execErrState
|
||||
- for
|
||||
- noDataState
|
||||
- title
|
||||
- uid
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- instanceSelector
|
||||
- interval
|
||||
- rules
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of FolderUID or FolderRef can be set
|
||||
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
|
||||
&& !(has(self.folderUID)))
|
||||
status:
|
||||
description: GrafanaAlertRuleGroupStatus defines the observed state of
|
||||
GrafanaAlertRuleGroup
|
||||
properties:
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,219 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanacontactpoints.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaContactPoint
|
||||
listKind: GrafanaContactPointList
|
||||
plural: grafanacontactpoints
|
||||
singular: grafanacontactpoint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaContactPoint is the Schema for the grafanacontactpoints
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaContactPointSpec defines the desired state of GrafanaContactPoint
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
type: boolean
|
||||
disableResolveMessage:
|
||||
type: boolean
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
name:
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
settings:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type:
|
||||
enum:
|
||||
- alertmanager
|
||||
- prometheus-alertmanager
|
||||
- dingding
|
||||
- discord
|
||||
- email
|
||||
- googlechat
|
||||
- kafka
|
||||
- line
|
||||
- opsgenie
|
||||
- pagerduty
|
||||
- pushover
|
||||
- sensugo
|
||||
- sensu
|
||||
- slack
|
||||
- teams
|
||||
- telegram
|
||||
- threema
|
||||
- victorops
|
||||
- webhook
|
||||
- wecom
|
||||
- hipchat
|
||||
- oncall
|
||||
type: string
|
||||
required:
|
||||
- instanceSelector
|
||||
- name
|
||||
- settings
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaContactPointStatus defines the observed state of GrafanaContactPoint
|
||||
properties:
|
||||
conditions:
|
||||
description: |-
|
||||
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -3,11 +3,13 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.12.0
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanadashboards.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaDashboard
|
||||
listKind: GrafanaDashboardList
|
||||
plural: grafanadashboards
|
||||
@@ -28,32 +30,62 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaDashboard is the Schema for the grafanadashboards API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaDashboardSpec defines the desired state of GrafanaDashboard
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
configMapRef:
|
||||
description: dashboard from configmap
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key must be
|
||||
defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
contentCacheDuration:
|
||||
description: Cache duration for dashboards fetched from URLs
|
||||
type: string
|
||||
datasources:
|
||||
description: maps required data sources to existing ones
|
||||
items:
|
||||
properties:
|
||||
datasourceName:
|
||||
@@ -66,27 +98,55 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
envFrom:
|
||||
description: environments variables from secrets or config maps
|
||||
items:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
@@ -95,33 +155,64 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
envs:
|
||||
description: environments variables as a map
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
value:
|
||||
description: Inline evn value
|
||||
type: string
|
||||
valueFrom:
|
||||
description: Reference on value source, might be the reference
|
||||
on a secret or config map
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
@@ -133,8 +224,16 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
folder:
|
||||
description: folder assignment for dashboard
|
||||
type: string
|
||||
folderRef:
|
||||
description: Name of a `GrafanaFolder` resource in the same namespace
|
||||
type: string
|
||||
folderUID:
|
||||
description: UID of the target folder for this dashboard
|
||||
type: string
|
||||
grafanaCom:
|
||||
description: grafana.com/dashboards
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
@@ -144,37 +243,67 @@ spec:
|
||||
- id
|
||||
type: object
|
||||
gzipJson:
|
||||
description: GzipJson the dashboard's JSON compressed with Gzip. Base64-encoded
|
||||
when in YAML.
|
||||
format: byte
|
||||
type: string
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
json:
|
||||
description: dashboard json
|
||||
type: string
|
||||
jsonnet:
|
||||
description: Jsonnet
|
||||
type: string
|
||||
jsonnetLib:
|
||||
description: Jsonnet project build
|
||||
properties:
|
||||
fileName:
|
||||
type: string
|
||||
@@ -190,6 +319,7 @@ spec:
|
||||
- gzipJsonnetProject
|
||||
type: object
|
||||
plugins:
|
||||
description: plugins
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
@@ -202,16 +332,162 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the dashboard is refreshed, defaults to 5m
|
||||
if not set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
url:
|
||||
description: dashboard url
|
||||
type: string
|
||||
urlAuthorization:
|
||||
description: authorization options for dashboard from url
|
||||
properties:
|
||||
basicAuth:
|
||||
properties:
|
||||
password:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
username:
|
||||
description: SecretKeySelector selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- instanceSelector
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of folderUID or folderRef can be declared at the same
|
||||
time
|
||||
rule: (has(self.folderUID) && !(has(self.folderRef))) || (has(self.folderRef)
|
||||
&& !(has(self.folderUID))) || !(has(self.folderRef) && (has(self.folderUID)))
|
||||
- message: folder field cannot be set when folderUID or folderRef is already
|
||||
declared
|
||||
rule: (has(self.folder) && !(has(self.folderRef) || has(self.folderUID)))
|
||||
|| !(has(self.folder))
|
||||
status:
|
||||
description: GrafanaDashboardStatus defines the observed state of GrafanaDashboard
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The dashboard instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
contentCache:
|
||||
format: byte
|
||||
type: string
|
||||
@@ -223,6 +499,7 @@ spec:
|
||||
hash:
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the dashboard was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
uid:
|
||||
|
||||
@@ -3,11 +3,13 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.12.0
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanadatasources.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaDatasource
|
||||
listKind: GrafanaDatasourceList
|
||||
plural: grafanadatasources
|
||||
@@ -28,16 +30,31 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaDatasource is the Schema for the grafanadatasources API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaDatasourceSpec defines the desired state of GrafanaDatasource
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
datasource:
|
||||
properties:
|
||||
@@ -50,6 +67,7 @@ spec:
|
||||
database:
|
||||
type: string
|
||||
editable:
|
||||
description: Deprecated field, it has no effect
|
||||
type: boolean
|
||||
isDefault:
|
||||
type: boolean
|
||||
@@ -59,6 +77,7 @@ spec:
|
||||
name:
|
||||
type: string
|
||||
orgId:
|
||||
description: Deprecated field, it has no effect
|
||||
format: int64
|
||||
type: integer
|
||||
secureJsonData:
|
||||
@@ -72,37 +91,58 @@ spec:
|
||||
type: string
|
||||
user:
|
||||
type: string
|
||||
required:
|
||||
- access
|
||||
- name
|
||||
- type
|
||||
- url
|
||||
type: object
|
||||
instanceSelector:
|
||||
description: selects Grafana instances for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
plugins:
|
||||
description: plugins
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
@@ -115,8 +155,14 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the datasource is refreshed, defaults to 5m
|
||||
if not set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
valuesFrom:
|
||||
description: environments variables from secrets or config maps
|
||||
items:
|
||||
properties:
|
||||
targetPath:
|
||||
@@ -124,24 +170,51 @@ spec:
|
||||
valueFrom:
|
||||
properties:
|
||||
configMapKeyRef:
|
||||
description: Selects a key of a ConfigMap.
|
||||
properties:
|
||||
key:
|
||||
description: The key to select.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the ConfigMap or its key
|
||||
must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
secretKeyRef:
|
||||
description: Selects a key of a Secret.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must
|
||||
be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
default: ""
|
||||
description: |-
|
||||
Name of the referent.
|
||||
This field is effectively required, but due to backwards compatibility is
|
||||
allowed to be empty. Instances of this type with an empty value here are
|
||||
almost certainly wrong.
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must
|
||||
be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
@@ -158,14 +231,18 @@ spec:
|
||||
- instanceSelector
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaDatasourceStatus defines the observed state of GrafanaDatasource
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The datasource instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
hash:
|
||||
type: string
|
||||
lastMessage:
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the datasource was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
uid:
|
||||
|
||||
@@ -3,11 +3,13 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.12.0
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafanafolders.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaFolder
|
||||
listKind: GrafanaFolderList
|
||||
plural: grafanafolders
|
||||
@@ -24,57 +26,192 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaFolder is the Schema for the grafanafolders API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaFolderSpec defines the desired state of GrafanaFolder
|
||||
properties:
|
||||
allowCrossNamespaceImport:
|
||||
description: allow to import this resources from an operator in a
|
||||
different namespace
|
||||
type: boolean
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
parentFolderRef:
|
||||
description: Reference to an existing GrafanaFolder CR in the same
|
||||
namespace
|
||||
type: string
|
||||
parentFolderUID:
|
||||
description: UID of the folder in which the current folder should
|
||||
be created
|
||||
type: string
|
||||
permissions:
|
||||
description: raw json with folder permissions
|
||||
type: string
|
||||
resyncPeriod:
|
||||
default: 5m
|
||||
description: how often the folder is synced, defaults to 5m if not
|
||||
set
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
required:
|
||||
- instanceSelector
|
||||
type: object
|
||||
x-kubernetes-validations:
|
||||
- message: Only one of parentFolderUID or parentFolderRef can be set
|
||||
rule: (has(self.parentFolderUID) && !(has(self.parentFolderRef))) ||
|
||||
(has(self.parentFolderRef) && !(has(self.parentFolderUID))) || !(has(self.parentFolderRef)
|
||||
&& (has(self.parentFolderUID)))
|
||||
status:
|
||||
description: GrafanaFolderStatus defines the observed state of GrafanaFolder
|
||||
properties:
|
||||
NoMatchingInstances:
|
||||
description: The folder instanceSelector can't find matching grafana
|
||||
instances
|
||||
type: boolean
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
hash:
|
||||
description: |-
|
||||
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
Important: Run "make" to regenerate code after modifying this file
|
||||
type: string
|
||||
lastResync:
|
||||
description: Last time the folder was resynced
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
name: grafananotificationpolicies.grafana.integreatly.org
|
||||
spec:
|
||||
group: grafana.integreatly.org
|
||||
names:
|
||||
categories:
|
||||
- grafana-operator
|
||||
kind: GrafanaNotificationPolicy
|
||||
listKind: GrafanaNotificationPolicyList
|
||||
plural: grafananotificationpolicies
|
||||
singular: grafananotificationpolicy
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: GrafanaNotificationPolicy is the Schema for the GrafanaNotificationPolicy
|
||||
API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |-
|
||||
Kind is a string value representing the REST resource this object represents.
|
||||
Servers may infer this from the endpoint the client submits requests to.
|
||||
Cannot be updated.
|
||||
In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: GrafanaNotificationPolicySpec defines the desired state of
|
||||
GrafanaNotificationPolicy
|
||||
properties:
|
||||
instanceSelector:
|
||||
description: selects Grafanas for import
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label selector requirements.
|
||||
The requirements are ANDed.
|
||||
items:
|
||||
description: |-
|
||||
A label selector requirement is a selector that contains values, a key, and an operator that
|
||||
relates the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that the selector applies
|
||||
to.
|
||||
type: string
|
||||
operator:
|
||||
description: |-
|
||||
operator represents a key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: |-
|
||||
values is an array of string values. If the operator is In or NotIn,
|
||||
the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
x-kubernetes-list-type: atomic
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||
operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
x-kubernetes-validations:
|
||||
- message: Value is immutable
|
||||
rule: self == oldSelf
|
||||
resyncPeriod:
|
||||
default: 10m
|
||||
format: duration
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
|
||||
type: string
|
||||
route:
|
||||
description: Routes for alerts to match against
|
||||
properties:
|
||||
continue:
|
||||
description: continue
|
||||
type: boolean
|
||||
group_by:
|
||||
description: group by
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
group_interval:
|
||||
description: group interval
|
||||
type: string
|
||||
group_wait:
|
||||
description: group wait
|
||||
type: string
|
||||
match_re:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: match re
|
||||
type: object
|
||||
matchers:
|
||||
description: matchers
|
||||
items:
|
||||
properties:
|
||||
isEqual:
|
||||
description: is equal
|
||||
type: boolean
|
||||
isRegex:
|
||||
description: is regex
|
||||
type: boolean
|
||||
name:
|
||||
description: name
|
||||
type: string
|
||||
value:
|
||||
description: value
|
||||
type: string
|
||||
required:
|
||||
- isRegex
|
||||
- value
|
||||
type: object
|
||||
type: array
|
||||
mute_time_intervals:
|
||||
description: mute time intervals
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
object_matchers:
|
||||
description: object matchers
|
||||
items:
|
||||
description: |-
|
||||
ObjectMatcher ObjectMatcher is a matcher that can be used to filter alerts.
|
||||
|
||||
|
||||
swagger:model ObjectMatcher
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: array
|
||||
provenance:
|
||||
description: provenance
|
||||
type: string
|
||||
receiver:
|
||||
description: receiver
|
||||
type: string
|
||||
repeat_interval:
|
||||
description: repeat interval
|
||||
type: string
|
||||
routes:
|
||||
description: routes
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
required:
|
||||
- instanceSelector
|
||||
- route
|
||||
type: object
|
||||
status:
|
||||
description: GrafanaNotificationPolicyStatus defines the observed state
|
||||
of GrafanaNotificationPolicy
|
||||
properties:
|
||||
conditions:
|
||||
items:
|
||||
description: "Condition contains details for one aspect of the current
|
||||
state of this API Resource.\n---\nThis struct is intended for
|
||||
direct use as an array at the field path .status.conditions. For
|
||||
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
|
||||
observations of a foo's current state.\n\t // Known .status.conditions.type
|
||||
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
|
||||
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
|
||||
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
|
||||
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
|
||||
\ // other fields\n\t}"
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: |-
|
||||
lastTransitionTime is the last time the condition transitioned from one status to another.
|
||||
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: |-
|
||||
message is a human readable message indicating details about the transition.
|
||||
This may be an empty string.
|
||||
maxLength: 32768
|
||||
type: string
|
||||
observedGeneration:
|
||||
description: |-
|
||||
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
||||
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
||||
with respect to the current state of the instance.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
reason:
|
||||
description: |-
|
||||
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
||||
Producers of specific condition types may define expected values and meanings for this field,
|
||||
and whether the values are considered a guaranteed API.
|
||||
The value should be a CamelCase string.
|
||||
This field may not be empty.
|
||||
maxLength: 1024
|
||||
minLength: 1
|
||||
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
||||
type: string
|
||||
status:
|
||||
description: status of the condition, one of True, False, Unknown.
|
||||
enum:
|
||||
- "True"
|
||||
- "False"
|
||||
- Unknown
|
||||
type: string
|
||||
type:
|
||||
description: |-
|
||||
type of condition in CamelCase or in foo.example.com/CamelCase.
|
||||
---
|
||||
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
|
||||
useful (see .node.status.conditions), the ability to deconflict is important.
|
||||
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
|
||||
maxLength: 316
|
||||
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- conditions
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
resources:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
@@ -0,0 +1,250 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- persistentvolumeclaims
|
||||
- secrets
|
||||
- serviceaccounts
|
||||
- services
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanaalertrulegroups/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanacontactpoints
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanacontactpoints/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanacontactpoints/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadashboards/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanadatasources/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanafolders/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafananotificationpolicies
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafananotificationpolicies/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafananotificationpolicies/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- grafana.integreatly.org
|
||||
resources:
|
||||
- grafanas/status
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
@@ -23,6 +23,13 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Allow the release namespace to be overridden
|
||||
*/}}
|
||||
{{- define "grafana-operator.namespace" -}}
|
||||
{{ .Values.namespaceOverride | default .Release.Namespace }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
@@ -40,6 +47,10 @@ helm.sh/chart: {{ include "grafana-operator.chart" . }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/part-of: grafana-operator
|
||||
{{- with .Values.additionalLabels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user