Skip to content

Commit

Permalink
feat(gluetun): add inputPorts & handle common usecase (#774)
Browse files Browse the repository at this point in the history
**Description**
This implement idea by @stavros-k in #771 and also add logic to detect
when user has enable qbitportforward, and automatically add gluetun
control port to inputPorts as well. Thank you stavros for help!

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [X] ⚙️ 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?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [X] #️⃣ 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._

---------

Co-authored-by: Stavros Kois <[email protected]>
Co-authored-by: Kjeld Schouten <[email protected]>
  • Loading branch information
3 people authored Apr 7, 2024
1 parent f9d6d92 commit cf24683
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ maintainers:
name: common
sources: null
type: library
version: 20.3.1
version: 20.3.2
annotations:
artifacthub.io/category: "integration-delivery"
artifacthub.io/license: "BUSL-1.1"
Expand Down
4 changes: 3 additions & 1 deletion library/common/templates/addons/vpn/_gluetunContainer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ env:
{{- end }}
FIREWALL: "on"
FIREWALL_OUTBOUND_SUBNETS: {{ $excludednetworks | quote }}
FIREWALL_INPUT_PORTS: {{ $.Values.service.main.ports.main.port }}
{{- $inputPorts := (list $.Values.service.main.ports.main.port) -}}
{{- $inputPorts = concat $inputPorts $.Values.addons.vpn.inputPorts | mustUniq }}
FIREWALL_INPUT_PORTS: {{ join "," $inputPorts }}
{{- else }}
FIREWALL: "off"
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions library/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,9 @@ addons:
excludedNetworks_IPv4: []
excludedNetworks_IPv6: []

## For Gluetun to enable kubernetes network communication
inputPorts: []

# -- The common library supports adding a code-server add-on to access files. It can be configured under this key.
# @default -- See values.yaml
codeserver:
Expand Down

0 comments on commit cf24683

Please sign in to comment.