From f275f6dbe5c423cc9f1ef0457741ce357ed95925 Mon Sep 17 00:00:00 2001 From: Floris Feddema Date: Mon, 1 Jul 2024 23:42:53 +0200 Subject: [PATCH] adguar: add product --- charts/adguard/.helmignore | 23 + charts/adguard/Chart.yaml | 3 + charts/adguard/README.md | 16 + .../adguard/dashboards/adguard-dashboard.json | 1676 +++++++++++++++++ charts/adguard/templates/_helpers.tpl | 22 + .../adguard/templates/grafana-dashboards.yaml | 17 + charts/adguard/templates/ingress.yaml | 33 + .../templates/primary/deployment-primary.yaml | 72 + .../templates/primary/pvc-primary.yaml | 16 + .../templates/primary/service-monitor.yaml | 21 + .../templates/primary/service-web.yaml | 20 + .../sync/adguard-sync-credentials.yaml | 20 + .../primary/sync/service-sync-web.yaml | 20 + .../primary/sync/sync-configmap.yaml | 25 + .../templates/secondary/service-dns.yaml | 27 + .../secondary/service-secondary.yaml | 21 + .../secondary/statefulset-secondary.yaml | 69 + charts/adguard/values.yaml | 50 + 18 files changed, 2151 insertions(+) create mode 100644 charts/adguard/.helmignore create mode 100644 charts/adguard/Chart.yaml create mode 100644 charts/adguard/README.md create mode 100644 charts/adguard/dashboards/adguard-dashboard.json create mode 100644 charts/adguard/templates/_helpers.tpl create mode 100644 charts/adguard/templates/grafana-dashboards.yaml create mode 100644 charts/adguard/templates/ingress.yaml create mode 100644 charts/adguard/templates/primary/deployment-primary.yaml create mode 100644 charts/adguard/templates/primary/pvc-primary.yaml create mode 100644 charts/adguard/templates/primary/service-monitor.yaml create mode 100644 charts/adguard/templates/primary/service-web.yaml create mode 100644 charts/adguard/templates/primary/sync/adguard-sync-credentials.yaml create mode 100644 charts/adguard/templates/primary/sync/service-sync-web.yaml create mode 100644 charts/adguard/templates/primary/sync/sync-configmap.yaml create mode 100644 charts/adguard/templates/secondary/service-dns.yaml create mode 100644 charts/adguard/templates/secondary/service-secondary.yaml create mode 100644 charts/adguard/templates/secondary/statefulset-secondary.yaml create mode 100644 charts/adguard/values.yaml diff --git a/charts/adguard/.helmignore b/charts/adguard/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/adguard/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/adguard/Chart.yaml b/charts/adguard/Chart.yaml new file mode 100644 index 0000000..f58cfbc --- /dev/null +++ b/charts/adguard/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +name: adguard +version: 1.0.0 diff --git a/charts/adguard/README.md b/charts/adguard/README.md new file mode 100644 index 0000000..bff5cb5 --- /dev/null +++ b/charts/adguard/README.md @@ -0,0 +1,16 @@ +# Adguard + +## How to use + +Add repository by running: + +```bash +helm repo add k8s-at-our-home https://k8s-at-our-homes.github.io/helm-charts/ +helm install adguard k8s-at-our-home/adguard +``` + +Or get the chart from ghcr.io: + +```bash +helm install infro oci://ghcr.io/k8s-at-our-homes/helm-charts/adguard +``` diff --git a/charts/adguard/dashboards/adguard-dashboard.json b/charts/adguard/dashboards/adguard-dashboard.json new file mode 100644 index 0000000..bbb1487 --- /dev/null +++ b/charts/adguard/dashboards/adguard-dashboard.json @@ -0,0 +1,1676 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "", + "editable": false, + "fiscalYearStartMonth": 0, + "gnetId": 13330, + "graphTooltip": 0, + "id": 55, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 60, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "AdGuard Home", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "Stopped" + }, + "1": { + "text": "Enabled" + } + }, + "type": "value" + } + ], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-green", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 84, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(adguard_running)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Status", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "Stopped" + }, + "1": { + "text": "Enabled" + } + }, + "type": "value" + } + ], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-green", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 102, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(adguard_protection_enabled)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Protection", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-green", + "value": null + }, + { + "color": "dark-orange", + "value": 0.05 + }, + { + "color": "dark-red", + "value": 0.1 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 101, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "avg(adguard_avg_processing_time > 0)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ legend }}", + "range": true, + "refId": "A" + } + ], + "title": "Processing TIme", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 1 + }, + "id": 82, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(adguard_num_dns_queries)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Number of queries", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 80, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "max(adguard_num_blocked_filtering)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Domains being blocked", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 40 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 92, + "maxDataPoints": 1000, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(adguard_num_blocked_filtering > 0) / sum(adguard_num_dns_queries > 0) * 100", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Percent of ads blocked", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 18, + "y": 1 + }, + "id": 95, + "maxDataPoints": 3, + "options": { + "displayLabels": [ + "name" + ], + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false, + "values": [ + "value", + "percent" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by(domain) (adguard_top_queried_domains)", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ domain }}", + "refId": "A" + } + ], + "title": "Top queries by domain", + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 99, + "maxDataPoints": 3, + "options": { + "displayLabels": [ + "name" + ], + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false, + "values": [ + "value", + "percent" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by(domain) (adguard_top_blocked_domains)", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ domain }}", + "refId": "A" + } + ], + "title": "Top ads by domain", + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "pihole" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 11, + "x": 0, + "y": 4 + }, + "id": 66, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "adguard_num_dns_queries > 0", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ hostname }}", + "range": true, + "refId": "A" + } + ], + "title": "DNS queries all of types", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 7, + "x": 11, + "y": 4 + }, + "id": 97, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by(type) (adguard_query_types)", + "interval": "", + "legendFormat": "{{ type }}", + "range": true, + "refId": "A" + } + ], + "title": "DNS Query Types", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 18, + "y": 8 + }, + "id": 100, + "maxDataPoints": 3, + "options": { + "displayLabels": [ + "name" + ], + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false, + "values": [ + "value", + "percent" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by(type) (adguard_query_types)", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ type }}", + "refId": "A" + } + ], + "title": "Replies by type", + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "decimals": 0, + "mappings": [], + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 21, + "y": 8 + }, + "id": 98, + "maxDataPoints": 3, + "options": { + "displayLabels": [ + "name" + ], + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false, + "values": [ + "value", + "percent" + ] + }, + "pieType": "donut", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum by(client) (adguard_top_clients)", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ client }}", + "refId": "A" + } + ], + "title": "Top clients by source", + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "pihole" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 11, + "x": 0, + "y": 12 + }, + "id": 62, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "adguard_num_blocked_filtering > 0", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ hostname }}", + "range": true, + "refId": "A" + } + ], + "title": "Ads blocked", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 13, + "x": 11, + "y": 15 + }, + "id": 93, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by(client) (adguard_top_clients)", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ client }}", + "range": false, + "refId": "A" + } + ], + "title": "Top clients", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "Value" + } + ] + } + } + ], + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "pihole" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 11, + "x": 0, + "y": 20 + }, + "id": 64, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "(adguard_num_blocked_filtering / adguard_num_dns_queries * 100) > 0", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ hostname }}", + "range": true, + "refId": "A" + } + ], + "title": "% of ads blocked", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 13, + "x": 11, + "y": 24 + }, + "id": 90, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by(domain) (adguard_top_blocked_domains)", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ domain }}", + "range": false, + "refId": "A" + } + ], + "title": "Top ads domains", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "Value" + } + ] + } + } + ], + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 11, + "x": 0, + "y": 27 + }, + "id": 74, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (domain) (adguard_top_queried_domains)", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{ domain }}", + "range": false, + "refId": "A" + } + ], + "title": "Top queries", + "transformations": [ + { + "id": "seriesToRows", + "options": { + "reducers": [] + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "Value" + } + ] + } + } + ], + "transparent": true, + "type": "table" + } + ], + "refresh": "10s", + "schemaVersion": 39, + "tags": [ + "adguard" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "hidden": false, + "nowDelay": "", + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Adguard Exporter", + "uid": "MIBVglomg", + "version": 5, + "weekStart": "" +} diff --git a/charts/adguard/templates/_helpers.tpl b/charts/adguard/templates/_helpers.tpl new file mode 100644 index 0000000..0b19d88 --- /dev/null +++ b/charts/adguard/templates/_helpers.tpl @@ -0,0 +1,22 @@ +{{- define "common.name" -}} +{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.fullname" -}} +{{- $name := .Chart.Name -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} + +{{- define "chartName" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "common.labels" -}} +app.kubernetes.io/version: {{ .Chart.Version | quote }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +helm.sh/chart: {{ include "chartName" . }} +{{- end -}} diff --git a/charts/adguard/templates/grafana-dashboards.yaml b/charts/adguard/templates/grafana-dashboards.yaml new file mode 100644 index 0000000..2e38992 --- /dev/null +++ b/charts/adguard/templates/grafana-dashboards.yaml @@ -0,0 +1,17 @@ +{{- $files := .Files.Glob "dashboards/**.json" }} +{{- range $path, $fileContents := $files }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $dashboardName | trunc 63 | trimSuffix "-" }} + labels: + grafana_dashboard: "1" + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard" + {{- include "common.labels" . | nindent 4 }} +data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} diff --git a/charts/adguard/templates/ingress.yaml b/charts/adguard/templates/ingress.yaml new file mode 100644 index 0000000..07fe589 --- /dev/null +++ b/charts/adguard/templates/ingress.yaml @@ -0,0 +1,33 @@ +{{ if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ template "common.fullname" . }} + annotations: {{ toYaml .Values.ingress.annotations | nindent 4 }} + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard" + {{- include "common.labels" . | nindent 4 }} +spec: + {{- if .Values.ingress.class}} + ingressClassName: {{ .Values.ingress.class }} + {{- end }} + rules: + - host: {{ .Values.ingress.domain }} + http: + paths: + - backend: + service: + name: {{ template "common.fullname" . }}-web + port: + number: 3000 + path: / + pathType: Prefix + {{- if .Values.ingress.tls.enabled }} + tls: + - hosts: + - {{ .Values.ingress.domain }} + secretName: {{ .Values.ingress.tls.secretName}} + {{- end }} +{{ end }} diff --git a/charts/adguard/templates/primary/deployment-primary.yaml b/charts/adguard/templates/primary/deployment-primary.yaml new file mode 100644 index 0000000..6f02574 --- /dev/null +++ b/charts/adguard/templates/primary/deployment-primary.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "common.fullname" . }}-primary + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-primary" + {{- include "common.labels" . | nindent 4 }} +spec: + revisionHistoryLimit: 0 + replicas: {{ .Values.primary.replicas }} + strategy: {{ toYaml .Values.primary.strategy | nindent 4 }} + selector: + matchLabels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-primary" + template: + metadata: + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-primary" + {{- include "common.labels" . | nindent 8 }} + spec: + initContainers: + - name: sync + image: "{{ .Values.sync.image.registry }}/{{ .Values.sync.image.repository }}:{{ .Values.sync.image.tag }}" + imagePullPolicy: IfNotPresent + restartPolicy: Always + args: + - run + envFrom: + - secretRef: + name: {{ .Values.sync.config.secret.name }} + - configMapRef: + name: {{ template "common.fullname" . }}-sync-config + ports: + - name: sync + containerPort: 8080 + protocol: TCP + resources: {{ toYaml .Values.sync.resources | nindent 12 }} + containers: + - name: adguard + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + env: + - name: TZ + value: "Europe/Amsterdam" + args: + - --config + - /opt/adguardhome/conf/AdGuardHome.yaml + - --work-dir + - /opt/adguardhome/work + - --no-check-update + ports: + - name: web + containerPort: 3000 + protocol: TCP + resources: {{ toYaml .Values.primary.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /opt/adguardhome/conf + subPath: conf + - name: data + mountPath: /opt/adguardhome/work + subPath: work + volumes: + - name: data + persistentVolumeClaim: + claimName: {{ template "common.fullname" . }}-primary diff --git a/charts/adguard/templates/primary/pvc-primary.yaml b/charts/adguard/templates/primary/pvc-primary.yaml new file mode 100644 index 0000000..bd9e292 --- /dev/null +++ b/charts/adguard/templates/primary/pvc-primary.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ template "common.fullname" . }}-primary + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-primary" + {{- include "common.labels" . | nindent 4 }} + {{ toYaml .Values.persistence.labels | nindent 4 }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.persistence.size }} diff --git a/charts/adguard/templates/primary/service-monitor.yaml b/charts/adguard/templates/primary/service-monitor.yaml new file mode 100644 index 0000000..e30f6a8 --- /dev/null +++ b/charts/adguard/templates/primary/service-monitor.yaml @@ -0,0 +1,21 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "common.fullname" . }}-service-monitor + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard" + {{- include "common.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-sync" + namespaceSelector: + matchNames: + - adguard + endpoints: + - port: sync + path: /metrics diff --git a/charts/adguard/templates/primary/service-web.yaml b/charts/adguard/templates/primary/service-web.yaml new file mode 100644 index 0000000..0e0381f --- /dev/null +++ b/charts/adguard/templates/primary/service-web.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "common.fullname" . }}-web + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard" + {{- include "common.labels" . | nindent 4 }} +spec: + type: ClusterIP + ports: + - port: 3000 + targetPort: 3000 + protocol: TCP + name: web + selector: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-primary" diff --git a/charts/adguard/templates/primary/sync/adguard-sync-credentials.yaml b/charts/adguard/templates/primary/sync/adguard-sync-credentials.yaml new file mode 100644 index 0000000..aaea2e9 --- /dev/null +++ b/charts/adguard/templates/primary/sync/adguard-sync-credentials.yaml @@ -0,0 +1,20 @@ +{{ if .Values.sync.config.secret.sealedValues }} +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + name: {{ .Values.sync.config.secret.name }} + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-sync" + {{- include "common.labels" . | nindent 4 }} +spec: + encryptedData: + ORIGIN_PASSWORD: {{ .Values.sync.config.secret.sealedValues.password }} + {{ range $i, $v := untilStep 1 ((add1 .Values.secondary.replicas) | int ) 1 }} + REPLICA{{ $v }}_PASSWORD: {{ $.Values.sync.config.secret.sealedValues.password }} + {{ end }} + template: + metadata: + name: {{ .Values.sync.config.secret.name }} +{{ end }} diff --git a/charts/adguard/templates/primary/sync/service-sync-web.yaml b/charts/adguard/templates/primary/sync/service-sync-web.yaml new file mode 100644 index 0000000..0a35edf --- /dev/null +++ b/charts/adguard/templates/primary/sync/service-sync-web.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "common.fullname" . }}-sync-web + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-sync" + {{- include "common.labels" . | nindent 4 }} +spec: + type: ClusterIP + ports: + - port: 8080 + targetPort: 8080 + protocol: TCP + name: sync + selector: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-primary" diff --git a/charts/adguard/templates/primary/sync/sync-configmap.yaml b/charts/adguard/templates/primary/sync/sync-configmap.yaml new file mode 100644 index 0000000..fb53613 --- /dev/null +++ b/charts/adguard/templates/primary/sync/sync-configmap.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "common.fullname" . }}-sync-config + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-sync" + {{- include "common.labels" . | nindent 4 }} +data: + LOG_LEVEL: "{{ .Values.sync.config.loglevel }}" + CRON: "{{ .Values.sync.config.cron }}" + RUN_ON_START: "true" + API_PORT: "8080" + API_METRICS_ENABLED: "true" + + ORIGIN_URL: "http://{{ template "common.fullname" . }}-web.{{ $.Release.Namespace }}.svc:3000" + ORIGIN_USERNAME: "admin" + + {{ range $i, $v := untilStep 1 ((add1 .Values.secondary.replicas) | int ) 1 }} + REPLICA{{ $v }}_URL: "http://{{ template "common.fullname" $ }}-secondary-{{ $i }}.{{ template "common.fullname" $ }}-secondary.{{ $.Release.Namespace }}.svc:3000" + REPLICA{{ $v }}_USERNAME: "admin" + REPLICA{{ $v }}_AUTO_SETUP: "true" + REPLICA{{ $v }}_DHCP_SERVER_ENABLED: "false" + {{ end }} diff --git a/charts/adguard/templates/secondary/service-dns.yaml b/charts/adguard/templates/secondary/service-dns.yaml new file mode 100644 index 0000000..fe5631d --- /dev/null +++ b/charts/adguard/templates/secondary/service-dns.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "common.fullname" . }}-dns + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard" + {{- include "common.labels" . | nindent 4 }} + annotations: + {{- toYaml .Values.service.annotations | nindent 4 }} +spec: + type: LoadBalancer + externalTrafficPolicy: Local + ports: + - port: 53 + targetPort: 53 + protocol: TCP + name: dns-tcp + - port: 53 + targetPort: 53 + protocol: UDP + name: dns-udp + selector: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-secondary" diff --git a/charts/adguard/templates/secondary/service-secondary.yaml b/charts/adguard/templates/secondary/service-secondary.yaml new file mode 100644 index 0000000..a423ccd --- /dev/null +++ b/charts/adguard/templates/secondary/service-secondary.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "common.fullname" . }}-secondary + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-secondary" + {{- include "common.labels" . | nindent 4 }} +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 3000 + targetPort: 3000 + protocol: TCP + name: web + selector: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-secondary" diff --git a/charts/adguard/templates/secondary/statefulset-secondary.yaml b/charts/adguard/templates/secondary/statefulset-secondary.yaml new file mode 100644 index 0000000..2b0214a --- /dev/null +++ b/charts/adguard/templates/secondary/statefulset-secondary.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ template "common.fullname" . }}-secondary + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-secondary" + {{- include "common.labels" . | nindent 4 }} +spec: + revisionHistoryLimit: 0 + replicas: {{ .Values.secondary.replicas }} + serviceName: {{ template "common.fullname" . }}-secondary + selector: + matchLabels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-secondary" + {{- include "common.labels" . | nindent 6 }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ template "common.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: "adguard-secondary" + {{- include "common.labels" . | nindent 8 }} + spec: + topologySpreadConstraints: {{ toYaml .Values.secondary.topologySpreadConstraints | nindent 8 }} + containers: + - name: adguard + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + env: + - name: TZ + value: "Europe/Amsterdam" + args: + - --config + - /opt/adguardhome/conf/AdGuardHome.yaml + - --work-dir + - /opt/adguardhome/work + - --no-check-update + ports: + - name: web + containerPort: 3000 + protocol: TCP + - name: dns-udp + containerPort: 53 + protocol: UDP + - name: dns-tcp + containerPort: 53 + protocol: TCP + resources: {{ toYaml .Values.secondary.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /opt/adguardhome/conf + subPath: conf + - name: data + mountPath: /opt/adguardhome/work + subPath: work + volumeClaimTemplates: + - metadata: + name: data + labels: + {{ toYaml .Values.persistence.labels | nindent 10 }} + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: {{ .Values.persistence.size }} diff --git a/charts/adguard/values.yaml b/charts/adguard/values.yaml new file mode 100644 index 0000000..1bf6396 --- /dev/null +++ b/charts/adguard/values.yaml @@ -0,0 +1,50 @@ +image: + registry: docker.io + repository: adguard/adguardhome + tag: v0.107.51 + +primary: + replicas: 1 + resources: {} + strategy: + type: Recreate + +secondary: + replicas: 3 + resources: {} + + topologySpreadConstraints: [] + +persistence: + labels: {} + size: 1Gi + +service: + annotations: {} + +init: + image: + registry: docker.io + repository: busybox + tag: 1.36.1 + +ingress: + enabled: true + domain: adguard.example.com + annotations: {} + +sync: + resources: {} + + config: + secret: + name: adguard-sync-credentials + sealedValues: + password: '' + loglevel: error + cron: "*/1 * * * *" + + image: + registry: ghcr.io + repository: bakito/adguardhome-sync + tag: v0.6.11