diff --git a/charts/linstor-cluster/Chart.yaml b/charts/linstor-cluster/Chart.yaml index c4f6920..9810ef0 100644 --- a/charts/linstor-cluster/Chart.yaml +++ b/charts/linstor-cluster/Chart.yaml @@ -1,17 +1,17 @@ apiVersion: v2 name: linstor-cluster description: | - Deploy the Linstor Cluster via Piraeus operator + Deploy the Linstor Cluster via Piraeus Operator type: application -icon: https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/artwork/sandbox-artwork/icon/color.svg +kubeVersion: ">= 1.20.0" maintainers: - name: The Piraeus Maintainers url: https://github.com/piraeusdatastore +home: https://github.com/piraeusdatastore/helm-charts +icon: https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/artwork/sandbox-artwork/icon/color.svg keywords: - storage -home: https://github.com/piraeusdatastore/helm-charts sources: - https://github.com/piraeusdatastore/linstor-cluster - -version: 0.0.1 -appVersion: "v2.2.0" +version: 1.0.0 +appVersion: "v2.3.0" diff --git a/charts/linstor-cluster/README.md b/charts/linstor-cluster/README.md index 13f5b04..c618861 100644 --- a/charts/linstor-cluster/README.md +++ b/charts/linstor-cluster/README.md @@ -4,7 +4,7 @@ Deploy the LinstorCluster and LinstorSattelitConfig via helm chart ## Usage -First, ensure you have piraeus-operator installed +First, ensure you have Piraeus Operator installed Then install this chart: @@ -12,3 +12,9 @@ Then install this chart: helm repo add piraeus-charts https://piraeus.io/helm-charts/ helm install linstor-cluster piraeus-charts/linstor-cluster ``` + +Check out the available options: + +``` +helm show values piraeus-charts/linstor-cluster +``` diff --git a/charts/linstor-cluster/dashboard.json b/charts/linstor-cluster/dashboard.json new file mode 100644 index 0000000..861abff --- /dev/null +++ b/charts/linstor-cluster/dashboard.json @@ -0,0 +1,2195 @@ +{ + "__inputs": [], + "__requires": [], + "annotations": { + "list": [] + }, + "editable": false, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 33, + "panels": [], + "title": "LINSTOR", + "type": "row" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 18, + "x": 0, + "y": 1 + }, + "id": 41, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "((sum by (storage_pool)(linstor_storage_pool_capacity_total_bytes{node=~\"$node\"} != 0)-sum by (storage_pool)(linstor_storage_pool_capacity_free_bytes{node=~\"$node\"}))*100/sum by (storage_pool)(linstor_storage_pool_capacity_total_bytes{node=~\"$node\"}))", + "hide": false, + "legendFormat": "{{ storage_pool }}", + "refId": "A" + } + ], + "title": "Space Usage", + "type": "gauge" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 43, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "sum by (storage_pool) (linstor_storage_pool_capacity_total_bytes{node=~\"$node\"} != 0)", + "hide": false, + "legendFormat": "{{ storage_pool }}", + "refId": "A" + } + ], + "title": "Total", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 5 + }, + "id": 44, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "sum by (storage_pool) (linstor_storage_pool_capacity_free_bytes{node=~\"$node\"} != 0)", + "hide": false, + "legendFormat": "{{ storage_pool }}", + "refId": "A" + } + ], + "title": "Free", + "type": "stat" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 9 + }, + "id": 42, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "sum by (storage_pool) ((linstor_storage_pool_capacity_total_bytes{node=~\"$node\"} != 0) - (linstor_storage_pool_capacity_free_bytes{node=~\"$node\"} != 0))", + "hide": false, + "legendFormat": "{{ storage_pool }}", + "refId": "A" + } + ], + "title": "Used", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 11 + }, + "id": 36, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(linstor_node_state{nodetype=\"SATELLITE\",node=~\"$node\"} == 2) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Nodes", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 11 + }, + "id": 38, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(linstor_storage_pool_capacity_total_bytes{driver!=\"DISKLESS\",node=~\"$node\"}) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Storage Pools", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 11 + }, + "id": 35, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "sum(linstor_resource_definition_count{}) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Resource Definitions", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 11 + }, + "id": 37, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(linstor_resource_state{node=~\"$node\"}) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Resources", + "type": "stat" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 57, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 11 + }, + "id": 40, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "avg_over_time(linstor_scrape_duration_seconds[$__rate_interval])", + "legendFormat": "allocated", + "refId": "A" + } + ], + "title": "Scrape Duration", + "type": "timeseries" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "dark-yellow", + "value": 6 + }, + { + "color": "orange", + "value": 10 + }, + { + "color": "red", + "value": 20 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 13 + }, + "id": 52, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "sum by (module) (round(increase(linstor_error_reports_count{module!=\"\", node=~\"$node\"}[$__rate_interval])))", + "instant": false, + "legendFormat": "{{ module }}", + "refId": "A" + } + ], + "title": "New Error Reports", + "transformations": [], + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 14 + }, + "id": 51, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(linstor_node_state{nodetype=\"SATELLITE\", node=~\"$node\"} != 2) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Offline Nodes", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 14 + }, + "id": 50, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(linstor_storage_pool_error_count{driver!=\"DISKLESS\", node=~\"$node\"} != 0) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Failed Storage Pools", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 14 + }, + "id": 49, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count((linstor_volume_state{node=~\"$node\"} != 1) != 4) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Failed Resources", + "type": "stat" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 46, + "panels": [], + "title": "Statistics", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "binBps" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "8.2.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "exemplar": true, + "expr": "rate(drbd_device_written_bytes_total{node=~\"$node\"}[$__rate_interval]) and topk(5, avg_over_time(drbd_device_written_bytes_total{node=~\"$node\"}[$__rate_interval]) > 0)", + "instant": false, + "legendFormat": "{{name}} on {{node}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Write Rate (5 Most Active Volumes)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:104", + "format": "binBps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:105", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "binBps" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 18 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "8.2.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "exemplar": true, + "expr": "rate(drbd_device_read_bytes_total{node=~\"$node\"}[$__rate_interval]) and topk(5, avg_over_time(drbd_device_read_bytes_total{node=~\"$node\"}[$__rate_interval]) > 0)", + "instant": false, + "legendFormat": "{{name}} on {{node}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Read Rate (5 Most Active Volumes)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:254", + "format": "binBps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:255", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "binBps" + }, + "overrides": [] + }, + "fill": 5, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "hiddenSeries": false, + "id": 47, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "8.2.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "exemplar": true, + "expr": "sum by (node) (rate(drbd_device_written_bytes_total{node=~\"$node\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{ node }}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Write Rate by Node", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:410", + "format": "binBps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:411", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "binBps" + }, + "overrides": [] + }, + "fill": 5, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "hiddenSeries": false, + "id": 48, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "8.2.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "exemplar": true, + "expr": "sum by (node) (rate(drbd_device_read_bytes_total{node=~\"$node\"}[$__rate_interval]))", + "instant": false, + "legendFormat": "{{ node }}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Read Rate by Node", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:332", + "format": "binBps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:333", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 8, + "panels": [], + "title": "DRBD", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 16, + "x": 0, + "y": 35 + }, + "id": 6, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "$$hashKey": "object:470", + "aggregation": "Last", + "decimals": 2, + "displayAliasType": "Warning / Critical", + "displayType": "Regular", + "displayValueWithAlias": "Never", + "exemplar": true, + "expr": "drbd_resource_resources{node=~\"$node\"}", + "legendFormat": "{{node}}", + "refId": "A", + "units": "none", + "valueHandler": "Number Threshold" + } + ], + "title": "Number of DRBD Resources", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 35 + }, + "hiddenSeries": false, + "id": 27, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "8.2.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": true, + "targets": [ + { + "exemplar": true, + "expr": "avg_over_time(scrape_duration_seconds{job=\"linstor-node\", node=~\"$node\"}[$__rate_interval])", + "legendFormat": "{{node}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Scrape Duration", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:158", + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:159", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${datasource}", + "description": "DRBD data out of sync with a peer", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 43 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "sum(max by(name, volume) (drbd_peerdevice_outofsync_bytes{node=~\"$node\"} > 0)) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "out-of-sync data", + "type": "stat" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 46 + }, + "id": 14, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": false, + "expr": "count(count by (name) (drbd_connection_state{drbd_connection_state!=\"UpToDate\", drbd_connection_state!=\"Connected\", node=~\"$node\"} == 1)) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "disconnected", + "type": "stat" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 46 + }, + "id": 20, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(count by (name) (drbd_device_quorum{node=~\"$node\"} == 0)) OR on() vector(0)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + }, + { + "exemplar": true, + "expr": "count(drbd_device_quorum == 0)", + "hide": true, + "legendFormat": "", + "refId": "B" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "without quorum", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 46 + }, + "id": 4, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(drbd_device_unintentionaldiskless{node=~\"$node\"} == 1) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "storage failure", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "DRBD data out of sync with a peer", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 46 + }, + "id": 29, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(count by (name) (drbd_peerdevice_outofsync_bytes{node=~\"$node\"} > 0)) OR on() vector(0)", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "out-of-sync", + "type": "stat" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [ + { + "options": { + "1": { + "text": "No" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 49 + }, + "id": 22, + "maxDataPoints": null, + "options": { + "frameIndex": 0, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "drbd_connection_state" + } + ] + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "drbd_connection_state{drbd_connection_state!=\"UpToDate\", drbd_connection_state!=\"Connected\", node=~\"$node\"} == 1", + "format": "table", + "instant": true, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Disconnected DRBD Resources", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "instance": true, + "job": true, + "name": false, + "peer_node_id": true, + "tier": true + }, + "indexByName": { + "Time": 1, + "Value": 10, + "__name__": 2, + "conn_name": 5, + "drbd_connection_state": 4, + "instance": 6, + "job": 7, + "name": 0, + "node": 3, + "peer_node_id": 8, + "tier": 9 + }, + "renameByName": { + "Value #A": "Quorum?", + "conn_name": "Remote Node", + "drbd_connection_state": "State", + "instance": "Instance", + "job": "", + "name": "DRBD Resource", + "node": "Node", + "peer_node_id": "" + } + } + } + ], + "type": "table" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "DRBD Resource" + }, + "properties": [ + { + "id": "custom.width", + "value": 279 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host" + }, + "properties": [ + { + "id": "custom.width", + "value": 238 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Out of Sync" + }, + "properties": [ + { + "id": "custom.width", + "value": 93 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 49 + }, + "id": 16, + "options": { + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": false, + "expr": "sum(drbd_peerdevice_outofsync_bytes{node=~\"$node\"}) by(name, node) > 0", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "", + "refId": "A" + } + ], + "title": "DRBD Resources Out of Sync", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Time": 0, + "Value": 3, + "name": 1, + "node": 2 + }, + "renameByName": { + "Time": "", + "Value": "Out of Sync", + "instance": "Host", + "name": "DRBD Resource", + "node": "Node" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "Out of Sync" + } + ] + } + } + ], + "type": "table" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [ + { + "options": { + "1": { + "text": "No" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 57 + }, + "id": 31, + "maxDataPoints": null, + "options": { + "frameIndex": 0, + "showHeader": true + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(drbd_device_quorum{node=~\"$node\"} == 0) by(node, name)", + "format": "table", + "instant": true, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "DRBD Resources Without Quorum", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true + }, + "indexByName": { + }, + "renameByName": { + "Value #A": "Quorum?", + "instance": "Instance", + "name": "DRBD Resource", + "node": "Node" + } + } + } + ], + "type": "table" + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [ + { + "options": { + "1": { + "text": "No" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 57 + }, + "id": 30, + "maxDataPoints": null, + "options": { + "frameIndex": 0, + "showHeader": true + }, + "pluginVersion": "8.2.6", + "targets": [ + { + "exemplar": true, + "expr": "count(drbd_device_unintentionaldiskless{node=~\"$node\"} == 1) by(node, name, minor)", + "format": "table", + "instant": true, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "DRBD Resources with Storage Failure", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true + }, + "indexByName": { + "Time": 0, + "Value": 4, + "minor": 3, + "name": 1, + "node": 2 + }, + "renameByName": { + "Value": "", + "Value #A": "Quorum?", + "instance": "Instance", + "minor": "Minor", + "name": "DRBD Resource", + "node": "Node" + } + } + } + ], + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 32, + "style": "dark", + "tags": [ + "storage", + "piraeus-datastore" + ], + "templating": { + "list": [ + { + "current": { + "text": "default", + "value": "default" + }, + "hide": 0, + "label": "Data Source", + "name": "datasource", + "options": [ + ], + "query": "prometheus", + "refresh": 1, + "regex": "", + "type": "datasource" + }, + { + "allValue": null, + "current": { + }, + "datasource": "${datasource}", + "definition": "", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "node", + "options": [], + "query": "label_values(drbdreactor_up, node)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + }, + "timezone": "", + "title": "Piraeus Datastore", + "uid": "f_tZtVlMz", + "version": 0 +} diff --git a/charts/linstor-cluster/templates/NOTES.txt b/charts/linstor-cluster/templates/NOTES.txt index 51db498..5b571a1 100644 --- a/charts/linstor-cluster/templates/NOTES.txt +++ b/charts/linstor-cluster/templates/NOTES.txt @@ -1,9 +1,14 @@ -LinstorCluser: {{ include "linstor-cluster.fullname" $ }} -{{- if (include "linstor-cluster.createPassPhraseSecret" .) }} -Secret with MASTER_PASSPHRASE: {{ include "linstor-cluster.fullname" $ }}-passphrase -{{- end }} +LinstorCluster: {{ include "linstor-cluster.fullname" $ }} {{- range .Values.linstorSatelliteConfigurations }} -linstorSatelliteConfigurations: {{ .name }} +LinstorSatelliteConfiguration: {{ .name }} +{{- end }} +{{- range .Values.linstorNodeConnections }} +LinstorNodeConnection: {{ .name }} {{- end }} +{{- range .Values.storageClasses }} +StorageClass: {{ .name }} +{{- end }} + +Successfully deployed! -Successfully deployed! \ No newline at end of file +For next steps, see our users guide: https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-kubernetes-basic-configuration-and-deployment diff --git a/charts/linstor-cluster/templates/_helpers.tpl b/charts/linstor-cluster/templates/_helpers.tpl index e78a36e..76da23f 100644 --- a/charts/linstor-cluster/templates/_helpers.tpl +++ b/charts/linstor-cluster/templates/_helpers.tpl @@ -23,6 +23,22 @@ If release name contains chart name it will be used as a full name. {{- end }} {{- end }} +{{- define "linstor-cluster.linstorPassphraseSecret" -}} +{{- if .Values.linstorCluster.linstorPassphraseSecret }} + {{- .Values.linstorCluster.linstorPassphraseSecret }} +{{- else }} + {{- include "linstor-cluster.fullname" . }}-passphrase +{{- end }} +{{- end }} + +{{- define "linstor-cluster.apiTLSIssuer" -}} +{{- dig "apiTLS" "certManager" "name" (printf "%s-api-ca" (include "linstor-cluster.fullname" .)) .Values.linstorCluster }} +{{- end }} + +{{- define "linstor-cluster.internalTLSIssuer" -}} +{{- dig "internalTLS" "certManager" "name" (printf "%s-internal-ca" (include "linstor-cluster.fullname" .)) .Values.linstorCluster }} +{{- end }} + {{/* Create chart name and version as used by the chart label. */}} @@ -49,60 +65,3 @@ Selector labels app.kubernetes.io/name: {{ include "linstor-cluster.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} - -{{/* -Return true, if apiTLS enabled -*/}} -{{- define "linstor-cluster.createApiTLSCert" -}} -{{- if .Values.linstorCluster }} - {{- if .Values.linstorCluster.apiTLS }} - {{- if .Values.linstorCluster.apiTLS.enabled }} - {{- true -}} - {{- end }} - {{- end }} -{{- end }} -{{- end }} - -{{/* -Return true, if internalTLS enabled -*/}} -{{- define "linstor-cluster.createInternalTLSCert" -}} -{{- if .Values.linstorCluster }} - {{- if .Values.linstorCluster.internalTLS }} - {{- if .Values.linstorCluster.internalTLS.enabled }} - {{- true -}} - {{- end }} - {{- end }} -{{- end }} -{{- end }} - -{{/* -Retur true, if Secret with MASTER_PASSPHRASE will be created from this chart -*/}} -{{- define "linstor-cluster.createPassPhraseSecret" }} -{{- if .Values.linstorCluster }} - {{- if .Values.linstorCluster.linstorPassphraseSecret }} - {{- if .Values.linstorCluster.linstorPassphraseSecret.masterPassPhrase }} - {{- true -}} - {{- end }} - {{- if and (.Values.linstorCluster.linstorPassphraseSecret.masterPassPhrase) (.Values.linstorCluster.linstorPassphraseSecret.existingSecretName) }} - {{ fail "Values of masterPassPhrase and existingSecretName was defined! Expected only one" }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} - -{{/* -Define name of secret with MASTER_PASSPHRASE in linstorCluter -*/}} -{{- define "linstor-cluster.passPhraseSecretName" }} -{{- if .Values.linstorCluster }} - {{- if .Values.linstorCluster.linstorPassphraseSecret }} - {{- if .Values.linstorCluster.linstorPassphraseSecret.masterPassPhrase }} - {{- printf "%s-passphrase" (include "linstor-cluster.fullname" .) }} - {{- else if .Values.linstorCluster.linstorPassphraseSecret.existingSecretName }} - {{- .Values.linstorCluster.linstorPassphraseSecret.existingSecretName }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} diff --git a/charts/linstor-cluster/templates/api-tls.yaml b/charts/linstor-cluster/templates/api-tls.yaml new file mode 100644 index 0000000..a957f4d --- /dev/null +++ b/charts/linstor-cluster/templates/api-tls.yaml @@ -0,0 +1,63 @@ +{{- if eq .Values.createApiTLS "cert-manager" }} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: {{ include "linstor-cluster.apiTLSIssuer" . }} + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + commonName: {{ include "linstor-cluster.apiTLSIssuer" . }} + secretName: {{ include "linstor-cluster.apiTLSIssuer" . }} + duration: 87600h # 10 years + isCA: true + usages: + - signing + - key encipherment + - cert sign + issuerRef: + name: {{ include "linstor-cluster.fullname" . }}-ca-bootstrapper + kind: Issuer +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: {{ include "linstor-cluster.apiTLSIssuer" . }} + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + ca: + secretName: {{ include "linstor-cluster.apiTLSIssuer" . }} +{{- else if eq .Values.createApiTLS "helm" }} +{{- $ca := genCA (include "linstor-cluster.apiTLSIssuer" .) 3650 }} +{{- $controllerCert := genSignedCert (printf "linstor-controller.%s.svc" .Release.Namespace) (list) (list (printf "linstor-controller.%s.svc" .Release.Namespace) (printf "linstor-controller.%s" .Release.Namespace) "linstor-controller") 3650 $ca }} +{{ $controllerSecretName := dig "apiTLS" "apiSecretName" "linstor-api-tls" .Values.linstorCluster}} +--- +apiVersion: v1 +kind: Secret +type: kubernetes.io/tls +metadata: + name: {{ $controllerSecretName }} + labels: + {{- include "linstor-cluster.labels" . | nindent 4}} +stringData: + tls.crt: {{ $controllerCert.Cert | quote }} + tls.key: {{ $controllerCert.Key | quote }} + ca.crt: {{ $ca.Cert | quote }} +{{ $clientCerts := list (dig "apiTLS" "clientSecretName" "linstor-client-tls" .Values.linstorCluster) (dig "apiTLS" "csiControllerSecretName" "linstor-csi-controller-tls" .Values.linstorCluster) (dig "apiTLS" "csiNodeSecretName" "linstor-csi-node-tls" .Values.linstorCluster)}} +{{- range without (uniq $clientCerts) $controllerSecretName }} +{{ $cert := genSignedCert . (list) (list) 3650 $ca }} +--- +apiVersion: v1 +kind: Secret +type: kubernetes.io/tls +metadata: + name: {{ . }} + labels: + {{- include "linstor-cluster.labels" $ | nindent 4}} +stringData: + tls.crt: {{ $cert.Cert | quote }} + tls.key: {{ $cert.Key | quote }} + ca.crt: {{ $ca.Cert | quote }} +{{- end }} +{{- end }} diff --git a/charts/linstor-cluster/templates/ca-bootstrapper.yaml b/charts/linstor-cluster/templates/ca-bootstrapper.yaml new file mode 100644 index 0000000..fbbfe7b --- /dev/null +++ b/charts/linstor-cluster/templates/ca-bootstrapper.yaml @@ -0,0 +1,11 @@ +{{- if or (eq .Values.createApiTLS "cert-manager") (eq .Values.createInternalTLS "cert-manager") }} +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: {{ include "linstor-cluster.fullname" .}}-ca-bootstrapper + labels: + {{- include "linstor-cluster.labels" . | nindent 4}} +spec: + selfSigned: { } +{{- end }} diff --git a/charts/linstor-cluster/templates/certificate.yaml b/charts/linstor-cluster/templates/certificate.yaml deleted file mode 100644 index d81f02d..0000000 --- a/charts/linstor-cluster/templates/certificate.yaml +++ /dev/null @@ -1,42 +0,0 @@ -{{- if (include "linstor-cluster.createApiTLSCert" .) }} ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: {{ include "linstor-cluster.fullname" $ }}-api-tls - labels: - {{- include "linstor-cluster.labels" $ | nindent 4 }} -spec: - commonName: {{ include "linstor-cluster.fullname" $ }}-api-tls - secretName: {{ include "linstor-cluster.fullname" $ }}-api-tls - duration: 87600h0m0s # 10 years - isCA: true - usages: - - signing - - key encipherment - - cert sign - issuerRef: - name: {{ include "linstor-cluster.fullname" $ }}-ca-bootstrapper - kind: Issuer -{{- end }} -{{- if (include "linstor-cluster.createInternalTLSCert" .) }} ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: {{ include "linstor-cluster.fullname" $ }}-internal-tls - labels: - {{- include "linstor-cluster.labels" $ | nindent 4 }} -spec: - commonName: {{ include "linstor-cluster.fullname" $ }}-internal-tls - secretName: {{ include "linstor-cluster.fullname" $ }}-internal-tls - duration: 87600h0m0s # 10 years - isCA: true - usages: - - signing - - key encipherment - - cert sign - issuerRef: - name: {{ include "linstor-cluster.fullname" $ }}-ca-bootstrapper - kind: Issuer -{{- end }} diff --git a/charts/linstor-cluster/templates/internal-tls.yaml b/charts/linstor-cluster/templates/internal-tls.yaml new file mode 100644 index 0000000..870e795 --- /dev/null +++ b/charts/linstor-cluster/templates/internal-tls.yaml @@ -0,0 +1,82 @@ +{{- if eq .Values.createInternalTLS "cert-manager" }} +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: {{ include "linstor-cluster.internalTLSIssuer" . }} + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + commonName: {{ include "linstor-cluster.internalTLSIssuer" . }} + secretName: {{ include "linstor-cluster.internalTLSIssuer" . }} + duration: 87600h # 10 years + isCA: true + usages: + - signing + - key encipherment + - cert sign + issuerRef: + name: {{ include "linstor-cluster.fullname" . }}-ca-bootstrapper + kind: Issuer +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: {{ include "linstor-cluster.internalTLSIssuer" . }} + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + ca: + secretName: {{ include "linstor-cluster.internalTLSIssuer" . }} +--- +apiVersion: piraeus.io/v1 +kind: LinstorSatelliteConfiguration +metadata: + name: internal-tls + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + internalTLS: + certManager: + name: {{ include "linstor-cluster.internalTLSIssuer" . }} + kind: Issuer +{{- else if eq .Values.createInternalTLS "helm" }} +{{- $ca := genCA (include "linstor-cluster.internalTLSIssuer" .) 3650 }} +{{- $controllerCert := genSignedCert (printf "linstor-controller.%s.svc" .Release.Namespace) (list) (list (printf "linstor-controller.%s.svc" .Release.Namespace) (printf "linstor-controller.%s" .Release.Namespace) "linstor-controller") 3650 $ca }} +{{ $controllerSecretName := dig "internalTLS" "secretName" "linstor-controller-internal-tls" .Values.linstorCluster}} +--- +apiVersion: v1 +kind: Secret +type: kubernetes.io/tls +metadata: + name: {{ $controllerSecretName }} + labels: + {{- include "linstor-cluster.labels" . | nindent 4}} +stringData: + tls.crt: {{ $controllerCert.Cert | quote }} + tls.key: {{ $controllerCert.Key | quote }} + ca.crt: {{ $ca.Cert | quote }} +--- +{{- $nodeCert := genSignedCert "linstor-satellite" (list) (list) 3650 $ca }} +apiVersion: v1 +kind: Secret +type: kubernetes.io/tls +metadata: + name: {{ include "linstor-cluster.fullname" . }}-node-tls + labels: + {{- include "linstor-cluster.labels" . | nindent 4}} +stringData: + tls.crt: {{ $nodeCert.Cert | quote }} + tls.key: {{ $nodeCert.Key | quote }} + ca.crt: {{ $ca.Cert | quote }} +--- +apiVersion: piraeus.io/v1 +kind: LinstorSatelliteConfiguration +metadata: + name: internal-tls + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + internalTLS: + secretName: {{ include "linstor-cluster.fullname" . }}-node-tls +{{- end }} diff --git a/charts/linstor-cluster/templates/issuer.yaml b/charts/linstor-cluster/templates/issuer.yaml deleted file mode 100644 index a866d98..0000000 --- a/charts/linstor-cluster/templates/issuer.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if or (include "linstor-cluster.createApiTLSCert" .) (include "linstor-cluster.createInternalTLSCert" .) }} ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ include "linstor-cluster.fullname" $ }}-ca-bootstrapper - labels: - {{- include "linstor-cluster.labels" . | nindent 4 }} -spec: - selfSigned: { } -{{- end }} -{{- if (include "linstor-cluster.createInternalTLSCert" .) }} ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ include "linstor-cluster.fullname" $ }}-internal-tls - labels: - {{- include "linstor-cluster.labels" . | nindent 4 }} -spec: - ca: - secretName: {{ include "linstor-cluster.fullname" $ }}-internal-tls -{{- end }} -{{- if (include "linstor-cluster.createApiTLSCert" .) }} ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ include "linstor-cluster.fullname" $ }}-api-tls - labels: - {{- include "linstor-cluster.labels" . | nindent 4 }} -spec: - ca: - secretName: {{ include "linstor-cluster.fullname" $ }}-api-tls -{{- end }} diff --git a/charts/linstor-cluster/templates/linstorcluster.yaml b/charts/linstor-cluster/templates/linstorcluster.yaml index ee5600a..358fe5f 100644 --- a/charts/linstor-cluster/templates/linstorcluster.yaml +++ b/charts/linstor-cluster/templates/linstorcluster.yaml @@ -4,24 +4,21 @@ metadata: name: {{ include "linstor-cluster.fullname" $ }} labels: {{- include "linstor-cluster.labels" $ | nindent 4 }} -{{- with .Values.linstorCluster }} -spec: - {{- if (include "linstor-cluster.createApiTLSCert" $ ) }} - apiTLS: - certManager: - name: {{ include "linstor-cluster.fullname" $ }}-api-tls - kind: Issuer - {{- end }} - {{- if (include "linstor-cluster.createInternalTLSCert" $) }} - internalTLS: - certManager: - name: {{ include "linstor-cluster.fullname" $ }}-internal-tls - kind: Issuer - {{- end }} - {{- if (include "linstor-cluster.passPhraseSecretName" $) }} - linstorPassphraseSecret: {{ include "linstor-cluster.passPhraseSecretName" $ | trim}} - {{- end }} - {{- with (dig "nodeSelector" (dict) .) }} - nodeSelector: {{- toYaml . | nindent 4 }} - {{- end }} +{{- $spec := .Values.linstorCluster }} +{{- if .Values.linstorPassphrase }} +{{- $_ := set $spec "linstorPassphraseSecret" (include "linstor-cluster.linstorPassphraseSecret" .) }} +{{- end }} +{{- if eq .Values.createApiTLS "cert-manager" }} +{{- $apiTLS := merge (default dict .Values.linstorCluster.apiTLS) (dict "certManager" (dict "name" (include "linstor-cluster.apiTLSIssuer" .) "kind" "Issuer"))}} +{{- $_ := set $spec "apiTLS" $apiTLS }} +{{- else if eq .Values.createApiTLS "helm" }} +{{- $_ := set $spec "apiTLS" (default dict .Values.linstorCluster.apiTLS)}} {{- end }} +{{- if eq .Values.createInternalTLS "cert-manager" }} +{{- $internalTLS := merge (default dict .Values.linstorCluster.internalTLS) (dict "certManager" (dict "name" (include "linstor-cluster.internalTLSIssuer" .) "kind" "Issuer"))}} +{{- $_ := set $spec "internalTLS" $internalTLS }} +{{- else if eq .Values.createInternalTLS "helm" }} +{{- $_ := set $spec "internalTLS" (default dict .Values.linstorCluster.internalTLS)}} +{{- end }} +spec: + {{- toYaml $spec | nindent 2 }} diff --git a/charts/linstor-cluster/templates/linstornodeconnection.yaml b/charts/linstor-cluster/templates/linstornodeconnection.yaml new file mode 100644 index 0000000..3058f2f --- /dev/null +++ b/charts/linstor-cluster/templates/linstornodeconnection.yaml @@ -0,0 +1,12 @@ +{{- range .Values.linstorNodeConnections }} +--- +apiVersion: piraeus.io/v1 +kind: LinstorNodeConnection +metadata: + name: {{ include "linstor-cluster.fullname" $ }}-{{ .name }} + labels: + {{- include "linstor-cluster.labels" $ | nindent 4 }} +{{- $spec := omit . "name" }} +spec: + {{- toYaml $spec | nindent 2}} +{{- end }} diff --git a/charts/linstor-cluster/templates/linstorsatelliteconfiguration.yaml b/charts/linstor-cluster/templates/linstorsatelliteconfiguration.yaml index ad5d327..8256c2e 100644 --- a/charts/linstor-cluster/templates/linstorsatelliteconfiguration.yaml +++ b/charts/linstor-cluster/templates/linstorsatelliteconfiguration.yaml @@ -1,27 +1,12 @@ {{- range .Values.linstorSatelliteConfigurations }} +--- apiVersion: piraeus.io/v1 kind: LinstorSatelliteConfiguration metadata: name: {{ include "linstor-cluster.fullname" $ }}-{{ .name }} labels: {{- include "linstor-cluster.labels" $ | nindent 4 }} +{{- $spec := omit . "name" }} spec: - {{- if (include "linstor-cluster.createInternalTLSCert" $ ) }} - internalTLS: - certManager: - name: {{ include "linstor-cluster.fullname" $ }}-internal-tls - kind: Issuer - {{- end }} - {{- with (dig "nodeSelector" (dict) .) }} - nodeSelector: {{- toYaml . | nindent 4 }} - {{- end }} - {{- with (dig "storagePools" (dict) .) }} - storagePools: {{- toYaml . | nindent 4 }} - {{- end }} - {{- with (dig "patches" (dict) .) }} - patches: {{- toYaml . | nindent 4 }} - {{- end }} - {{- with (dig "properties" (dict) .) }} - properties: {{- toYaml . | nindent 4 }} - {{- end }} + {{- toYaml $spec | nindent 2}} {{- end }} diff --git a/charts/linstor-cluster/templates/monitoring.yaml b/charts/linstor-cluster/templates/monitoring.yaml new file mode 100644 index 0000000..f5de19f --- /dev/null +++ b/charts/linstor-cluster/templates/monitoring.yaml @@ -0,0 +1,168 @@ +{{- if .Values.monitoring.enabled }} +{{- if .Values.monitoring.dashboard.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + grafana_dashboard: "1" + {{- include "linstor-cluster.labels" . | nindent 4 }} + name: linbit-sds-dashboard +data: + linbit-sds-dashboard.json: | + {{- .Files.Get "dashboard.json" | nindent 4 }} +{{- end }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: linstor-controller + labels: + app.kubernetes.io/component: linstor-controller + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + endpoints: +{{- if or .Values.createApiTLS (dig "apiTLS" "" .Values.linstorCluster) }} + - path: /metrics + port: secure-api + scheme: https + tlsConfig: + serverName: linstor-controller + keySecret: + key: tls.key + name: {{ dig "apiTLS" "clientSecretName" "linstor-client-tls" .Values.linstorCluster }} + cert: + secret: + key: tls.crt + name: {{ dig "apiTLS" "clientSecretName" "linstor-client-tls" .Values.linstorCluster }} + ca: + secret: + key: ca.crt + name: {{ dig "apiTLS" "clientSecretName" "linstor-client-tls" .Values.linstorCluster }} +{{- else }} + - path: /metrics + port: api + scheme: http +{{- end }} + selector: + matchLabels: + app.kubernetes.io/component: linstor-controller +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: linstor-satellite + labels: + app.kubernetes.io/component: linstor-satellite + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + podMetricsEndpoints: + - port: prometheus + relabelings: + - action: replace + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node + scheme: http + selector: + matchLabels: + app.kubernetes.io/component: linstor-satellite +--- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: piraeus-datastore + labels: + {{- include "linstor-cluster.labels" . | nindent 4 }} +spec: + groups: + - name: linstor.rules + rules: + - alert: linstorSatelliteErrorRate + annotations: + description: | + LINSTOR Satellite "{{`{{ $labels.hostname }}` }}" reports {{`{{ $value }}`}} errors in the last 15 minutes. + Use "linstor error-reports list --nodes {{`{{ $labels.hostname }}`}} --since 15minutes" to see them. + expr: increase(linstor_error_reports_count{module="SATELLITE"}[15m]) > 0 + labels: + severity: warning + - alert: linstorControllerErrorRate + annotations: + description: | + LINSTOR Controller reports {{`{{ $value }}`}} errors in the last 15 minutes. + Use "linstor error-reports list --since 15minutes" to see them. + expr: increase(linstor_error_reports_count{module="CONTROLLER"}[15m]) > 0 + labels: + severity: warning + - alert: linstorSatelliteNotOnline + annotations: + description: | + LINSTOR Satellite "{{`{{ $labels.hostname }}`}}" is not ONLINE. + Check that the Satellite is running and reachable from the LINSTOR Controller. + expr: linstor_node_state{nodetype="SATELLITE"} != 2 + labels: + severity: critical + - alert: linstorStoragePoolErrors + annotations: + description: | + Storage pool "{{`{{ $labels.storage_pool }}`}}" on node "{{`{{ $labels.node }}`}}" ({{`{{ $labels.driver }}`}}={{`{{ $labels.backing_pool }}`}}) is reporting errors. + expr: linstor_storage_pool_error_count > 0 + labels: + severity: critical + - alert: linstorStoragePoolAtCapacity + annotations: + description: | + Storage pool "{{`{{ $labels.storage_pool }}`}}" on node "{{`{{ $labels.node }}`}}" ({{`{{ $labels.driver }}`}}={{`{{ $labels.backing_pool }}`}}) has less than 20% free space available. + expr: ( linstor_storage_pool_capacity_free_bytes / linstor_storage_pool_capacity_total_bytes ) < 0.20 + labels: + severity: warn + - name: drbd.rules + rules: + - alert: drbdConnectionNotConnected + annotations: + description: | + DRBD Resource "{{`{{ $labels.name }}`}}" on "{{`{{ $labels.pod }}`}}" is not connected to "{{`{{ $labels.conn_name }}`}}": {{`{{ $labels.drbd_connection_state }}`}}. + expr: drbd_connection_state{drbd_connection_state!="Connected"} > 0 + labels: + severity: warn + - alert: drbdDeviceNotUpToDate + annotations: + description: | + DRBD device "{{`{{ $labels.name }}`}}" on "{{`{{ $labels.pod }}`}}" has unexpected device state "{{`{{ $labels.drbd_device_state }}`}}". + expr: drbd_device_state{drbd_device_state!~"UpToDate|Diskless"} > 0 + labels: + severity: warn + - alert: drbdDeviceUnintentionalDiskless + annotations: + description: | + DRBD device "{{`{{ $labels.name }}`}}" on "{{`{{ $labels.pod }}`}}" is unintenionally diskless. + This usually indicates IO errors reported on the backing device. Check the kernel log. + expr: drbd_device_unintentionaldiskless > 0 + labels: + severity: warn + - alert: drbdDeviceWithoutQuorum + annotations: + description: | + DRBD device "{{`{{ $labels.name }}`}}" on "{{`{{ $labels.pod }}`}}" has no quorum. + This usually indicates connectivity issues. + expr: drbd_device_quorum == 0 + labels: + severity: warn + - alert: drbdResourceSuspended + annotations: + description: | + DRBD resource "{{`{{ $labels.name }}`}}" on "{{`{{ $labels.pod }}`}}" has been suspended for 1m. + expr: drbd_resource_suspended > 0 + for: 1m + labels: + severity: warn + - alert: drbdResourceResyncWithoutProgress + annotations: + description: | + DRBD resource "{{`{{ $labels.name }}`}}" on "{{`{{ $labels.pod }}`}}" has been in Inconsistent without resync progress for 5 minutes. + This may indicate there is no connection to UpToDate data, or a stuck resync. + expr: drbd_device_state{drbd_device_state="Inconsistent"} and delta(drbd_peerdevice_outofsync_bytes[5m]) + >= 0 + labels: + severity: warn +{{- end }} diff --git a/charts/linstor-cluster/templates/secret.yaml b/charts/linstor-cluster/templates/secret.yaml index 4c3f2ed..f6579ed 100644 --- a/charts/linstor-cluster/templates/secret.yaml +++ b/charts/linstor-cluster/templates/secret.yaml @@ -1,10 +1,10 @@ -{{- if (include "linstor-cluster.createPassPhraseSecret" .) }} +{{- if .Values.linstorPassphrase }} apiVersion: v1 kind: Secret metadata: - name: {{ include "linstor-cluster.fullname" $ }}-passphrase + name: {{ include "linstor-cluster.linstorPassphraseSecret" . }} labels: {{- include "linstor-cluster.labels" . | nindent 4 }} stringData: - MASTER_PASSPHRASE: {{ .Values.linstorCluster.linstorPassphraseSecret.masterPassPhrase }} + MASTER_PASSPHRASE: {{ .Values.linstorPassphrase | quote }} {{- end }} diff --git a/charts/linstor-cluster/templates/storageclass.yaml b/charts/linstor-cluster/templates/storageclass.yaml index aefc3e2..31780d1 100644 --- a/charts/linstor-cluster/templates/storageclass.yaml +++ b/charts/linstor-cluster/templates/storageclass.yaml @@ -4,19 +4,21 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: {{ .name }} -{{- with .annotations }} - annotations: {{- . | toYaml | trim | nindent 4 }} +{{- if .annotations }} + annotations: + {{- toYaml .annotations | nindent 4 }} {{- end }} labels: - {{- include "linstor-cluster.labels" $ | nindent 4 }} -{{- with .labels }} - {{- . | toYaml | trim | nindent 4 }} + {{- include "linstor-cluster.labels" $ | nindent 4 }} +{{- if .labels }} + {{- toYaml .labels | nindent 4 }} {{- end }} -provisioner: {{ .provisioner }} -reclaimPolicy: {{ .reclaimPolicy }} -volumeBindingMode: {{ .volumeBindingMode }} -allowVolumeExpansion: {{ .allowVolumeExpansion }} -{{- with .parameters }} -parameters: {{- . | toYaml | trim | nindent 2 }} +provisioner: {{ .provisioner | default "linstor.csi.linbit.com" }} +reclaimPolicy: {{ .reclaimPolicy | default "Delete" }} +volumeBindingMode: {{ .volumeBindingMode | default "WaitForFirstConsumer" }} +allowVolumeExpansion: {{ .allowVolumeExpansion | default "true" }} +{{- if .parameters }} +parameters: + {{- toYaml .parameters | nindent 2 }} {{- end }} {{- end }} diff --git a/charts/linstor-cluster/values.schema.json b/charts/linstor-cluster/values.schema.json index 6172978..2a95128 100644 --- a/charts/linstor-cluster/values.schema.json +++ b/charts/linstor-cluster/values.schema.json @@ -1,102 +1,96 @@ { - "$schema": "http://json-schema.org/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "required": [ + "linstorCluster", + "linstorSatelliteConfigurations", + "linstorNodeConnections", + "monitoring", + "storageClasses" + ], "properties": { "linstorCluster": { - "type": "object", - "properties": { - "apiTLS": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "internalTLS": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - } - } - }, - "linstorPassphraseSecret": { - "type": "object", - "properties": { - "masterPassPhrase": { - "type": "string" - }, - "existingSecretName": { - "type": "string" - } + "type": "object" + }, + "linstorPassphrase": { + "type": "string" + }, + "createApiTLS": { + "type": "string", + "enum": [ + "", + "cert-manager", + "helm" + ] + }, + "createInternalTLS": { + "type": "string", + "enum": [ + "", + "cert-manager", + "helm" + ] + }, + "linstorSatelliteConfigurations": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": true, + "properties": { + "name": { + "type": "string" } - }, - "nodeSelector": { - "type": "object" } } }, - "linstorSatelliteConfigurations": { + "linstorNodeConnections": { "type": "array", "items": { "type": "object", + "required": [ + "name" + ], + "additionalProperties": true, "properties": { "name": { "type": "string" - }, - "nodeSelector": { - "type": "object" - }, - "patches": { - "type": "array", - "items": { - "type": "object", - "properties": { - "patch": { - "type": "string" - }, - "target": { - "type": "object", - "properties": { - "kind": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - } - } - }, + } + } + } + }, + "monitoring": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "dashboard": { + "type": "object", "properties": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } + "enabled": { + "type": "boolean" } }, - "storagePools": { - "type": "array", - "items": { - "type": "object" - } - } + "required": [ + "enabled" + ] } - } + }, + "required": [ + "enabled", + "dashboard" + ] }, "storageClasses": { "type": "array", "items": { "type": "object", + "required": [ + "name" + ], "properties": { "allowVolumeExpansion": { "type": "boolean" diff --git a/charts/linstor-cluster/values.yaml b/charts/linstor-cluster/values.yaml index dbf3993..61374ce 100644 --- a/charts/linstor-cluster/values.yaml +++ b/charts/linstor-cluster/values.yaml @@ -1,57 +1,216 @@ # Definition of LinstorCluster # Ref https://github.com/piraeusdatastore/piraeus-operator/blob/v2/docs/reference/linstorcluster.md linstorCluster: {} -# # TLS options requires cert-manager (cert-manager.io) to be installed in a cluster +## Only deploy LINBIT SDS on the nodes matching these labels. +# nodeSelector: +# example.com/worker: "" +# +## Only deploy LINBIT SDS on nodes matching these affinity settings. +# nodeAffinity: +# nodeSelectorTerms: +# - matchExpressions: +# - key: "" +# operator: NotIn +# values: +# - example.com/no-storage +# - example.com/windows +# +## Instead of pulling from default locations, pull from this registry. +## For example drbd.io/linstor-controller would become registry.example.com/linbit-sds/linstor-controller. +# repository: registry.example.com/linbit-sds +# +## Secret to store the LINSTOR Passphrase. Set "linstorPassphrase" to configure directly with this chart. +# linstorPassphraseSecret: passphrase-secret +# +## Instead of deploying a LINSTOR Controller, use an existing controller reachable at the given URL. +# externalController: +# url: http://linstor-controller.external.example.com:3370 +# +## Configure TLS for the LINSTOR API. Set "createApiTLS" to create the certificates with this chart. # apiTLS: -# enabled: true +# certManager: +# name: api-issuer +# kind: Issuer +# apiSecretName: linstor-api-tls +# clientSecretName: linstor-client-tls +# csiControllerSecretName: linstor-csi-controller-tls +# csiNodeSecretName: linstor-csi-node-tls +# +## Configure TLS between LINSTOR Controller and Satellites. Set "createInternalTLS" to create the certificates with this chart. # internalTLS: +# certManager: +# name: internal-issuer +# kind: Issuer +# secretName: internal-tls +# +## Set the LINSTOR Properties on the Controller level +# properties: +# - name: DrbdOptions/Net/tls +# value: "yes" +# +## Apply patches to the Operator-managed resources. +# patches: +# - target: +# kind: Service +# name: linstor-controller +# patch: | +# apiVersion: v1 +# kind: Service +# metadata: +# name: linstor-controller +# spec: +# ipFamilyPolicy: SingleStack +# +## Configure the LINSTOR Controller component. +# controller: # enabled: true -# # This MASTER_PASSPHRASE required for encrypting and storing snapshot on S3. -# # Either define masterPassPhrase or define name of existingSecret -# linstorPassphraseSecret: -# masterPassPhrase: "shhhSuPerSecRetPassWoRd!11" -# # If you would like use existing secret, then comment out 'masterPassPhrase', end uncomment string below -# #existingSecretName: "linstor-extra-secret" -# # Run the linstor-cluster on workers, which have "piraeus.io/autoplace: 'yes'" label -# nodeSelector: -# piraeus.io/autoplace: 'yes' +# podTemplate: +# spec: +# hostNetwork: true +# +## Configure the LINSTOR CSI Controller component. +# csiController: +# enabled: true +# podTemplate: +# spec: +# hostNetwork: true +# +## Configure the LINSTOR CSI Node component. +# csiNode: +# enabled: true +# podTemplate: +# spec: +# hostNetwork: true +# +## Configure the LINSTOR High Availability Controller component. +# highAvailabilityController: +# enabled: true +# podTemplate: +# spec: +# hostNetwork: true + +# Create a passpharse secret for LINSTOR. +# If set, automatically also sets linstorCluster.linstorPasspharseSecret +linstorPassphrase: "" + +# Create the necessary certificates for linstorCluster.apiTLS using the provided method: +# * "" will not create any certificates. +# * "helm" will use Helm itself to generate certificates. +# * "cert-manager" will create a self-signed CA provisioner using a cert-manager.io Issuer. +createApiTLS: "" + +# Create the necessary certificates for linstorCluster.internalTLS using the provided method: +# * "" will not create any certificates. +# * "helm" will use Helm itself to generate certificates. +# * "cert-manager" will create a self-signed CA provisioner using a cert-manager.io Issuer. +createInternalTLS: "" # Definition of linstorSatelliteConfigurations # Ref https://github.com/piraeusdatastore/piraeus-operator/blob/v2/docs/reference/linstorsatelliteconfiguration.md linstorSatelliteConfigurations: [] -# # Satellites configuration list -# - name: storage-satellites -# # Definition of pools and devices -# storagePools: -# - name: lvm-thin -# lvmThinPool: -# volumeGroup: "" -# thinPool: thin -# source: -# hostDevices: -# - /dev/sdd -# # List of patches. Below described workaround patch for building kernel modules on CentOS 8 Stream -# patches: -# - target: -# kind: Pod -# name: satellite -# patch: | -# apiVersion: v1 -# kind: Pod -# metadata: -# name: linstor-satellite -# spec: -# initContainers: -# - name: drbd-module-loader -# image: quay.io/piraeusdatastore/drbd9-centos8:v9.2.3 -# -# # Optional. List of additional properties. Below described property how to exclude node from AutoplaceTarget -# properties: -# - name: AutoplaceTarget -# value: "no" -# # Define nodeSelector, where you can replace labels -# nodeSelector: -# piraeus.io/autoplace: 'yes' +## Name to give the satellite configuration +#- name: worker-config +# +## Only apply configuration on the nodes matching these labels. +# nodeSelector: +# example.com/worker: "" +# +## Only apply configuration on the nodes matching this affinity. +# nodeAffinity: +# nodeSelectorTerms: +# - matchExpressions: +# - key: "" +# operator: NotIn +# values: +# - example.com/no-storage +# - example.com/windows +# +## Configure TLS between LINSTOR Controller and Satellites. If "createInternalTLS" is set, it will automatically create +## a configuration that sets internalTLS for all satellites. +# internalTLS: +# certManager: +# name: internal-issuer +# kind: Issuer +# secretName: internal-tls +# +## Additional properties to apply on the LINSTOR Satellite. Can inherit values from the Kubernetes Node resource. +# properties: +# - name: AutoplaceTarget +# value: "no" +# - name: Aux/topology/failure-domain +# valueFrom: +# nodeFieldRef: metadata.annotations['example.com/failure-domain'] +# optional: true +# +## Configure Storage Pools for the node. +# storagePools: +# - name: lvm +# properties: +# - name: StorDriver/LvcreateOptions +# value: "--compression y" +# lvmPool: +# volumeGroup: vg1 +# - name: lvm-thin +# properties: +# - name: StorDriver/LvcreateOptions +# value: "--compression y" +# lvmThinPool: +# volumeGroup: vg2 +# thinPool: thin +# source: +# hostDevices: +# - /dev/nvme1 +# +## Override the default Pod template used for the Satellite. +# podTemplate: +# spec: +# hostNetwork: true +# +## Apply patches to the Operator managed resources. +# patches: +# - target: +# kind: ConfigMap +# name: reactor-config +# patch: | +# apiVersion: v1 +# kind: ConfigMap +# metadata: +# name: reactor-config +# data: +# prometheus.toml: | +# [[prometheus]] +# enums = false +# address = ":9942" + +# Definition of linstorNodeConnections +# Ref https://github.com/piraeusdatastore/piraeus-operator/blob/v2/docs/reference/linstornodeconnection.md +linstorNodeConnections: [] +## Name for the node connection +#- name: cross-region +# +## Select the pairs of nodes between which the following setting should apply. +## The example selects all pairs of nodes that are not in the same region +# selector: +# - matchLabels: +# - key: topology.kubernetes.io/region +# op: NotSame +## Properties to set for the connection +# properties: +# - name: DrbdOptions/Net/protocol +# value: B +## Paths to configure: LINSTOR will use these preferred paths if configured instead of the default interface. +# paths: +# - interface: enp0s1 +# name: wan + +# Enable monitoring via Prometheus Operator +monitoring: + # Set to true to create prometheus monitoring opjects + enabled: false + # Configuration for the default Grafana dashboard + dashboard: + # Enable deployment of the Grafana dashboard + enabled: true # List of storageClasses. You can create different SC with different params storageClasses: []