From 5e58131d6c81f444e0029b2720daf0179f3b1fd4 Mon Sep 17 00:00:00 2001 From: Marcel Henrich Date: Thu, 12 Sep 2024 22:33:52 +0200 Subject: [PATCH] feat(blocky): repair template for filtering of queryTypes (#26254) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Blocky has the filtering option, see . The current template seems to have copy-paste errors, this MR fixes the configuration. In the end, it is a breaking change, but I am unsure if somebody is actually using the current state, which would require some hacky things like: ```yaml filtering: filtering: true ips: ignoredWhatisHere: HTTPS ``` to ignore HTTPS query type (65). Thus, I only increased the minor version, but feel free to change it to a major version bump. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** I did run `helm template` with default values yaml and also with ```yaml # -- Return empty answer for these queries filtering: # -- Ensures filtering by query type queryTypes: - HTTPS ``` Then, I checked the results. **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Marcel Henrich Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/premium/blocky/Chart.yaml | 2 +- charts/premium/blocky/templates/_blockyConfig.tpl | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/charts/premium/blocky/Chart.yaml b/charts/premium/blocky/Chart.yaml index 2d6dd12216b..907dc0e34df 100644 --- a/charts/premium/blocky/Chart.yaml +++ b/charts/premium/blocky/Chart.yaml @@ -43,4 +43,4 @@ sources: - https://hub.docker.com/r/spx01/blocky - https://quay.io/oriedge/k8s_gateway type: application -version: 16.3.3 +version: 16.4.0 diff --git a/charts/premium/blocky/templates/_blockyConfig.tpl b/charts/premium/blocky/templates/_blockyConfig.tpl index 9e6cd8624d0..35783538155 100644 --- a/charts/premium/blocky/templates/_blockyConfig.tpl +++ b/charts/premium/blocky/templates/_blockyConfig.tpl @@ -120,14 +120,12 @@ bootstrapDns: {{- end }} {{- end }} -{{- if or .Values.filtering.filtering }} +{{- if .Values.filtering.queryTypes }} filtering: -{{- if .Values.filtering.ips }} queryTypes: -{{- range $id, $value := .Values.filtering.ips }} - - {{ $value }} -{{- end }} -{{- end }} + {{- range .Values.filtering.queryTypes }} + - {{ . }} + {{- end }} {{- end }} {{- if or .Values.customDNS.filterUnmappedTypes .Values.customDNS.customTTL .Values.customDNS.rewrite .Values.customDNS.mapping }}