From cba84990817cece8a2b286f993267b3f8f877ad4 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Tue, 4 Apr 2023 15:54:02 -0500 Subject: [PATCH] :sparkles: (adguard-home): Initial AdGuard Home chart release --- README.md | 1 + charts/adguard-home/.helmignore | 26 ++ charts/adguard-home/Chart.lock | 6 + charts/adguard-home/Chart.yaml | 29 +++ charts/adguard-home/README.md | 98 ++++++++ charts/adguard-home/README_CONFIG.md.gotmpl | 9 + charts/adguard-home/icon.svg | 1 + charts/adguard-home/templates/NOTES.txt | 1 + charts/adguard-home/templates/common.yaml | 42 ++++ charts/adguard-home/values.yaml | 250 ++++++++++++++++++++ 10 files changed, 463 insertions(+) create mode 100644 charts/adguard-home/.helmignore create mode 100644 charts/adguard-home/Chart.lock create mode 100644 charts/adguard-home/Chart.yaml create mode 100644 charts/adguard-home/README.md create mode 100644 charts/adguard-home/README_CONFIG.md.gotmpl create mode 100644 charts/adguard-home/icon.svg create mode 100644 charts/adguard-home/templates/NOTES.txt create mode 100644 charts/adguard-home/templates/common.yaml create mode 100644 charts/adguard-home/values.yaml diff --git a/README.md b/README.md index 7b188e9e2..2db1dadb3 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ helm delete my- | Chart | Description | | ----- | ----------- | +| [adguard-home adguard-home icon](charts/adguard-home/) | Free and open source, powerful network-wide ads & trackers blocking DNS server. | | [ascii-telnet ascii-telnet icon](charts/ascii-telnet/) | Star Wars telnet server | | [bookstack bookstack icon](charts/bookstack/) | A simple, self-hosted, easy-to-use platform for organising and storing information. | | [borgmatic borgmatic icon](charts/borgmatic/) | borgmatic is simple, configuration-driven backup software for servers and workstations. Protect your files with client-side encryption. Backup your databases too. Monitor it all with integrated third-party services. | diff --git a/charts/adguard-home/.helmignore b/charts/adguard-home/.helmignore new file mode 100644 index 000000000..f2409818d --- /dev/null +++ b/charts/adguard-home/.helmignore @@ -0,0 +1,26 @@ +# 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/ +# helm-docs templates +*.gotmpl +icon.svg diff --git a/charts/adguard-home/Chart.lock b/charts/adguard-home/Chart.lock new file mode 100644 index 000000000..b4abd0c2f --- /dev/null +++ b/charts/adguard-home/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: https://bjw-s.github.io/helm-charts + version: 1.3.2 +digest: sha256:9bb4816882dfc02904f9f347a7995bf7acefd55bd60f925c3a8d80938a2b1ec0 +generated: "2023-04-04T13:07:10.124151-05:00" diff --git a/charts/adguard-home/Chart.yaml b/charts/adguard-home/Chart.yaml new file mode 100644 index 000000000..a174c77e2 --- /dev/null +++ b/charts/adguard-home/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: adguard-home +description: Free and open source, powerful network-wide ads & trackers blocking DNS server. +home: https://charts.gabe565.com/charts/adguard-home/ +icon: https://raw.githubusercontent.com/gabe565/charts/main/charts/adguard-home/icon.svg +type: application +version: 0.1.0 +# renovate datasource=docker depName=adguard/adguardhome +appVersion: v0.107.26 +kubeVersion: ">=1.22.0-0" +keywords: + - adblock + - dns + - privacy +dependencies: + - name: common + repository: https://bjw-s.github.io/helm-charts + version: 1.3.2 +sources: + - https://github.com/AdguardTeam/AdGuardHome +annotations: + artifacthub.io/changes: |- + - kind: added + description: Initial release + artifacthub.io/links: |- + - name: App Source + url: https://github.com/AdguardTeam/AdGuardHome + - name: Chart Source + url: https://github.com/gabe565/charts/tree/main/charts/adguard-home diff --git a/charts/adguard-home/README.md b/charts/adguard-home/README.md new file mode 100644 index 000000000..51ec16bd5 --- /dev/null +++ b/charts/adguard-home/README.md @@ -0,0 +1,98 @@ +# adguard-home + +adguard-home logo + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) +![AppVersion: v0.107.26](https://img.shields.io/badge/AppVersion-v0.107.26-informational?style=flat) + +Free and open source, powerful network-wide ads & trackers blocking DNS server. + +**Homepage:** + +**This chart is not maintained by the upstream project and any issues with the chart should be raised +[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=adguard-home&version=0.1.0)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.22.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| | common | 1.3.2 | + +## TL;DR + +```console +helm repo add gabe565 https://charts.gabe565.com +helm repo update +helm install adguard-home gabe565/adguard-home +``` + +## Installing the Chart + +To install the chart with the release name `adguard-home` + +```console +helm install adguard-home gabe565/adguard-home +``` + +## Uninstalling the Chart + +To uninstall the `adguard-home` deployment + +```console +helm uninstall adguard-home +``` + +The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. + +## Configuration + +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. +Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install adguard-home \ + --set env.TZ="America/New York" \ + gabe565/adguard-home +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install adguard-home gabe565/adguard-home -f values.yaml +``` + +## Custom configuration + +N/A + +## Values + +**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| config | string | See [values.yaml](./values.yaml) | Default AdGuard Home config file. This will only be copied if an existing config does not exist. [[ref]](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration) | +| env.TZ | string | `"UTC"` | Set the container timezone | +| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | +| image.repository | string | `"adguard/adguardhome"` | Image repository | +| image.tag | string | `"v0.107.26"` | Image tag | +| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. | +| persistence.config | object | See [values.yaml](./values.yaml) | Configure config persistence settings for the chart under this key. | +| persistence.data | object | See [values.yaml](./values.yaml) | Configure data persistence settings for the chart under this key. | +| service.dns-tcp | object | See [values.yaml](./values.yaml) | Configures settings for the TCP DNS service. | +| service.dns-udp | object | See [values.yaml](./values.yaml) | Configures settings for the UDP DNS service. | +| service.main | object | See [values.yaml](./values.yaml) | Configures settings for the main service. | + +--- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/adguard-home/README_CONFIG.md.gotmpl b/charts/adguard-home/README_CONFIG.md.gotmpl new file mode 100644 index 000000000..e93d80bfa --- /dev/null +++ b/charts/adguard-home/README_CONFIG.md.gotmpl @@ -0,0 +1,9 @@ +{{- define "custom.custom.configuration.header" -}} +## Custom configuration +{{- end -}} + +{{- define "custom.custom.configuration" -}} +{{ template "custom.custom.configuration.header" . }} + +N/A +{{- end -}} diff --git a/charts/adguard-home/icon.svg b/charts/adguard-home/icon.svg new file mode 100644 index 000000000..d4e422a35 --- /dev/null +++ b/charts/adguard-home/icon.svg @@ -0,0 +1 @@ +logo-shield diff --git a/charts/adguard-home/templates/NOTES.txt b/charts/adguard-home/templates/NOTES.txt new file mode 100644 index 000000000..44ecfaa6c --- /dev/null +++ b/charts/adguard-home/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "bjw-s.common.lib.chart.notes" . -}} diff --git a/charts/adguard-home/templates/common.yaml b/charts/adguard-home/templates/common.yaml new file mode 100644 index 000000000..0f489765b --- /dev/null +++ b/charts/adguard-home/templates/common.yaml @@ -0,0 +1,42 @@ +{{/* Append the hardcoded settings */}} +{{- define "adguardHome.harcodedValues" -}} +{{- if .Values.config }} +configMaps: + default-config: + enabled: true + data: + AdGuardHome.yaml: {{ .Values.config }} + +persistence: + default-config: + enabled: true + type: configMap + name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-default-config + mountPath: "-" + +initContainers: + copy-default-config: + image: alpine + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + if [[ ! -f /opt/adguardhome/conf/AdGuardHome.yaml ]]; then + mkdir -p /opt/adguardhome/conf + cp /tmp/AdGuardHome.yaml /opt/adguardhome/conf/AdGuardHome.yaml + fi + volumeMounts: + - name: default-config + mountPath: /tmp/AdGuardHome.yaml + subPath: AdGuardHome.yaml + - name: config + mountPath: /opt/adguardhome/conf + securityContext: + runAsUser: 0 +{{- end }} +{{- end -}} +{{- $_ := merge .Values (include "adguardHome.harcodedValues" . | fromYaml) -}} + +{{/* Render the templates */}} +{{ include "bjw-s.common.loader.all" . }} diff --git a/charts/adguard-home/values.yaml b/charts/adguard-home/values.yaml new file mode 100644 index 000000000..52ac5b958 --- /dev/null +++ b/charts/adguard-home/values.yaml @@ -0,0 +1,250 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml +# + +image: + # -- Image repository + repository: adguard/adguardhome + # -- Image pull policy + pullPolicy: IfNotPresent + # -- Image tag + tag: v0.107.26 + +env: + # -- Set the container timezone + TZ: UTC + +service: + # -- Configures settings for the main service. + # @default -- See [values.yaml](./values.yaml) + main: + ports: + http: + port: 3000 + # -- Configures settings for the TCP DNS service. + # @default -- See [values.yaml](./values.yaml) + dns-tcp: + enabled: true + type: LoadBalancer + externalTrafficPolicy: Local + annotations: + metallb.universe.tf/allow-shared-ip: adguard-home + ports: + dns-tcp: + enabled: true + port: 53 + dns-over-tls: + enabled: true + port: 853 + # -- Configures settings for the UDP DNS service. + # @default -- See [values.yaml](./values.yaml) + dns-udp: + enabled: true + type: LoadBalancer + externalTrafficPolicy: Local + annotations: + metallb.universe.tf/allow-shared-ip: adguard-home + ports: + dns-udp: + enabled: true + protocol: UDP + port: 53 + dns-over-quic: + enabled: true + protocol: UDP + port: 784 + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See [values.yaml](./values.yaml) + main: + enabled: false + # hosts: + # - host: chart-example.local + # paths: + # - path: / + # tls: + # - secretName: chart-example.local + # hosts: + # - chart-example.local + +persistence: + # -- Configure config persistence settings for the chart under this key. + # @default -- See [values.yaml](./values.yaml) + config: + enabled: false + retain: true + mountPath: /opt/adguardhome/conf + # storageClass: "" + # accessMode: ReadWriteOnce + # size: 4Gi + # -- Configure data persistence settings for the chart under this key. + # @default -- See [values.yaml](./values.yaml) + data: + enabled: false + retain: true + mountPath: /opt/adguardhome/work + # storageClass: "" + # accessMode: ReadWriteOnce + # size: 4Gi + +# -- Default AdGuard Home config file. +# This will only be copied if an existing config does not exist. +# [[ref]](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration) +# @default -- See [values.yaml](./values.yaml) +config: | + bind_host: 0.0.0.0 + bind_port: 80 + users: [] + auth_attempts: 5 + block_auth_min: 15 + http_proxy: "" + language: "" + theme: auto + debug_pprof: false + web_session_ttl: 720 + dns: + bind_hosts: + - 0.0.0.0 + port: 53 + anonymize_client_ip: false + protection_enabled: true + blocking_mode: default + blocking_ipv4: "" + blocking_ipv6: "" + blocked_response_ttl: 10 + parental_block_host: family-block.dns.adguard.com + safebrowsing_block_host: standard-block.dns.adguard.com + ratelimit: 20 + ratelimit_whitelist: [] + refuse_any: true + upstream_dns: + - https://dns10.quad9.net/dns-query + upstream_dns_file: "" + bootstrap_dns: + - 9.9.9.10 + - 149.112.112.10 + - 2620:fe::10 + - 2620:fe::fe:10 + all_servers: false + fastest_addr: false + fastest_timeout: 1s + allowed_clients: [] + disallowed_clients: [] + blocked_hosts: + - version.bind + - id.server + - hostname.bind + trusted_proxies: + - 127.0.0.0/8 + - ::1/128 + cache_size: 4194304 + cache_ttl_min: 0 + cache_ttl_max: 0 + cache_optimistic: false + bogus_nxdomain: [] + aaaa_disabled: false + enable_dnssec: false + edns_client_subnet: + custom_ip: "" + enabled: false + use_custom: false + max_goroutines: 300 + handle_ddr: true + ipset: [] + ipset_file: "" + filtering_enabled: true + filters_update_interval: 24 + parental_enabled: false + safesearch_enabled: false + safebrowsing_enabled: false + safebrowsing_cache_size: 1048576 + safesearch_cache_size: 1048576 + parental_cache_size: 1048576 + cache_time: 30 + rewrites: [] + blocked_services: [] + upstream_timeout: 10s + private_networks: [] + use_private_ptr_resolvers: true + local_ptr_upstreams: [] + use_dns64: false + dns64_prefixes: [] + serve_http3: false + use_http3_upstreams: false + tls: + enabled: false + server_name: "" + force_https: false + port_https: 443 + port_dns_over_tls: 853 + port_dns_over_quic: 853 + port_dnscrypt: 0 + dnscrypt_config_file: "" + allow_unencrypted_doh: false + certificate_chain: "" + private_key: "" + certificate_path: "" + private_key_path: "" + strict_sni_check: false + querylog: + enabled: true + file_enabled: true + interval: 2160h + size_memory: 1000 + ignored: [] + statistics: + enabled: true + interval: 1 + ignored: [] + filters: + - enabled: true + url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt + name: AdGuard DNS filter + id: 1 + - enabled: false + url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_2.txt + name: AdAway Default Blocklist + id: 2 + whitelist_filters: [] + user_rules: [] + dhcp: + enabled: false + interface_name: "" + local_domain_name: lan + dhcpv4: + gateway_ip: "" + subnet_mask: "" + range_start: "" + range_end: "" + lease_duration: 86400 + icmp_timeout_msec: 1000 + options: [] + dhcpv6: + range_start: "" + lease_duration: 86400 + ra_slaac_only: false + ra_allow_slaac: false + clients: + runtime_sources: + whois: true + arp: true + rdns: true + dhcp: true + hosts: true + persistent: [] + log_file: "" + log_max_backups: 0 + log_max_size: 100 + log_max_age: 3 + log_compress: false + log_localtime: false + verbose: false + os: + group: "" + user: "" + rlimit_nofile: 0 + schema_version: 17