From 926084c29d7c215839db5114066e09775e3913e4 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sat, 15 Apr 2023 15:12:31 +0300 Subject: [PATCH] fix(blocky): fix additional bootstap dns (#8029) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes #8014 ⚒️ Fixes #7990 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 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?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 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 - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ 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._ --- charts/enterprise/blocky/Chart.yaml | 2 +- charts/enterprise/blocky/questions.yaml | 20 ++++++++++++++----- .../blocky/templates/_blockyConfig.tpl | 6 ++++-- charts/enterprise/blocky/values.yaml | 4 ++-- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/charts/enterprise/blocky/Chart.yaml b/charts/enterprise/blocky/Chart.yaml index b4e4d6eff66..865d319cf06 100644 --- a/charts/enterprise/blocky/Chart.yaml +++ b/charts/enterprise/blocky/Chart.yaml @@ -25,7 +25,7 @@ sources: - https://0xerr0r.github.io/blocky/ - https://github.com/0xERR0R/blocky - https://github.com/Mozart409/blocky-frontend -version: 5.0.15 +version: 5.0.16 annotations: truecharts.org/catagories: | - network diff --git a/charts/enterprise/blocky/questions.yaml b/charts/enterprise/blocky/questions.yaml index ab3b95cfd7b..c1bd5301ab4 100644 --- a/charts/enterprise/blocky/questions.yaml +++ b/charts/enterprise/blocky/questions.yaml @@ -439,12 +439,22 @@ questions: schema: type: string default: 2s - - variable: failStartOnListError - label: Fail Start on List Error - description: Fail to start if at least one list can't be downloaded or opened + - variable: startStrategy + label: Start Strategy + description: | + blocking: all blocking lists will be loaded before DNS resolution starts.
+ failOnError: like blocking but blocky will shut down if any download fails.
+ fast: DNS resolution starts immediately without blocking which will be enabled after list load is completed schema: - type: boolean - default: false + type: string + default: blocking + enum: + - value: blocking + description: Blocking + - value: failOnError + description: Fail On Error + - value: fast + description: Fast - variable: processingConcurrency label: Processing Concurrency description: Sets how many list-groups can be processed at the same time diff --git a/charts/enterprise/blocky/templates/_blockyConfig.tpl b/charts/enterprise/blocky/templates/_blockyConfig.tpl index a15e0bcff12..e14df2dc83d 100644 --- a/charts/enterprise/blocky/templates/_blockyConfig.tpl +++ b/charts/enterprise/blocky/templates/_blockyConfig.tpl @@ -113,9 +113,11 @@ bootstrapDns: {{- with .upstream }} - upstream: {{ . }} {{- end }} - {{- range $id, $value := .ips }} + {{- if .ips }} ips: + {{- range $id, $value := .ips }} - {{ $value }} + {{- end }} {{- end }} {{- end }} {{- end }} @@ -204,7 +206,7 @@ blocking: downloadTimeout: {{ .Values.blocking.downloadTimeout }} downloadAttempts: {{ .Values.blocking.downloadAttempts }} downloadCooldown: {{ .Values.blocking.downloadCooldown }} - failStartOnListError: {{ .Values.blocking.failStartOnListError }} + startStrategy: {{ .Values.blocking.startStrategy }} processingConcurrency: {{ .Values.blocking.processingConcurrency }} {{- if .Values.blocking.whitelist }} whiteLists: diff --git a/charts/enterprise/blocky/values.yaml b/charts/enterprise/blocky/values.yaml index 10ceafc7e8a..a93250be43f 100644 --- a/charts/enterprise/blocky/values.yaml +++ b/charts/enterprise/blocky/values.yaml @@ -207,8 +207,8 @@ blocking: downloadAttempts: 3 # -- Sets the block download cooldown downloadCooldown: 2s - # -- Set to fail start of lists cannot be downloaded - failStartOnListError: false + # -- Set the start strategy (blocking | failOnError | fast) + startStrategy: blocking # -- Sets how many list-groups can be processed at the same time processingConcurrency: 4 # -- Add blocky whitelists