feat(common): BREAKING CHANGE refactor add-on system (#31167)

**Description**

This PR updates the add-on system to allow for more end-user flexibility
It basically moves add-on container configuration to values.yaml, to
expose all container options to end users.

Fixes: #27351
Fixes: #31876

**⚙️ 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?**
<!--
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:**

- [ ] ⚖️ 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
- [ ] 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: Kjeld Schouten <info@kjeldschouten.nl>
Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: kqmaverick <kqmaverick@gmail.com>
Co-authored-by: Stavros Kois <s.kois@outlook.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Kjeld Schouten
2025-03-02 16:14:39 +01:00
committed by GitHub
co-authored by kqmaverick Stavros Kois Stavros Kois
parent 78377b9443
commit b62e536593
36 changed files with 1336 additions and 1986 deletions
+250
View File
@@ -0,0 +1,250 @@
---
title: Addons
---
:::note
- Examples under each key are only to be used as a placement guide
- See the [Full Examples](/common/addons#full-examples) section for complete examples.
:::
## Appears in
- `.Values.addons`
:::tip
- Replace references to `$name` with the actual name you want to use.
:::
---
## `addons`
Addons to the workloads
| | |
| ---------- | -------- |
| Key | `addons` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `{}` |
Example
```yaml
addons: {}
```
---
### `addons.$addon`
COnfigure the addon
:::note
Available addons:
- CodeServer
- Netshoot
- GlueTun
- Tailscale
:::
| | |
| ---------- | --------------- |
| Key | `addons.$addon` |
| Type | `map` |
| Required | ✅ |
| Helm `tpl` | ❌ |
| Default | `{}` |
Example
```yaml
addons:
codeserver: {}
netshoot: {}
gluetun: {}
tailscale: {}
```
---
#### `addons.$addon.enabled`
Enables or Disables the Addon
| | |
| ---------- | ----------------------- |
| Key | `addons.$addon.enabled` |
| Type | `bool` |
| Required | ✅ |
| Helm `tpl` | ❌ |
| Default | `false` |
Example
```yaml
addons:
codeserver:
enabled: true
```
---
#### `addons.$addon.targetSelector`
Define the workloads to add the addon to
| | |
| ---------- | ------------------------------ |
| Key | `addons.$addon.targetSelector` |
| Type | `list` of `string` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | `["main"]` |
Example
```yaml
addons:
codeserver:
targetSelector:
- main
- other-workload
```
---
#### `addons.$addon.container`
Define additional options for the container
:::tip
See container options in the [container](/common/container) section.
:::
| | |
| ---------- | ----------------------------------------------- |
| Key | `addons.$addon.container` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | Depends on the addon (See common's values.yaml) |
Example
```yaml
addons:
codeserver:
container: {}
```
---
#### `addons.$addon.service`
Define additional options for the service
:::tip
See service options in the [service](/common/service) section.
:::
:::note
Only applies to:
- Codeserver
:::
| | |
| ---------- | ----------------------------------------------- |
| Key | `addons.$addon.service` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | Depends on the addon (See common's values.yaml) |
Example
```yaml
addons:
codeserver:
service: {}
```
---
#### `addons.$addon.ingress`
Define additional options for the ingress
:::tip
See ingress options in the [ingress](/common/ingress) section.
:::
:::note
Only applies to:
- Codeserver
:::
| | |
| ---------- | ----------------------------------------------- |
| Key | `addons.$addon.ingress` |
| Type | `map` |
| Required | ❌ |
| Helm `tpl` | ❌ |
| Default | Depends on the addon (See common's values.yaml) |
Example
```yaml
addons:
codeserver:
ingress: {}
```
---
## Full Examples
```yaml
addons:
codeserver:
enabled: true
container:
resources:
limits:
cpu: 3333m
memory: 3333Mi
service:
enabled: true
ports:
codeserver:
enabled: true
port: 12345
targetPort: 12345
ingress:
enabled: true
hosts:
- host: code.chart-example.local
paths:
- path: /
pathType: Prefix
```