@leverege/build-tools 2.124.0 โ†’ 2.124.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -967,7 +967,7 @@
967
967
  "fieldConfig": {
968
968
  "defaults": {
969
969
  "color": {
970
- "mode": "thresholds"
970
+ "mode": "palette-classic"
971
971
  },
972
972
  "custom": {
973
973
  "axisBorderShow": false,
@@ -978,7 +978,7 @@
978
978
  "barAlignment": 0,
979
979
  "barWidthFactor": 0.6,
980
980
  "drawStyle": "line",
981
- "fillOpacity": 20,
981
+ "fillOpacity": 0,
982
982
  "gradientMode": "none",
983
983
  "hideFrom": {
984
984
  "legend": false,
@@ -992,34 +992,48 @@
992
992
  "scaleDistribution": {
993
993
  "type": "linear"
994
994
  },
995
- "showPoints": "never",
995
+ "showPoints": "auto",
996
996
  "spanNulls": false,
997
997
  "stacking": {
998
998
  "group": "A",
999
999
  "mode": "none"
1000
1000
  },
1001
1001
  "thresholdsStyle": {
1002
- "mode": "line+area"
1002
+ "mode": "off"
1003
1003
  }
1004
1004
  },
1005
1005
  "mappings": [],
1006
- "min": 0,
1007
1006
  "thresholds": {
1008
1007
  "mode": "absolute",
1009
1008
  "steps": [
1010
1009
  {
1011
1010
  "color": "green",
1012
1011
  "value": null
1012
+ }
1013
+ ]
1014
+ }
1015
+ },
1016
+ "overrides": [
1017
+ {
1018
+ "matcher": {
1019
+ "id": "byName",
1020
+ "options": "Out-of-Order Samples (5m)"
1021
+ },
1022
+ "properties": [
1023
+ {
1024
+ "id": "color",
1025
+ "value": {
1026
+ "fixedColor": "red",
1027
+ "mode": "fixed"
1028
+ }
1013
1029
  },
1014
1030
  {
1015
- "color": "red",
1016
- "value": 1
1031
+ "id": "custom.axisPlacement",
1032
+ "value": "right"
1017
1033
  }
1018
1034
  ]
1019
- },
1020
- "unit": "short"
1021
- },
1022
- "overrides": []
1035
+ }
1036
+ ]
1023
1037
  },
1024
1038
  "gridPos": {
1025
1039
  "h": 9,
@@ -1041,9 +1055,86 @@
1041
1055
  "sort": "none"
1042
1056
  }
1043
1057
  },
1058
+ "pluginVersion": "12.4.2",
1059
+ "targets": [
1060
+ {
1061
+ "datasource": {
1062
+ "type": "prometheus",
1063
+ "uid": "${datasource}"
1064
+ },
1065
+ "editorMode": "code",
1066
+ "expr": "avg_over_time(scrape_duration_seconds{job=\"prometheus-stack-stackdriver-metrics\"}[5m])",
1067
+ "legendFormat": "Scrape Duration (avg 5m)",
1068
+ "range": true,
1069
+ "refId": "A"
1070
+ },
1071
+ {
1072
+ "datasource": {
1073
+ "type": "prometheus",
1074
+ "uid": "${datasource}"
1075
+ },
1076
+ "editorMode": "code",
1077
+ "expr": "sum(increase(prometheus_tsdb_out_of_order_samples_total[5m]))",
1078
+ "legendFormat": "Out-of-Order Samples (5m)",
1079
+ "range": true,
1080
+ "refId": "B"
1081
+ }
1082
+ ],
1083
+ "title": "Stackdriver Scrape Duration vs TSDB Sample Rejections",
1084
+ "type": "timeseries"
1085
+ },
1086
+ {
1087
+ "gridPos": {
1088
+ "h": 9,
1089
+ "w": 12,
1090
+ "x": 12,
1091
+ "y": 36
1092
+ },
1093
+ "id": 14,
1094
+ "options": {
1095
+ "legend": {
1096
+ "calcs": [
1097
+ "max"
1098
+ ],
1099
+ "displayMode": "table",
1100
+ "placement": "bottom",
1101
+ "showLegend": true
1102
+ },
1103
+ "tooltip": {
1104
+ "hideZeros": false,
1105
+ "mode": "multi",
1106
+ "sort": "desc"
1107
+ }
1108
+ },
1109
+ "pluginVersion": "12.1.1",
1110
+ "targets": [
1111
+ {
1112
+ "datasource": {
1113
+ "type": "prometheus",
1114
+ "uid": "${datasource}"
1115
+ },
1116
+ "editorMode": "code",
1117
+ "expr": "stackdriver_pubsub_subscription_pubsub_googleapis_com_subscription_dead_letter_message_count > 0",
1118
+ "format": "time_series",
1119
+ "legendFormat": "{{subscription_id}}",
1120
+ "range": true,
1121
+ "refId": "A"
1122
+ }
1123
+ ],
1124
+ "title": "Dead Letter Message Count",
1125
+ "type": "timeseries"
1126
+ },
1127
+ {
1128
+ "datasource": {
1129
+ "type": "prometheus",
1130
+ "uid": "${datasource}"
1131
+ },
1132
+ "description": "Bytes sent from GCS to clients, per bucket",
1044
1133
  "fieldConfig": {
1045
1134
  "defaults": {
1046
- "color": { "mode": "palette-classic" },
1135
+ "color": {
1136
+ "mode": "palette-classic"
1137
+ },
1047
1138
  "custom": {
1048
1139
  "axisBorderShow": false,
1049
1140
  "axisCenteredZero": false,
@@ -1053,7 +1144,7 @@
1053
1144
  "barAlignment": 0,
1054
1145
  "barWidthFactor": 0.6,
1055
1146
  "drawStyle": "line",
1056
- "fillOpacity": 0,
1147
+ "fillOpacity": 20,
1057
1148
  "gradientMode": "none",
1058
1149
  "hideFrom": {
1059
1150
  "legend": false,
@@ -1062,80 +1153,343 @@
1062
1153
  },
1063
1154
  "insertNulls": false,
1064
1155
  "lineInterpolation": "linear",
1065
- "lineWidth": 2,
1156
+ "lineWidth": 1,
1066
1157
  "pointSize": 5,
1067
- "scaleDistribution": { "type": "linear" },
1068
- "showPoints": "auto",
1158
+ "scaleDistribution": {
1159
+ "type": "linear"
1160
+ },
1161
+ "showPoints": "never",
1069
1162
  "spanNulls": false,
1070
- "stacking": { "group": "A", "mode": "none" },
1071
- "thresholdsStyle": { "mode": "off" }
1163
+ "stacking": {
1164
+ "group": "A",
1165
+ "mode": "none"
1166
+ },
1167
+ "thresholdsStyle": {
1168
+ "mode": "off"
1169
+ }
1072
1170
  },
1073
1171
  "mappings": [],
1074
1172
  "thresholds": {
1075
1173
  "mode": "absolute",
1076
- "steps": [{ "color": "green", "value": null }]
1077
- }
1078
- },
1079
- "overrides": [
1080
- {
1081
- "matcher": { "id": "byName", "options": "Out-of-Order Samples (5m)" },
1082
- "properties": [
1083
- { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } },
1084
- { "id": "custom.axisPlacement", "value": "right" }
1174
+ "steps": [
1175
+ {
1176
+ "color": "green",
1177
+ "value": 0
1178
+ }
1085
1179
  ]
1086
- }
1087
- ]
1180
+ },
1181
+ "unit": "Bps",
1182
+ "unitScale": true
1183
+ },
1184
+ "overrides": []
1185
+ },
1186
+ "gridPos": {
1187
+ "h": 9,
1188
+ "w": 12,
1189
+ "x": 0,
1190
+ "y": 45
1191
+ },
1192
+ "id": 16,
1193
+ "options": {
1194
+ "legend": {
1195
+ "calcs": [],
1196
+ "displayMode": "list",
1197
+ "placement": "bottom",
1198
+ "showLegend": true
1199
+ },
1200
+ "tooltip": {
1201
+ "mode": "multi",
1202
+ "sort": "none"
1203
+ }
1088
1204
  },
1205
+ "targets": [
1206
+ {
1207
+ "datasource": {
1208
+ "type": "prometheus",
1209
+ "uid": "${datasource}"
1210
+ },
1211
+ "editorMode": "code",
1212
+ "expr": "stackdriver_gcs_bucket_storage_googleapis_com_network_sent_bytes_count",
1213
+ "format": "time_series",
1214
+ "intervalFactor": 2,
1215
+ "legendFormat": "{{bucket_name}}",
1216
+ "range": true,
1217
+ "refId": "A"
1218
+ }
1219
+ ],
1220
+ "title": "GCS Network Egress",
1221
+ "type": "timeseries"
1222
+ },
1223
+ {
1089
1224
  "datasource": {
1090
1225
  "type": "prometheus",
1091
1226
  "uid": "${datasource}"
1092
1227
  },
1093
- "pluginVersion": "12.4.2",
1228
+ "description": "Bytes received into GCS from clients, per bucket",
1229
+ "fieldConfig": {
1230
+ "defaults": {
1231
+ "color": {
1232
+ "mode": "palette-classic"
1233
+ },
1234
+ "custom": {
1235
+ "axisBorderShow": false,
1236
+ "axisCenteredZero": false,
1237
+ "axisColorMode": "text",
1238
+ "axisLabel": "",
1239
+ "axisPlacement": "auto",
1240
+ "barAlignment": 0,
1241
+ "barWidthFactor": 0.6,
1242
+ "drawStyle": "line",
1243
+ "fillOpacity": 20,
1244
+ "gradientMode": "none",
1245
+ "hideFrom": {
1246
+ "legend": false,
1247
+ "tooltip": false,
1248
+ "viz": false
1249
+ },
1250
+ "insertNulls": false,
1251
+ "lineInterpolation": "linear",
1252
+ "lineWidth": 1,
1253
+ "pointSize": 5,
1254
+ "scaleDistribution": {
1255
+ "type": "linear"
1256
+ },
1257
+ "showPoints": "never",
1258
+ "spanNulls": false,
1259
+ "stacking": {
1260
+ "group": "A",
1261
+ "mode": "none"
1262
+ },
1263
+ "thresholdsStyle": {
1264
+ "mode": "off"
1265
+ }
1266
+ },
1267
+ "mappings": [],
1268
+ "thresholds": {
1269
+ "mode": "absolute",
1270
+ "steps": [
1271
+ {
1272
+ "color": "green",
1273
+ "value": 0
1274
+ }
1275
+ ]
1276
+ },
1277
+ "unit": "Bps",
1278
+ "unitScale": true
1279
+ },
1280
+ "overrides": []
1281
+ },
1282
+ "gridPos": {
1283
+ "h": 9,
1284
+ "w": 12,
1285
+ "x": 12,
1286
+ "y": 45
1287
+ },
1288
+ "id": 17,
1289
+ "options": {
1290
+ "legend": {
1291
+ "calcs": [],
1292
+ "displayMode": "list",
1293
+ "placement": "bottom",
1294
+ "showLegend": true
1295
+ },
1296
+ "tooltip": {
1297
+ "mode": "multi",
1298
+ "sort": "none"
1299
+ }
1300
+ },
1094
1301
  "targets": [
1095
1302
  {
1096
- "datasource": { "type": "prometheus", "uid": "${datasource}" },
1303
+ "datasource": {
1304
+ "type": "prometheus",
1305
+ "uid": "${datasource}"
1306
+ },
1097
1307
  "editorMode": "code",
1098
- "expr": "avg_over_time(scrape_duration_seconds{job=\"prometheus-stack-stackdriver-metrics\"}[5m])",
1099
- "legendFormat": "Scrape Duration (avg 5m)",
1308
+ "expr": "stackdriver_gcs_bucket_storage_googleapis_com_network_received_bytes_count",
1309
+ "format": "time_series",
1310
+ "intervalFactor": 2,
1311
+ "legendFormat": "{{bucket_name}}",
1100
1312
  "range": true,
1101
1313
  "refId": "A"
1314
+ }
1315
+ ],
1316
+ "title": "GCS Network Ingress",
1317
+ "type": "timeseries"
1318
+ },
1319
+ {
1320
+ "datasource": {
1321
+ "type": "prometheus",
1322
+ "uid": "${datasource}"
1323
+ },
1324
+ "description": "Number of objects stored per bucket",
1325
+ "fieldConfig": {
1326
+ "defaults": {
1327
+ "color": {
1328
+ "mode": "palette-classic"
1329
+ },
1330
+ "custom": {
1331
+ "axisBorderShow": false,
1332
+ "axisCenteredZero": false,
1333
+ "axisColorMode": "text",
1334
+ "axisLabel": "",
1335
+ "axisPlacement": "auto",
1336
+ "barAlignment": 0,
1337
+ "barWidthFactor": 0.6,
1338
+ "drawStyle": "line",
1339
+ "fillOpacity": 20,
1340
+ "gradientMode": "none",
1341
+ "hideFrom": {
1342
+ "legend": false,
1343
+ "tooltip": false,
1344
+ "viz": false
1345
+ },
1346
+ "insertNulls": false,
1347
+ "lineInterpolation": "linear",
1348
+ "lineWidth": 1,
1349
+ "pointSize": 5,
1350
+ "scaleDistribution": {
1351
+ "type": "linear"
1352
+ },
1353
+ "showPoints": "never",
1354
+ "spanNulls": false,
1355
+ "stacking": {
1356
+ "group": "A",
1357
+ "mode": "none"
1358
+ },
1359
+ "thresholdsStyle": {
1360
+ "mode": "off"
1361
+ }
1362
+ },
1363
+ "mappings": [],
1364
+ "thresholds": {
1365
+ "mode": "absolute",
1366
+ "steps": [
1367
+ {
1368
+ "color": "green",
1369
+ "value": 0
1370
+ }
1371
+ ]
1372
+ },
1373
+ "unit": "short",
1374
+ "unitScale": true
1375
+ },
1376
+ "overrides": []
1377
+ },
1378
+ "gridPos": {
1379
+ "h": 9,
1380
+ "w": 12,
1381
+ "x": 0,
1382
+ "y": 54
1383
+ },
1384
+ "id": 18,
1385
+ "options": {
1386
+ "legend": {
1387
+ "calcs": [],
1388
+ "displayMode": "list",
1389
+ "placement": "bottom",
1390
+ "showLegend": true
1102
1391
  },
1392
+ "tooltip": {
1393
+ "mode": "multi",
1394
+ "sort": "none"
1395
+ }
1396
+ },
1397
+ "targets": [
1103
1398
  {
1104
- "datasource": { "type": "prometheus", "uid": "${datasource}" },
1399
+ "datasource": {
1400
+ "type": "prometheus",
1401
+ "uid": "${datasource}"
1402
+ },
1105
1403
  "editorMode": "code",
1106
- "expr": "sum(increase(prometheus_tsdb_out_of_order_samples_total[5m]))",
1107
- "legendFormat": "Out-of-Order Samples (5m)",
1404
+ "expr": "stackdriver_gcs_bucket_storage_googleapis_com_storage_object_count",
1405
+ "format": "time_series",
1406
+ "intervalFactor": 2,
1407
+ "legendFormat": "{{bucket_name}}",
1108
1408
  "range": true,
1109
- "refId": "B"
1409
+ "refId": "A"
1110
1410
  }
1111
1411
  ],
1112
- "title": "Stackdriver Scrape Duration vs TSDB Sample Rejections",
1412
+ "title": "GCS Object Count",
1113
1413
  "type": "timeseries"
1114
1414
  },
1115
1415
  {
1416
+ "datasource": {
1417
+ "type": "prometheus",
1418
+ "uid": "${datasource}"
1419
+ },
1420
+ "description": "Total bytes stored per bucket broken down by storage class (Standard, Nearline, Coldline, Archive). Requires storage.googleapis.com/storage/total_bytes prefix in stackdriver-exporter.yaml",
1421
+ "fieldConfig": {
1422
+ "defaults": {
1423
+ "color": {
1424
+ "mode": "palette-classic"
1425
+ },
1426
+ "custom": {
1427
+ "axisBorderShow": false,
1428
+ "axisCenteredZero": false,
1429
+ "axisColorMode": "text",
1430
+ "axisLabel": "",
1431
+ "axisPlacement": "auto",
1432
+ "barAlignment": 0,
1433
+ "barWidthFactor": 0.6,
1434
+ "drawStyle": "line",
1435
+ "fillOpacity": 20,
1436
+ "gradientMode": "none",
1437
+ "hideFrom": {
1438
+ "legend": false,
1439
+ "tooltip": false,
1440
+ "viz": false
1441
+ },
1442
+ "insertNulls": false,
1443
+ "lineInterpolation": "linear",
1444
+ "lineWidth": 1,
1445
+ "pointSize": 5,
1446
+ "scaleDistribution": {
1447
+ "type": "linear"
1448
+ },
1449
+ "showPoints": "never",
1450
+ "spanNulls": false,
1451
+ "stacking": {
1452
+ "group": "A",
1453
+ "mode": "none"
1454
+ },
1455
+ "thresholdsStyle": {
1456
+ "mode": "off"
1457
+ }
1458
+ },
1459
+ "mappings": [],
1460
+ "thresholds": {
1461
+ "mode": "absolute",
1462
+ "steps": [
1463
+ {
1464
+ "color": "green",
1465
+ "value": 0
1466
+ }
1467
+ ]
1468
+ },
1469
+ "unit": "bytes",
1470
+ "unitScale": true
1471
+ },
1472
+ "overrides": []
1473
+ },
1116
1474
  "gridPos": {
1117
1475
  "h": 9,
1118
1476
  "w": 12,
1119
1477
  "x": 12,
1120
- "y": 36
1478
+ "y": 54
1121
1479
  },
1122
- "id": 14,
1480
+ "id": 19,
1123
1481
  "options": {
1124
1482
  "legend": {
1125
- "calcs": [
1126
- "max"
1127
- ],
1128
- "displayMode": "table",
1483
+ "calcs": [],
1484
+ "displayMode": "list",
1129
1485
  "placement": "bottom",
1130
1486
  "showLegend": true
1131
1487
  },
1132
1488
  "tooltip": {
1133
- "hideZeros": false,
1134
1489
  "mode": "multi",
1135
- "sort": "desc"
1490
+ "sort": "none"
1136
1491
  }
1137
1492
  },
1138
- "pluginVersion": "12.1.1",
1139
1493
  "targets": [
1140
1494
  {
1141
1495
  "datasource": {
@@ -1143,14 +1497,15 @@
1143
1497
  "uid": "${datasource}"
1144
1498
  },
1145
1499
  "editorMode": "code",
1146
- "expr": "stackdriver_pubsub_subscription_pubsub_googleapis_com_subscription_dead_letter_message_count > 0",
1500
+ "expr": "stackdriver_gcs_bucket_storage_googleapis_com_storage_total_bytes",
1147
1501
  "format": "time_series",
1148
- "legendFormat": "{{subscription_id}}",
1502
+ "intervalFactor": 2,
1503
+ "legendFormat": "{{bucket_name}} / {{storage_class}}",
1149
1504
  "range": true,
1150
1505
  "refId": "A"
1151
1506
  }
1152
1507
  ],
1153
- "title": "Dead Letter Message Count",
1508
+ "title": "GCS Storage Bytes",
1154
1509
  "type": "timeseries"
1155
1510
  }
1156
1511
  ],
@@ -1186,4 +1541,4 @@
1186
1541
  "uid": "stackdriver",
1187
1542
  "version": 3,
1188
1543
  "weekStart": ""
1189
- }
1544
+ }
@@ -0,0 +1,42 @@
1
+ # ๐Ÿ“Œ Optional Prometheus Custom Metrics
2
+
3
+ ## ๐ŸŽฏ Why we do this
4
+ We maintain a **single, consistent Prometheus baseline** for all clusters. Certain metrics - like GPU duty cycle percent or other node-type-specific stats - **do not exist in every cluster**. If we deploy scrape configs or custom adapter rules for optional metrics globally, we risk:
5
+
6
+ - Empty series queries โ†’ scrape flapping.
7
+ - Duplicate or rejected samples.
8
+ - Confusing "phantom target down" or noisy alerts.
9
+
10
+ ## โœ… How we solve it
11
+ - **Baseline:**
12
+ Our base `prom-operator` Helm chart and Prometheus Adapter configs **do not contain cluster-specific custom metrics** by default.
13
+ - running _helmup prom-operator_ will deploy prometheus with the standard exporters
14
+
15
+ - **Specialized nodes:**
16
+ When clusters require optional metrics (e.g., GPU nodes, special sensors, vendor-specific exporters), we deploy those configs with a separate, explicit step:
17
+ - post helmup run _./prom-operator/hpa-metrics.sh_ to apply the prometheus-adapter.yaml which contains the custom HPA metric rules (GPU duty cycle, Pub/Sub external metrics, ...)
18
+
19
+ ## ๐Ÿ” Benefits
20
+ - Zero config drift: our core charts stay generic and versioned.
21
+ - No surprise scrape issues or prometheus TSDB rejects in clusters that donโ€™t expose those metrics.
22
+ - Clusters only carry the scrape configs they can actually fulfill.
23
+
24
+ ## ๐Ÿ› ๏ธ Operational tips
25
+ - **Add custom metrics only when a clusterโ€™s node pool truly provides them.**
26
+ - Keep custom metric configs organized in a clear, dedicated folder (`gpu-adapter-values.yaml`, `gpu-metrics.yaml`, etc.)
27
+ - When adding new clusters, verify whether specialized nodes are present and apply the custom metrics if needed.
28
+ - When GPU adoption grows, we can promote the configs to the baseline and gate them behind a `gpuEnabled` flag.
29
+
30
+ ## โš™๏ธ Example
31
+ > Our `gpu_duty_cycle_percent` metric is installed *only* on clusters with GPU node pools.
32
+ > This is done by running:
33
+ >
34
+ > ```bash
35
+ > ./prom-operator/hpa-metrics.sh
36
+ > ```
37
+ > or directly with helm:
38
+ > ```bash
39
+ > helm upgrade prometheus-adapter -f gpu-adapter-values.yaml
40
+ > ```
41
+ >
42
+ > after the base Prometheus stack is installed.
@@ -8,7 +8,7 @@ showInstalling "The Prometheus Operator (kube-prometheus-stack)"
8
8
 
9
9
  # https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
10
10
  OCI_CHART="oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack"
11
- [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="88.5.4"
11
+ [ -z "$PROMETHEUS_STACK_CHART_VERSION" ] && PROMETHEUS_STACK_CHART_VERSION="91.4.0"
12
12
  helm upgrade $NS --install prometheus-stack $OCI_CHART \
13
13
  --values prom-operator/prometheus-stack.yaml \
14
14
  --version $PROMETHEUS_STACK_CHART_VERSION $HELM_WHAT
@@ -23,7 +23,7 @@ helm upgrade $NS --install elasticsearch8-exporter $OCI_CHART \
23
23
 
24
24
  # https://artifacthub.io/packages/helm/prometheus-community/prometheus-stackdriver-exporter
25
25
  showInstalling "The Stackdriver Exporter (prom-operator GKE metrics exports)"
26
- [ -z "$STACKDRIVER_EXPORTER_CHART_VERSION" ] && STACKDRIVER_EXPORTER_CHART_VERSION="4.13.0"
26
+ [ -z "$STACKDRIVER_EXPORTER_CHART_VERSION" ] && STACKDRIVER_EXPORTER_CHART_VERSION="5.2.0"
27
27
  OCI_CHART="oci://ghcr.io/prometheus-community/charts/prometheus-stackdriver-exporter"
28
28
  helm upgrade $NS --install stackdriver-exporter $OCI_CHART \
29
29
  --values prom-operator/stackdriver-exporter.yaml \