fix(docs): Update guides for traefik & nginx (#33187)
**Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> **⚙️ 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 - [x] 📜 Documentation Changes **🧪 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 - [x] 📄 I have made changes to the documentation - [ ] 🧪 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):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **➕ 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: Alfred Göppel <43101280+alfi0812@users.noreply.github.com> Co-authored-by: Kjeld Schouten <info@kjeldschouten.nl>
This commit is contained in:
co-authored by
Kjeld Schouten
parent
16e3ff6d4c
commit
e4c6acec57
@@ -15,7 +15,7 @@ Please note the IP variables that need to be set to your specific configuration
|
||||
|
||||
#### Internal
|
||||
|
||||
```
|
||||
```yaml
|
||||
controller:
|
||||
replicaCount: 2
|
||||
service:
|
||||
@@ -66,7 +66,7 @@ Please note the IP variables that need to be set to your specific configuration
|
||||
|
||||
#### External
|
||||
|
||||
```
|
||||
```yaml
|
||||
|
||||
values:
|
||||
controller:
|
||||
@@ -124,33 +124,39 @@ You can set charts to use either of them by specifying either:
|
||||
or
|
||||
`ingressClassName: external`
|
||||
|
||||
|
||||
## Annotations Examples
|
||||
|
||||
Here we will showcase some annotations you can use to customise your NGINX ingress behavior
|
||||
|
||||
### Redirect to Https
|
||||
|
||||
```yaml
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
||||
```
|
||||
|
||||
### Auth
|
||||
|
||||
For Authelia, Authentik and more
|
||||
|
||||
```
|
||||
```yaml
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/auth-method: 'GET'
|
||||
nginx.ingress.kubernetes.io/auth-url: 'http://authelia.default.svc.cluster.local/api/authz/auth-request'
|
||||
nginx.ingress.kubernetes.io/auth-signin: 'https://auth.example.com?rm=$request_method'
|
||||
nginx.ingress.kubernetes.io/auth-url: 'http://authelia.authelia.svc.cluster.local:9091/api/verify'
|
||||
nginx.ingress.kubernetes.io/auth-signin: 'https://auth.${DOMAIN_1}?rm=$request_method'
|
||||
nginx.ingress.kubernetes.io/auth-response-headers: 'Remote-User,Remote-Name,Remote-Groups,Remote-Email'
|
||||
```
|
||||
|
||||
### IP Whitelist:
|
||||
### IP Whitelist
|
||||
|
||||
```
|
||||
```yaml
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/whitelist-source-range: 49.36.X.X/32
|
||||
```
|
||||
|
||||
### Themepark
|
||||
|
||||
```
|
||||
```yaml
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
proxy_set_header Accept-Encoding "";
|
||||
@@ -160,3 +166,11 @@ annotations:
|
||||
</head>';
|
||||
sub_filter_once on;
|
||||
```
|
||||
|
||||
### Redirect-Regex
|
||||
|
||||
```yaml
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
rewrite ^/$ /admin permanent;
|
||||
```
|
||||
|
||||
@@ -4,8 +4,60 @@ title: Traefik
|
||||
|
||||
## Setup
|
||||
|
||||
### Example setup
|
||||
For Traefik you will need to install the upstream traefik chart.
|
||||
Our advised solution for Traefik is to not differentiate between internal and external. Instead we advice using an IP-Whitelist or use tunneling to limit
|
||||
access for some domains to local.
|
||||
|
||||
### Example values
|
||||
|
||||
```yaml
|
||||
# https://artifacthub.io/packages/helm/traefik/traefik?modal=values
|
||||
deployment:
|
||||
enabled: true
|
||||
replicas: 2
|
||||
service:
|
||||
enabled: true
|
||||
type: LoadBalancer
|
||||
annotations:
|
||||
metallb.io/ip-allocated-from-pool: main
|
||||
metallb.io/loadBalancerIPs: ${TRAEFIK_IP}
|
||||
metallb.universe.tf/ip-allocated-from-pool: main
|
||||
spec:
|
||||
externalTrafficPolicy: Local
|
||||
logs:
|
||||
general:
|
||||
level: INFO
|
||||
access:
|
||||
enabled: true
|
||||
ingressClass:
|
||||
enabled: true
|
||||
isDefaultClass: true
|
||||
tlsOptions:
|
||||
default:
|
||||
minVersion: VersionTLS12
|
||||
maxVersion: VersionTLS13
|
||||
sniStrict: true
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
enabled: true
|
||||
allowCrossNamespace: true
|
||||
allowExternalNameServices: true
|
||||
tlsStore:
|
||||
default:
|
||||
defaultCertificate:
|
||||
secretName: "${SECRET_PUBLIC_DOMAIN/./-}-tls"
|
||||
ports:
|
||||
traefik:
|
||||
expose:
|
||||
default: true
|
||||
web:
|
||||
redirections:
|
||||
port: websecure
|
||||
websecure:
|
||||
tls:
|
||||
enabled: true
|
||||
options: "default"
|
||||
```
|
||||
|
||||
## Middleware Examples
|
||||
|
||||
@@ -14,14 +66,104 @@ For more information and all available options, please checkout common ingress d
|
||||
|
||||
### General
|
||||
|
||||
To setup a TrueCharts chart to create and use a middleware, do this:
|
||||
To setup a middleware you can specify it in the values of the chart you want to use it in:
|
||||
|
||||
TBD
|
||||
```yaml
|
||||
ingressMiddlewares:
|
||||
traefik:
|
||||
middleware-name:
|
||||
enabled: true
|
||||
data:
|
||||
address: some-address
|
||||
```
|
||||
|
||||
### Auth
|
||||
Additionally you have to add them to your ingress like this:
|
||||
|
||||
TBD
|
||||
```yaml
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
integrations:
|
||||
traefik:
|
||||
enabled: true
|
||||
entrypoints:
|
||||
- websecure
|
||||
middlewares:
|
||||
- name: traefik-regex
|
||||
namespace: traefik
|
||||
- name: auth
|
||||
namespace: traefik
|
||||
```
|
||||
|
||||
### Authelia Example
|
||||
|
||||
```yaml
|
||||
ingressMiddlewares:
|
||||
traefik:
|
||||
middleware-name:
|
||||
enabled: true
|
||||
type: forward-auth
|
||||
data:
|
||||
address: http://authelia.authelia.svc.cluster.local:9091/api/verify
|
||||
authResponseHeadersRegex: ''
|
||||
trustForwardHeader: true
|
||||
authResponseHeaders:
|
||||
- Remote-User
|
||||
- Remote-Groups
|
||||
- Remote-Name
|
||||
- Remote-Email
|
||||
authRequestHeaders: []
|
||||
tls:
|
||||
insecureSkipVerify: true
|
||||
```
|
||||
|
||||
### IP Whitelist
|
||||
|
||||
```yaml
|
||||
ingressMiddlewares:
|
||||
traefik:
|
||||
middleware-name:
|
||||
enabled: true
|
||||
type: ip-allow-list
|
||||
data:
|
||||
sourceRange:
|
||||
- 192.168.178.0/24
|
||||
ipStrategy:
|
||||
depth: 1
|
||||
excludedIPs:
|
||||
- some-excluded-ip
|
||||
```
|
||||
|
||||
### Themepart
|
||||
|
||||
TBD
|
||||
```yaml
|
||||
ingressMiddlewares:
|
||||
traefik:
|
||||
middleware-name:
|
||||
enabled: true
|
||||
type: plugin-theme-park
|
||||
data:
|
||||
pluginName: my-plugin-name
|
||||
app: sonarr
|
||||
theme: dark
|
||||
baseUrl: https://theme-park.dev
|
||||
addons:
|
||||
- some-addon
|
||||
- some-other-addon
|
||||
```
|
||||
|
||||
### Redirect Regex
|
||||
|
||||
```yaml
|
||||
ingressMiddlewares:
|
||||
traefik:
|
||||
middleware-name:
|
||||
enabled: true
|
||||
type: redirect-regex
|
||||
data:
|
||||
regex: some-regex
|
||||
replacement: some-replacement
|
||||
permanent: true
|
||||
```
|
||||
|
||||
More Examples can be found in the common docs [here](/common/middlewares/traefik/).
|
||||
|
||||
Reference in New Issue
Block a user