move traefik to archive
@@ -0,0 +1,32 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
# OWNERS file for Kubernetes
|
||||
OWNERS
|
||||
# helm-docs templates
|
||||
*.gotmpl
|
||||
# docs folder
|
||||
/docs
|
||||
# icon
|
||||
icon.png
|
||||
icon.webp
|
||||
icon-small.webp
|
||||
@@ -0,0 +1,38 @@
|
||||
annotations:
|
||||
max_scale_version: 24.04.1
|
||||
min_scale_version: 24.04.0
|
||||
truecharts.org/category: network
|
||||
truecharts.org/max_helm_version: "3.15"
|
||||
truecharts.org/min_helm_version: "3.11"
|
||||
truecharts.org/train: premium
|
||||
apiVersion: v2
|
||||
appVersion: 3.3.3
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 25.3.1
|
||||
repository: oci://tccr.io/truecharts
|
||||
condition: ""
|
||||
alias: ""
|
||||
tags: []
|
||||
import-values: []
|
||||
deprecated: true
|
||||
description: Traefik is a flexible reverse proxy and Ingress Provider.
|
||||
home: https://truecharts.org/charts/premium/traefik
|
||||
icon: https://truecharts.org/img/hotlink-ok/chart-icons/traefik.webp
|
||||
keywords:
|
||||
- traefik
|
||||
- ingress
|
||||
kubeVersion: '>=1.24.0-0'
|
||||
maintainers:
|
||||
- name: TrueCharts
|
||||
email: info@truecharts.org
|
||||
url: https://truecharts.org
|
||||
name: traefik
|
||||
sources:
|
||||
- https://github.com/traefik/traefik
|
||||
- https://github.com/traefik/traefik-helm-chart
|
||||
- https://github.com/truecharts/charts/tree/master/charts/premium/traefik
|
||||
- https://github.com/truecharts/containers/tree/master/apps/traefik
|
||||
- https://traefik.io/
|
||||
type: application
|
||||
version: 30.4.4
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: README
|
||||
---
|
||||
|
||||
## General Info
|
||||
|
||||
For more information about this Chart, please check the docs on the TrueCharts [website](https://truecharts.org/charts/premium/traefik)
|
||||
|
||||
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
|
||||
|
||||
## Installation
|
||||
|
||||
### Helm-Chart installation
|
||||
|
||||
To install TrueCharts Helm charts using Helm, you can use our OCI Repository.
|
||||
|
||||
`helm install mychart oci://tccr.io/truecharts/traefik`
|
||||
|
||||
For more information on how to install TrueCharts Helm charts, checkout the [instructions on the website](/guides)
|
||||
|
||||
## Chart Specific Guides and information
|
||||
|
||||
All our charts have dedicated documentation pages.
|
||||
The documentation for this chart can be found here:
|
||||
https://truecharts.org/charts/premium/traefik
|
||||
|
||||
## Configuration Options
|
||||
|
||||
To view the chart specific options, please view Values.yaml included in the chart.
|
||||
The most recent version of which, is available here: https://github.com/truecharts/public/blob/master/charts/premium/traefik/values.yaml
|
||||
|
||||
All our Charts use a shared "common" library chart that contains most of the templating and options.
|
||||
For the complete overview of all available options, please checkout the documentation for them on the [common docs on our website](/common)
|
||||
|
||||
For information about the common chart and all defaults included with it, please review its values.yaml file available here: https://github.com/truecharts/public/blob/master/charts/library/common/values.yaml
|
||||
|
||||
## Support
|
||||
|
||||
- See the [Website](https://truecharts.org)
|
||||
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
|
||||
- Open a [issue](https://github.com/truecharts/charts/issues/new/choose)
|
||||
|
||||
---
|
||||
|
||||
## Sponsor TrueCharts
|
||||
|
||||
TrueCharts can only exist due to the incredible effort of our staff.
|
||||
Please consider making a [donation](/general/sponsor) or contributing back to the project any way you can!
|
||||
|
||||
_All Rights Reserved - The TrueCharts Project_
|
||||
@@ -0,0 +1,9 @@
|
||||
# -- Options for the main traefik service, where the entrypoints traffic comes from
|
||||
# from.
|
||||
service:
|
||||
tcp:
|
||||
ports:
|
||||
web:
|
||||
port: 9080
|
||||
websecure:
|
||||
port: 9443
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Authelia + LLDAP + Traefik ForwardAuth Setup guide
|
||||
---
|
||||
|
||||
Please refer to the full [Authelia + LLDAP + Traefik ForwardAuth Setup guide](/charts/premium/authelia/setup-guide) for a quick guide should take you through the steps necessary to setup `Authelia` as your `forwardAuth` for `Traefik`.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Adding or Removing Headers
|
||||
---
|
||||
|
||||
The `customRequestHeaders` and `customResponseHeaders` middlewares will allow you to add or remove headers from the request or response.
|
||||
|
||||
## `customRequestHeaders`
|
||||
|
||||
You can specify a list of headers to add to requests. When removing a header, you only need to specify the header name (an empty value removes the header with that name from requests, if it exists).
|
||||
|
||||
## `customResponseHeaders`
|
||||
|
||||
You can specify a list of headers to add to responses. When removing a header, you only need to specify the header name (an empty value removes the header with that name from responses, if it exists).
|
||||
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 39 KiB |
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Redirect Regex
|
||||
---
|
||||
|
||||
The Redirect Regex middleware redirects a request using regex matching and replacement.
|
||||
|
||||
## Creating the middleware on traefik
|
||||
|
||||
Edit your traefik `values.yaml`.
|
||||
|
||||
```yaml
|
||||
// values.yaml
|
||||
middlewares:
|
||||
redirectRegex:
|
||||
- name: guacamole-redirect
|
||||
regex: ^https://remote\.domain\.com/?$
|
||||
replacement: https://remote.domain.com/guacamole
|
||||
permanent: true
|
||||
```
|
||||
|
||||
This will capture `https://remote.domain.com` or `https://remote.domain.com/`
|
||||
and redirect it to `https://remote.domain.com/guacamole`
|
||||
|
||||
## Applying the regex redirect middleware to the app
|
||||
|
||||
Edit your app `values.yaml`.
|
||||
|
||||
```yaml
|
||||
// values.yaml
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
integrations:
|
||||
traefik:
|
||||
enabled: true
|
||||
middlewares:
|
||||
- name: guacamole-redirect
|
||||
namespace: traefik
|
||||
certManager:
|
||||
enabled: true
|
||||
certificateIssuer: domain-0-le-prod
|
||||
hosts:
|
||||
- host: remote.domain.com
|
||||
```
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Theme Park
|
||||
---
|
||||
|
||||
Theme park is a middleware to inject [supported stylesheets (css)](https://docs.theme-park.dev/theme-options)
|
||||
into [supported apps](https://docs.theme-park.dev/themes).
|
||||
|
||||
So let's see how to do that.
|
||||
|
||||
Note that this will only work on apps you have enabled traefik intergration, and only when accessing them via the URL.
|
||||
Will NOT work if you access them via `IP:PORT`.
|
||||
|
||||
## Creating the middleware on traefik
|
||||
|
||||
Edit your traefik `values.yaml`.
|
||||
|
||||
```yaml
|
||||
// values.yaml
|
||||
middlewares:
|
||||
themePark:
|
||||
- name: guactheme
|
||||
app: guacamole
|
||||
theme: plex
|
||||
baseUrl: https://theme-park.dev
|
||||
```
|
||||
|
||||
> Keep in mind that if you decide to use a self hosted theme provider, it will need to have enabled ingress.
|
||||
> Also use the external URL, not the internal, as the client will need to access that theme provider to fetch the
|
||||
> stylesheets.
|
||||
|
||||
## Applying the theme to the app
|
||||
|
||||
Edit your app `values.yaml`.
|
||||
|
||||
```yaml
|
||||
// values.yaml
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
integrations:
|
||||
traefik:
|
||||
enabled: true
|
||||
middlewares:
|
||||
- name: guactheme
|
||||
namespace: traefik
|
||||
certManager:
|
||||
enabled: true
|
||||
certificateIssuer: domain-0-le-prod
|
||||
hosts:
|
||||
- host: remote.domain.com
|
||||
```
|
||||
|
||||
| Before | After |
|
||||
| :-----------------------------------------------------: | :---------------------------------------------------: |
|
||||
|  |  |
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Add Traefik Basic Auth to Apps
|
||||
---
|
||||
|
||||
Our `traefik` chart has the ability to add various `middlewares` to the chart that can add extra functionality to your setup. In this guide we'll go over setting up the `Basic Auth` traefik middleware.
|
||||
|
||||
## Installation
|
||||
|
||||
Edit your traefik `values.yaml`.
|
||||
|
||||
```yaml
|
||||
// values.yaml
|
||||
middlewares:
|
||||
basicAuth:
|
||||
- name: basic
|
||||
users:
|
||||
- username: someuser
|
||||
password: somepassword
|
||||
- username: seconduser
|
||||
password: secondpassword
|
||||
```
|
||||
|
||||
- Add as name users as necessary, choosing a specific `Username` and `Password` for each user.
|
||||
|
||||
## Adding it to Apps using Ingress
|
||||
|
||||
Edit your app `values.yaml`.
|
||||
|
||||
```yaml
|
||||
// values.yaml
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
integrations:
|
||||
traefik:
|
||||
enabled: true
|
||||
middlewares:
|
||||
- name: basic
|
||||
namespace: traefik
|
||||
certManager:
|
||||
enabled: true
|
||||
certificateIssuer: domain-0-le-prod
|
||||
hosts:
|
||||
- host: app.domain.tld
|
||||
```
|
||||
|
||||
## Verify Authentication
|
||||
|
||||
Once the `basicAuth` is setup, please visit the `URL` that you configured the `Ingress` for. If everything is setup correctly you should see the Pop-Up below.
|
||||
|
||||

|
||||
|
||||
## Support
|
||||
|
||||
- If you need more help you can also reach us using [Discord](https://discord.gg/tVsPTHWTtr) for real-time feedback and support.
|
||||
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1 @@
|
||||
{{- include "tc.v1.common.lib.chart.notes" $ -}}
|
||||
@@ -0,0 +1,203 @@
|
||||
{{/* Define the args */}}
|
||||
{{- define "traefik.args" -}}
|
||||
args:
|
||||
{{/* merge all ports */}}
|
||||
{{- $ports := dict }}
|
||||
{{- range $.Values.service }}
|
||||
{{- range $name, $value := .ports }}
|
||||
{{- $_ := set $ports $name $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{/* start of actual arguments */}}
|
||||
{{- with .Values.globalArguments }}
|
||||
{{- range . }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range $name, $config := $ports }}
|
||||
{{- if $config }}
|
||||
{{- if or ( eq $config.protocol "http" ) ( eq $config.protocol "https" ) ( eq $config.protocol "tcp" ) }}
|
||||
{{- $_ := set $config "protocol" "tcp" }}
|
||||
{{- end }}
|
||||
- "--entryPoints.{{$name}}.address=:{{ $config.port }}/{{ default "tcp" $config.protocol | lower }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- "--api.dashboard=true"
|
||||
- "--ping=true"
|
||||
{{- if .Values.traefikMetrics }}
|
||||
{{- if .Values.traefikMetrics.datadog }}
|
||||
- "--metrics.datadog=true"
|
||||
- "--metrics.datadog.address={{ .Values.traefikMetrics.datadog.address }}"
|
||||
{{- end }}
|
||||
{{- if .Values.traefikMetrics.influxdb }}
|
||||
- "--metrics.influxdb=true"
|
||||
- "--metrics.influxdb.address={{ .Values.traefikMetrics.influxdb.address }}"
|
||||
- "--metrics.influxdb.protocol={{ .Values.traefikMetrics.influxdb.protocol }}"
|
||||
{{- end }}
|
||||
{{- if .Values.traefikMetrics.statsd }}
|
||||
- "--metrics.statsd=true"
|
||||
- "--metrics.statsd.address={{ .Values.traefikMetrics.statsd.address }}"
|
||||
{{- if or .Values.traefikMetrics.prometheus }}
|
||||
- "--metrics.prometheus=true"
|
||||
- "--metrics.prometheus.entrypoint=metrics"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.metrics.main.enabled }}
|
||||
- "--metrics.prometheus=true"
|
||||
- "--metrics.prometheus.entrypoint=metrics"
|
||||
{{- end }}
|
||||
{{- if .Values.providers.kubernetesCRD.enabled }}
|
||||
- "--providers.kubernetescrd"
|
||||
{{- end }}
|
||||
{{- if .Values.providers.kubernetesIngress.enabled }}
|
||||
- "--providers.kubernetesingress"
|
||||
{{- if .Values.providers.kubernetesIngress.publishedService.enabled }}
|
||||
- "--providers.kubernetesingress.ingressendpoint.publishedservice={{ template "providers.kubernetesIngress.publishedServicePath" . }}"
|
||||
{{- end }}
|
||||
{{- if .Values.providers.kubernetesIngress.labelSelector }}
|
||||
- "--providers.kubernetesingress.labelSelector={{ .Values.providers.kubernetesIngress.labelSelector }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.rbac.enabled .Values.rbac.namespaced }}
|
||||
{{- if .Values.providers.kubernetesCRD.enabled }}
|
||||
- "--providers.kubernetescrd.namespaces={{ template "providers.kubernetesCRD.namespaces" . }}"
|
||||
{{- end }}
|
||||
{{- if .Values.providers.kubernetesIngress.enabled }}
|
||||
- "--providers.kubernetesingress.namespaces={{ template "providers.kubernetesIngress.namespaces" . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $.Values.ingressClass.enabled }}
|
||||
- "--providers.kubernetesingress.ingressclass={{ .Release.Name }}"
|
||||
{{- end }}
|
||||
{{- range $entrypoint, $config := $ports }}
|
||||
{{- if and $config.transport $config.transport.respondingTimeouts }}
|
||||
- "--entryPoints.{{ $entrypoint }}.transport.respondingTimeouts.readTimeout={{ $config.transport.respondingTimeouts.readTimeout| default 0 }}"
|
||||
{{- else }}
|
||||
- "--entryPoints.{{ $entrypoint }}.transport.respondingTimeouts.readTimeout=0"
|
||||
{{- end }}
|
||||
{{/* add args for proxyProtocol support */}}
|
||||
{{- if $config.proxyProtocol }}
|
||||
{{- if $config.proxyProtocol.enabled }}
|
||||
{{- if $config.proxyProtocol.insecureMode }}
|
||||
- "--entrypoints.{{ $entrypoint }}.proxyProtocol.insecure"
|
||||
{{- end }}
|
||||
{{- if not ( empty $config.proxyProtocol.trustedIPs ) }}
|
||||
- "--entrypoints.{{ $entrypoint }}.proxyProtocol.trustedIPs={{ join "," $config.proxyProtocol.trustedIPs }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{/* add args for forwardedHeaders support */}}
|
||||
{{- if $config.forwardedHeaders.enabled }}
|
||||
{{- if not ( empty $config.forwardedHeaders.trustedIPs ) }}
|
||||
- "--entrypoints.{{ $entrypoint }}.forwardedHeaders.trustedIPs={{ join "," $config.forwardedHeaders.trustedIPs }}"
|
||||
{{- end }}
|
||||
{{- if $config.forwardedHeaders.insecureMode }}
|
||||
- "--entrypoints.{{ $entrypoint }}.forwardedHeaders.insecure"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{/* end forwardedHeaders configuration */}}
|
||||
{{- if $config.redirectTo }}
|
||||
{{- $toPort := index $ports $config.redirectTo }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.to=:{{ $toPort.port }}"
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.scheme=https"
|
||||
{{- else if $config.redirectPort }}
|
||||
{{ if gt $config.redirectPort 0.0 }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.to=:{{ $config.redirectPort }}"
|
||||
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.scheme=https"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or ( $config.tls ) ( eq $config.protocol "https" ) }}
|
||||
{{- if or ( $config.tls.enabled ) ( eq $config.protocol "https" ) }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.tls=true"
|
||||
{{- if $config.tls.options }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.tls.options={{ $config.tls.options }}"
|
||||
{{- end }}
|
||||
{{- if $config.tls.certResolver }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.tls.certResolver={{ $config.tls.certResolver }}"
|
||||
{{- end }}
|
||||
{{- if $config.tls.domains }}
|
||||
{{- range $index, $domain := $config.tls.domains }}
|
||||
{{- if $domain.main }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.tls.domains[{{ $index }}].main={{ $domain.main }}"
|
||||
{{- end }}
|
||||
{{- if $domain.sans }}
|
||||
- "--entrypoints.{{ $entrypoint }}.http.tls.domains[{{ $index }}].sans={{ join "," $domain.sans }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.logs }}
|
||||
- "--log.format={{ .general.format }}"
|
||||
{{- if ne .general.level "ERROR" }}
|
||||
- "--log.level={{ .general.level | upper }}"
|
||||
{{- end }}
|
||||
{{- if .access.enabled }}
|
||||
- "--accesslog=true"
|
||||
- "--accesslog.format={{ .access.format }}"
|
||||
{{- if .access.bufferingsize }}
|
||||
- "--accesslog.bufferingsize={{ .access.bufferingsize }}"
|
||||
{{- end }}
|
||||
{{- if .access.filters }}
|
||||
{{- if .access.filters.statuscodes }}
|
||||
- "--accesslog.filters.statuscodes={{ .access.filters.statuscodes }}"
|
||||
{{- end }}
|
||||
{{- if .access.filters.retryattempts }}
|
||||
- "--accesslog.filters.retryattempts"
|
||||
{{- end }}
|
||||
{{- if .access.filters.minduration }}
|
||||
- "--accesslog.filters.minduration={{ .access.filters.minduration }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- "--accesslog.fields.defaultmode={{ .access.fields.general.defaultmode }}"
|
||||
{{- range $fieldname, $fieldaction := .access.fields.general.names }}
|
||||
- "--accesslog.fields.names.{{ $fieldname }}={{ $fieldaction }}"
|
||||
{{- end }}
|
||||
- "--accesslog.fields.headers.defaultmode={{ .access.fields.headers.defaultmode }}"
|
||||
{{- range $fieldname, $fieldaction := .access.fields.headers.names }}
|
||||
- "--accesslog.fields.headers.names.{{ $fieldname }}={{ $fieldaction }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{/*
|
||||
For new plugins, add them on the container also
|
||||
https://github.com/truecharts/containers/blob/master/mirror/traefik/Dockerfile
|
||||
moduleName must match on the container and here
|
||||
*/}}
|
||||
{{- if .Values.middlewares.themePark }}
|
||||
{{/* theme.park */}}
|
||||
- "--experimental.localPlugins.traefik-themepark.modulename=github.com/packruler/traefik-themepark"
|
||||
{{- end }}
|
||||
{{/* End of theme.park */}}
|
||||
{{/* GeoBlock */}}
|
||||
{{- if .Values.middlewares.geoBlock }}
|
||||
- "--experimental.localPlugins.GeoBlock.modulename=github.com/PascalMinder/geoblock"
|
||||
{{- end }}
|
||||
{{/* End of GeoBlock */}}
|
||||
{{/* RealIP */}}
|
||||
{{- if .Values.middlewares.realIP }}
|
||||
- "--experimental.localPlugins.traefik-real-ip.modulename=github.com/jramsgz/traefik-real-ip"
|
||||
{{- end }}
|
||||
{{/* End of RealIP */}}
|
||||
{{/* ModSecurity */}}
|
||||
{{- if .Values.middlewares.modsecurity }}
|
||||
- "--experimental.localPlugins.traefik-modsecurity-plugin.modulename=github.com/acouvreur/traefik-modsecurity-plugin"
|
||||
{{- end }}
|
||||
{{/* CrowdsecBouncer */}}
|
||||
{{- if .Values.middlewares.bouncer }}
|
||||
- "--experimental.localPlugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
||||
{{- end }}
|
||||
{{/* End of ModSecurity */}}
|
||||
{{/* RewriteResponseHeaders */}}
|
||||
{{- if .Values.middlewares.rewriteResponseHeaders }}
|
||||
- "--experimental.localPlugins.rewriteResponseHeaders.modulename=github.com/XciD/traefik-plugin-rewrite-headers"
|
||||
{{- end }}
|
||||
{{/* End of RewriteResponseHeaders */}}
|
||||
{{- with .Values.additionalArguments }}
|
||||
{{- range . }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{/*
|
||||
Construct the path for the providers.kubernetesingress.ingressendpoint.publishedservice.
|
||||
By convention this will simply use the <namespace>/<service-name> to match the name of the
|
||||
service generated.
|
||||
Users can provide an override for an explicit service they want bound via `.Values.providers.kubernetesIngress.publishedService.pathOverride`
|
||||
*/}}
|
||||
{{- define "providers.kubernetesIngress.publishedServicePath" -}}
|
||||
{{- $fullName := include "tc.v1.common.lib.chart.names.fullname" . -}}
|
||||
{{- $defServiceName := printf "%s/%s-tcp" .Release.Namespace $fullName -}}
|
||||
{{- $servicePath := default $defServiceName .Values.providers.kubernetesIngress.publishedService.pathOverride }}
|
||||
{{- print $servicePath | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Construct a comma-separated list of whitelisted namespaces
|
||||
*/}}
|
||||
{{- define "providers.kubernetesIngress.namespaces" -}}
|
||||
{{- default .Release.Namespace (join "," .Values.providers.kubernetesIngress.namespaces) }}
|
||||
{{- end -}}
|
||||
{{- define "providers.kubernetesCRD.namespaces" -}}
|
||||
{{- default .Release.Namespace (join "," .Values.providers.kubernetesCRD.namespaces) }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{/* Define the ingressClass */}}
|
||||
{{- define "traefik.ingressClass" -}}
|
||||
---
|
||||
{{ if $.Values.ingressClass.enabled }}
|
||||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/IngressClass" }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/IngressClass" }}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else if or (eq .Values.ingressClass.fallbackApiVersion "v1beta1") (eq .Values.ingressClass.fallbackApiVersion "v1") }}
|
||||
apiVersion: {{ printf "networking.k8s.io/%s" .Values.ingressClass.fallbackApiVersion }}
|
||||
{{- else }}
|
||||
{{- fail "\n\n ERROR: You must have at least networking.k8s.io/v1beta1 to use ingressClass" }}
|
||||
{{- end }}
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
annotations:
|
||||
ingressclass.kubernetes.io/is-default-class: {{ .Values.ingressClass.isDefaultClass | quote }}
|
||||
labels:
|
||||
{{- include "tc.v1.common.lib.metadata.allLabels" . | nindent 4 }}
|
||||
name: {{ .Release.Name }}
|
||||
spec:
|
||||
controller: traefik.io/ingress-controller
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{/* Define the ingressRoute */}}
|
||||
{{- define "traefik.ingressRoute" -}}
|
||||
{{ if .Values.ingressRoute.dashboard.enabled }}
|
||||
|
||||
{{- $ingressRouteLabels := .Values.ingressRoute.dashboard.labels }}
|
||||
{{- $ingressRouteAnnotations := .Values.ingressRoute.dashboard.annotations }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: {{ include "tc.v1.common.lib.chart.names.fullname" . }}-dashboard
|
||||
{{- $labels := (mustMerge ($ingressRouteLabels | default dict) (include "tc.v1.common.lib.metadata.allLabels" $ | fromYaml)) -}}
|
||||
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $ "labels" $labels) | trim) }}
|
||||
labels:
|
||||
{{- . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $annotations := (mustMerge ($ingressRouteAnnotations | default dict) (include "tc.v1.common.lib.metadata.allAnnotations" $ | fromYaml)) -}}
|
||||
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $ "annotations" $annotations) | trim) }}
|
||||
annotations:
|
||||
{{- . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- main
|
||||
routes:
|
||||
- match: PathPrefix(`/dashboard`) || PathPrefix(`/api`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: api@internal
|
||||
kind: TraefikService
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{/* Define the portalHook */}}
|
||||
{{- define "traefik.portalhook" -}}
|
||||
{{- if .Values.portalhook.enabled -}}
|
||||
{{- $name := "portalhook" -}}
|
||||
{{- if $.Values.ingressClass.enabled -}}
|
||||
{{- $name = printf "portalhook-%v" .Release.Name -}}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ $name }}
|
||||
data:
|
||||
{{- $ports := dict }}
|
||||
{{- range $.Values.service }}
|
||||
{{- range $name, $value := .ports }}
|
||||
{{- $_ := set $ports $name $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- range $name, $value := $ports }}
|
||||
{{ $name }}: {{ $value.port | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{/* Define the tlsOptions */}}
|
||||
{{- define "traefik.tlsOptions" -}}
|
||||
{{- range $name, $config := .Values.tlsOptions }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: TLSOption
|
||||
metadata:
|
||||
name: {{ $name }}
|
||||
spec:
|
||||
{{- toYaml $config | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{/* Define the tlsOptions */}}
|
||||
{{- define "traefik.tlsstore" -}}
|
||||
{{- if .Values.defaultCertificate }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: TLSStore
|
||||
metadata:
|
||||
name: default
|
||||
spec:
|
||||
certificates:
|
||||
- secretName: certificate-issuer-{{ tpl .Values.defaultCertificate $ }}
|
||||
defaultCertificate:
|
||||
secretName: certificate-issuer-{{ tpl .Values.defaultCertificate $ }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $name, $config := .Values.tlsStore }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: TLSStore
|
||||
metadata:
|
||||
name: {{ $name }}
|
||||
spec:
|
||||
{{- toYaml $config | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "tc.v1.common.loader.init" . }}
|
||||
|
||||
{{- $newArgs := (include "traefik.args" . | fromYaml) }}
|
||||
{{- $_ := set .Values "newArgs" $newArgs -}}
|
||||
{{- $mergedargs := concat $.Values.workload.main.podSpec.containers.main.args .Values.newArgs.args }}
|
||||
{{- $_ := set $.Values.workload.main.podSpec.containers.main "args" $mergedargs -}}
|
||||
|
||||
{{- include "traefik.portalhook" . }}
|
||||
{{- include "traefik.tlsstore" . }}
|
||||
{{- include "traefik.tlsOptions" . }}
|
||||
{{- include "traefik.ingressRoute" . }}
|
||||
{{- include "traefik.ingressClass" . }}
|
||||
|
||||
{{- with .Values.ingress -}}
|
||||
{{- with .main -}}
|
||||
{{- if .enabled -}}
|
||||
{{- $_ := set $.Values.portal.open.override "protocol" "https" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "tc.v1.common.loader.apply" . }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.addPrefix }}
|
||||
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
addPrefix:
|
||||
prefix: {{ $middlewareData.prefix }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-compress" $.Release.Name) "compress" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
compress: {}
|
||||
---
|
||||
# Here, an average of 300 requests per second is allowed.
|
||||
# In addition, a burst of 200 requests is allowed.
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-basic-ratelimit" $.Release.Name) "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
rateLimit:
|
||||
average: 600
|
||||
burst: 400
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-basic-secure-headers" $.Release.Name) "basic-secure-headers" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
headers:
|
||||
accessControlAllowMethods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
- HEAD
|
||||
- PUT
|
||||
accessControlMaxAge: 100
|
||||
stsSeconds: 63072000
|
||||
# stsIncludeSubdomains: false
|
||||
# stsPreload: false
|
||||
forceSTSHeader: true
|
||||
contentTypeNosniff: true
|
||||
browserXssFilter: true
|
||||
referrerPolicy: same-origin
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: "https"
|
||||
customResponseHeaders:
|
||||
server: ''
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-chain-basic" $.Release.Name) "chain-basic" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ ternary (printf "%v-basic-ratelimit" $.Release.Name) "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-basic-secure-headers" $.Release.Name) "basic-secure-headers" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-compress" $.Release.Name) "compress" $.Values.ingressClass.enabled }}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.basicAuth -}}
|
||||
|
||||
{{- $users := list -}}
|
||||
{{- range $index, $userdata := $middlewareData.users -}}
|
||||
{{- $users = append $users (htpasswd $userdata.username $userdata.password) -}}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%v-%v" $middlewareData.name "secret" }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
users: |
|
||||
{{- range $index, $user := $users }}
|
||||
{{ printf "%s" $user }}
|
||||
{{- end }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
basicAuth:
|
||||
secret: {{ printf "%v-%v" $middlewareData.name "secret" }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,112 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.bouncer }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
bouncer:
|
||||
{{- with $middlewareData.enabled }}
|
||||
enabled: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.logLevel }}
|
||||
logLevel: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.updateIntervalSeconds }}
|
||||
updateIntervalSeconds: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.defaultDecisionSeconds }}
|
||||
defaultDecisionSeconds: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.httpTimeoutSeconds }}
|
||||
httpTimeoutSeconds: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecMode }}
|
||||
crowdsecMode: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecAppsecEnabled }}
|
||||
crowdsecAppsecEnabled: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecAppsecHost }}
|
||||
crowdsecAppsecHost: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecAppsecFailureBlock }}
|
||||
crowdsecAppsecFailureBlock: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiKey }}
|
||||
crowdsecLapiKey: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiKeyFile }}
|
||||
crowdsecLapiKeyFile: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiHost }}
|
||||
crowdsecLapiHost: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiScheme }}
|
||||
crowdsecLapiScheme: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSInsecureVerify }}
|
||||
crowdsecLapiTLSInsecureVerify: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecCapiMachineId }}
|
||||
crowdsecCapiMachineId: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecCapiPassword }}
|
||||
crowdsecCapiPassword: {{ . }}
|
||||
{{- end }}
|
||||
{{- if $middlewareData.crowdsecCapiScenarios }}
|
||||
crowdsecCapiScenarios:
|
||||
{{- range $middlewareData.crowdsecCapiScenarios }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $middlewareData.forwardedHeadersTrustedIPs }}
|
||||
forwardedHeadersTrustedIPs:
|
||||
{{- range $middlewareData.forwardedHeadersTrustedIPs }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $middlewareData.clientTrustedIPs }}
|
||||
clientTrustedIPs:
|
||||
{{- range $middlewareData.clientTrustedIPs }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.forwardedHeadersCustomName }}
|
||||
forwardedHeadersCustomName: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.redisCacheEnabled }}
|
||||
redisCacheEnabled: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.redisCacheHost }}
|
||||
redisCacheHost: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.redisCachePassword }}
|
||||
redisCachePassword: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.redisCacheDatabase }}
|
||||
redisCacheDatabase: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSCertificateAuthority }}
|
||||
crowdsecLapiTLSCertificateAuthority: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSCertificateAuthorityFile }}
|
||||
crowdsecLapiTLSCertificateAuthorityFile: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSCertificateBouncer }}
|
||||
crowdsecLapiTLSCertificateBouncer: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSCertificateBouncerFile }}
|
||||
crowdsecLapiTLSCertificateBouncerFile: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSCertificateBouncerKey }}
|
||||
crowdsecLapiTLSCertificateBouncerKey: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $middlewareData.crowdsecLapiTLSCertificateBouncerKeyFile }}
|
||||
crowdsecLapiTLSCertificateBouncerKeyFile: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{- end }}
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.buffering }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
buffering: {{/* Only render if its not <nil> and has a value of 0 or greater */}}
|
||||
{{- if and (not (kindIs "invalid" $middlewareData.maxRequestBodyBytes)) (ge ($middlewareData.maxRequestBodyBytes | int) 0) }}
|
||||
maxRequestBodyBytes: {{ $middlewareData.maxRequestBodyBytes }}
|
||||
{{- end -}}
|
||||
{{- if and (not (kindIs "invalid" $middlewareData.memRequestBodyBytes)) (ge ($middlewareData.memRequestBodyBytes | int) 0) }}
|
||||
memRequestBodyBytes: {{ $middlewareData.memRequestBodyBytes }}
|
||||
{{- end -}}
|
||||
{{- if and (not (kindIs "invalid" $middlewareData.maxResponseBodyBytes)) (ge ($middlewareData.maxResponseBodyBytes | int) 0) }}
|
||||
maxResponseBodyBytes: {{ $middlewareData.maxResponseBodyBytes }}
|
||||
{{- end -}}
|
||||
{{- if and (not (kindIs "invalid" $middlewareData.memResponseBodyBytes)) (ge ($middlewareData.memResponseBodyBytes | int) 0) }}
|
||||
memResponseBodyBytes: {{ $middlewareData.memResponseBodyBytes }}
|
||||
{{- end -}}
|
||||
{{- if $middlewareData.retryExpression }}
|
||||
retryExpression: {{ $middlewareData.retryExpression | quote }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- $values := .Values -}}
|
||||
{{- $namespace := $.Release.Namespace -}}
|
||||
{{- if $.Values.ingressClass.enabled -}}
|
||||
{{- $namespace := (printf "%v-%v" $namespace .Release.Name) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range $index, $middlewareData := .Values.middlewares.chain }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
{{- range $index, $middleware := .middlewares }}
|
||||
- name: {{ printf "%v-%v@%v" $namespace $middleware "kubernetescrd" }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.customFrameOptionsValue }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
headers:
|
||||
customFrameOptionsValue: {{ $middlewareData.value }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.customRequestHeaders }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
headers:
|
||||
customRequestHeaders:
|
||||
{{- range $index, $customRequestHeader := $middlewareData.headers }}
|
||||
{{ $customRequestHeader.name }}: {{ $customRequestHeader.value | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.customResponseHeaders }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
headers:
|
||||
customResponseHeaders:
|
||||
{{- range $index, $customResponseHeader := $middlewareData.headers }}
|
||||
{{ $customResponseHeader.name }}: {{ $customResponseHeader.value | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.forwardAuth }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
forwardAuth:
|
||||
address: {{ $middlewareData.address }}
|
||||
{{- with $middlewareData.authResponseHeaders }}
|
||||
authResponseHeaders:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end -}}
|
||||
{{- with $middlewareData.authRequestHeaders }}
|
||||
authRequestHeaders:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end -}}
|
||||
{{- if $middlewareData.authResponseHeadersRegex }}
|
||||
authResponseHeadersRegex: {{ $middlewareData.authResponseHeadersRegex }}
|
||||
{{- end -}}
|
||||
{{- if $middlewareData.trustForwardHeader }}
|
||||
trustForwardHeader: true
|
||||
{{- end -}}
|
||||
{{- with $middlewareData.tls }}
|
||||
tls:
|
||||
insecureSkipVerify: {{ .insecureSkipVerify | default false }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.geoBlock }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
GeoBlock:
|
||||
allowLocalRequests: {{ $middlewareData.allowLocalRequests }}
|
||||
logLocalRequests: {{ $middlewareData.logLocalRequests }}
|
||||
logAllowedRequests: {{ $middlewareData.logAllowedRequests }}
|
||||
logApiRequests: {{ $middlewareData.logApiRequests }}
|
||||
api: {{ $middlewareData.api }}
|
||||
apiTimeoutMs: {{ $middlewareData.apiTimeoutMs }}
|
||||
cacheSize: {{ $middlewareData.cacheSize }}
|
||||
forceMonthlyUpdate: {{ $middlewareData.forceMonthlyUpdate }}
|
||||
allowUnknownCountries: {{ $middlewareData.allowUnknownCountries }}
|
||||
unknownCountryApiResponse: {{ $middlewareData.unknownCountryApiResponse }}
|
||||
blackListMode: {{ $middlewareData.blackListMode }}
|
||||
{{- if not $middlewareData.countries -}}
|
||||
{{- fail "You have to define at least one country..." -}}
|
||||
{{- end }}
|
||||
countries:
|
||||
{{- range $middlewareData.countries }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.ipWhiteList }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
ipAllowList:
|
||||
sourceRange:
|
||||
{{- range $middlewareData.sourceRange }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- if $middlewareData.ipStrategy }}
|
||||
ipStrategy:
|
||||
{{- if $middlewareData.ipStrategy.depth }}
|
||||
depth: {{ $middlewareData.ipStrategy.depth }}
|
||||
{{- end -}}
|
||||
{{- if $middlewareData.ipStrategy.excludedIPs }}
|
||||
excludedIPs:
|
||||
{{- range $middlewareData.ipStrategy.excludedIPs }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.modsecurity }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
traefik-modsecurity-plugin:
|
||||
modSecurityUrl: {{ $middlewareData.modSecurityUrl }}
|
||||
timeoutMillis: {{ $middlewareData.timeoutMillis }}
|
||||
maxBodySize: {{ $middlewareData.maxBodySize }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.rateLimit }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
rateLimit:
|
||||
average: {{ $middlewareData.average }}
|
||||
burst: {{ $middlewareData.burst }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.realIP }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
traefik-real-ip:
|
||||
excludednets:
|
||||
{{- range $middlewareData.excludedNetworks }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.redirectScheme }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: {{ $middlewareData.scheme }}
|
||||
permanent: {{ $middlewareData.permanent }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.redirectRegex }}
|
||||
---
|
||||
# Declaring the user list
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
redirectRegex:
|
||||
regex: {{ $middlewareData.regex | quote }}
|
||||
replacement: {{ $middlewareData.replacement | quote }}
|
||||
permanent: {{ $middlewareData.permanent }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.rewriteResponseHeaders }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
rewriteResponseHeaders:
|
||||
rewrites:
|
||||
{{- range $index, $rewriteResponseHeader := $middlewareData.headers }}
|
||||
- header: {{ $rewriteResponseHeader.name }}
|
||||
regex: {{ $rewriteResponseHeader.regex | quote }}
|
||||
replacement: {{ $rewriteResponseHeader.replacement | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.stripPrefixRegex }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
stripPrefixRegex:
|
||||
regex:
|
||||
{{- range $middlewareData.regex }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name "tc-opencors-chain") "tc-opencors-chain" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "basic-ratelimit") "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "tc-opencors-headers") "tc-opencors-headers" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "compress") "compress" $.Values.ingressClass.enabled }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name "tc-closedcors-chain") "tc-closedcors-chain" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "basic-ratelimit") "basic-ratelimit" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "tc-closedcors-headers") "tc-closedcors-headers" $.Values.ingressClass.enabled }}
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "compress") "compress" $.Values.ingressClass.enabled }}
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name "tc-opencors-headers") "tc-opencors-headers" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
headers:
|
||||
accessControlAllowHeaders:
|
||||
- '*'
|
||||
accessControlAllowMethods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
- HEAD
|
||||
- PUT
|
||||
- POST
|
||||
accessControlAllowOriginList:
|
||||
- '*'
|
||||
accessControlMaxAge: 100
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
frameDeny: true
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: https
|
||||
customResponseHeaders:
|
||||
server: ""
|
||||
forceSTSHeader: true
|
||||
referrerPolicy: same-origin
|
||||
stsSeconds: 63072000
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name "tc-closedcors-headers") "tc-closedcors-headers" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
headers:
|
||||
accessControlAllowMethods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
- HEAD
|
||||
- PUT
|
||||
accessControlMaxAge: 100
|
||||
stsSeconds: 63072000
|
||||
# stsIncludeSubdomains: false
|
||||
# stsPreload: false
|
||||
forceSTSHeader: true
|
||||
contentTypeNosniff: true
|
||||
browserXssFilter: true
|
||||
referrerPolicy: same-origin
|
||||
contentSecurityPolicy: frame-ancestors 'self'; form-action 'self'; upgrade-insecure-requests
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: "https"
|
||||
customResponseHeaders:
|
||||
server: ''
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name "tc-nextcloud-redirectregex-dav") "tc-nextcloud-redirectregex-dav" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
redirectRegex:
|
||||
regex: "https://(.*)/.well-known/(card|cal)dav"
|
||||
replacement: "https://${1}/remote.php/dav/"
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name "tc-nextcloud-chain") "tc-nextcloud-chain" $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
chain:
|
||||
middlewares:
|
||||
- name: {{ ternary (printf "%v-%v" $.Release.Name "tc-nextcloud-redirectregex-dav") "tc-nextcloud-redirectregex-dav" $.Values.ingressClass.enabled }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- range $index, $middlewareData := .Values.middlewares.themePark }}
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ ternary (printf "%v-%v" $.Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
plugin:
|
||||
traefik-themepark:
|
||||
app: {{ $middlewareData.appName }}
|
||||
theme: {{ $middlewareData.themeName }}
|
||||
baseUrl: {{ $middlewareData.baseUrl }}
|
||||
{{- if $middlewareData.addons }}
|
||||
addons:
|
||||
{{- range $middlewareData.addons }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,776 @@
|
||||
image:
|
||||
repository: tccr.io/tccr/traefik
|
||||
tag: v3.3.3@sha256:bfea9053dcccd6b2208e2eceb5b04c99d9d1ba4804eca5908734cd6dee4f4732
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
workload:
|
||||
main:
|
||||
replicas: 2
|
||||
strategy: RollingUpdate
|
||||
podSpec:
|
||||
containers:
|
||||
main:
|
||||
args: []
|
||||
probes:
|
||||
# -- Liveness probe configuration
|
||||
# @default -- See below
|
||||
liveness:
|
||||
# -- sets the probe type when not using a custom probe
|
||||
# @default -- "TCP"
|
||||
type: tcp
|
||||
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
|
||||
# @default -- "/"
|
||||
# path: "/ping"
|
||||
# -- Readiness probe configuration
|
||||
# @default -- See below
|
||||
readiness:
|
||||
# -- sets the probe type when not using a custom probe
|
||||
# @default -- "TCP"
|
||||
type: tcp
|
||||
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
|
||||
# @default -- "/"
|
||||
# path: "/ping"
|
||||
# -- Startup probe configuration
|
||||
# @default -- See below
|
||||
startup:
|
||||
# -- sets the probe type when not using a custom probe
|
||||
# @default -- "TCP"
|
||||
type: tcp
|
||||
# -- If a HTTP probe is used (default for HTTP/HTTPS services) this path is used
|
||||
# @default -- "/"
|
||||
# path: "/ping"
|
||||
# -- Options for all pods
|
||||
# Can be overruled per pod
|
||||
podOptions:
|
||||
automountServiceAccountToken: true
|
||||
operator:
|
||||
register: true
|
||||
# -- Use ingressClass. Ignored if Traefik version < 2.3 / kubernetes < 1.18.x
|
||||
ingressClass:
|
||||
# true is not unit-testable yet, pending https://github.com/rancher/helm-unittest/pull/12
|
||||
enabled: false
|
||||
isDefaultClass: false
|
||||
# Use to force a networking.k8s.io API Version for certain CI/CD applications. E.g. "v1beta1"
|
||||
fallbackApiVersion: ""
|
||||
# -- Create an IngressRoute for the dashboard
|
||||
ingressRoute:
|
||||
dashboard:
|
||||
enabled: true
|
||||
# Additional ingressRoute annotations (e.g. for kubernetes.io/ingress.class)
|
||||
annotations: {}
|
||||
# Additional ingressRoute labels (e.g. for filtering IngressRoute by custom labels)
|
||||
labels: {}
|
||||
#
|
||||
# -- Configure providers
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
enabled: true
|
||||
namespaces: []
|
||||
# - "default"
|
||||
kubernetesIngress:
|
||||
enabled: true
|
||||
# labelSelector: environment=production,method=traefik
|
||||
namespaces: []
|
||||
# - "default"
|
||||
# IP used for Kubernetes Ingress endpoints
|
||||
publishedService:
|
||||
enabled: true
|
||||
# Published Kubernetes Service to copy status from. Format: namespace/servicename
|
||||
# By default this Traefik service
|
||||
# pathOverride: ""
|
||||
# -- Logs
|
||||
# https://docs.traefik.io/observability/logs/
|
||||
logs:
|
||||
# Traefik logs concern everything that happens to Traefik itself (startup, configuration, events, shutdown, and so on).
|
||||
general:
|
||||
# By default, the level is set to ERROR. Alternative logging levels are DEBUG, PANIC, FATAL, ERROR, WARN, and INFO.
|
||||
level: ERROR
|
||||
# -- Set the format of General Logs to be either Common Log Format or JSON. For more information: https://doc.traefik.io/traefik/observability/logs/#format
|
||||
format: common
|
||||
access:
|
||||
# To enable access logs
|
||||
enabled: false
|
||||
# To write the logs in an asynchronous fashion, specify a bufferingSize option.
|
||||
# This option represents the number of log lines Traefik will keep in memory before writing
|
||||
# them to the selected output. In some cases, this option can greatly help performances.
|
||||
# bufferingSize: 100
|
||||
# Filtering https://docs.traefik.io/observability/access-logs/#filtering
|
||||
filters: {}
|
||||
# statuscodes: "200,300-302"
|
||||
# retryattempts: true
|
||||
# minduration: 10ms
|
||||
# Fields
|
||||
# https://docs.traefik.io/observability/access-logs/#limiting-the-fieldsincluding-headers
|
||||
fields:
|
||||
general:
|
||||
defaultmode: keep
|
||||
names: {}
|
||||
# Examples:
|
||||
# ClientUsername: drop
|
||||
headers:
|
||||
defaultmode: drop
|
||||
names: {}
|
||||
# Examples:
|
||||
# User-Agent: redact
|
||||
# Authorization: drop
|
||||
# Content-Type: keep
|
||||
# -- Set the format of Access Logs to be either Common Log Format or JSON. For more information: https://doc.traefik.io/traefik/observability/access-logs/#format
|
||||
format: common
|
||||
metrics:
|
||||
main:
|
||||
enabled: true
|
||||
type: servicemonitor
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: /metrics
|
||||
targetSelector: metrics
|
||||
|
||||
globalArguments:
|
||||
- "--global.checknewversion"
|
||||
|
||||
configmap:
|
||||
dashboard:
|
||||
enabled: true
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
traefik.json: >-
|
||||
{{ .Files.Get "dashboard.json" | indent 8 }}
|
||||
|
||||
##
|
||||
# -- Additional arguments to be passed at Traefik's binary
|
||||
# All available options available on https://docs.traefik.io/reference/static-configuration/cli/
|
||||
## Use curly braces to pass values: `helm install --set="additionalArguments={--providers.kubernetesingress.ingressclass=traefik-internal,--log.level=DEBUG}"`
|
||||
additionalArguments:
|
||||
- "--serverstransport.insecureskipverify=true"
|
||||
- "--providers.kubernetesingress.allowexternalnameservices=true"
|
||||
|
||||
# -- Default clusterCertificate generated by clusterissuer
|
||||
defaultCertificate: ""
|
||||
|
||||
# -- Add custom DNSStore objects
|
||||
tlsStore: {}
|
||||
|
||||
# -- TLS Options to be created as TLSOption CRDs
|
||||
# https://doc.traefik.io/tccr.io/truecharts/https/tls/#tls-options
|
||||
# Example:
|
||||
tlsOptions:
|
||||
default:
|
||||
sniStrict: false
|
||||
minVersion: VersionTLS12
|
||||
curvePreferences:
|
||||
- CurveP521
|
||||
- CurveP384
|
||||
- X25519
|
||||
cipherSuites:
|
||||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
|
||||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
|
||||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
|
||||
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
|
||||
- TLS_AES_128_GCM_SHA256
|
||||
- TLS_AES_256_GCM_SHA384
|
||||
- TLS_CHACHA20_POLY1305_SHA256
|
||||
# -- Options for the main traefik service, where the entrypoints traffic comes from
|
||||
# from.
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
main:
|
||||
port: 9000
|
||||
targetPort: 9000
|
||||
protocol: http
|
||||
# -- Forwarded Headers should never be enabled on Main entrypoint
|
||||
forwardedHeaders:
|
||||
enabled: false
|
||||
# -- Proxy Protocol should never be enabled on Main entrypoint
|
||||
proxyProtocol:
|
||||
enabled: false
|
||||
tcp:
|
||||
enabled: true
|
||||
type: LoadBalancer
|
||||
externalTrafficPolicy: Local
|
||||
ports:
|
||||
web:
|
||||
enabled: true
|
||||
port: 80
|
||||
protocol: http
|
||||
redirectTo: websecure
|
||||
# Options: Empty, 0 (ingore), or positive int
|
||||
# redirectPort:
|
||||
# -- Configure (Forwarded Headers)[https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers] Support
|
||||
forwardedHeaders:
|
||||
enabled: false
|
||||
# -- List of trusted IP and CIDR references
|
||||
trustedIPs: []
|
||||
# -- Trust all forwarded headers
|
||||
insecureMode: false
|
||||
# -- Configure (Proxy Protocol Headers)[https://doc.traefik.io/traefik/routing/entrypoints/#proxyprotocol] Support
|
||||
proxyProtocol:
|
||||
enabled: false
|
||||
# -- Only IPs in trustedIPs will lead to remote client address replacement
|
||||
trustedIPs: []
|
||||
# -- Trust every incoming connection
|
||||
insecureMode: false
|
||||
websecure:
|
||||
enabled: true
|
||||
port: 443
|
||||
protocol: https
|
||||
# -- Configure (Forwarded Headers)[https://doc.traefik.io/traefik/routing/entrypoints/#forwarded-headers] Support
|
||||
forwardedHeaders:
|
||||
enabled: false
|
||||
# -- List of trusted IP and CIDR references
|
||||
trustedIPs: []
|
||||
# -- Trust all forwarded headers
|
||||
insecureMode: false
|
||||
# -- Configure (Proxy Protocol Headers)[https://doc.traefik.io/traefik/routing/entrypoints/#proxyprotocol] Support
|
||||
proxyProtocol:
|
||||
enabled: false
|
||||
# -- Only IPs in trustedIPs will lead to remote client address replacement
|
||||
trustedIPs: []
|
||||
# -- Trust every incoming connection
|
||||
insecureMode: false
|
||||
# tcpexample:
|
||||
# enabled: true
|
||||
# targetPort: 9443
|
||||
# protocol: tcp
|
||||
# tls:
|
||||
# enabled: false
|
||||
# # this is the name of a TLSOption definition
|
||||
# options: ""
|
||||
# certResolver: ""
|
||||
# domains: []
|
||||
# # - main: example.com
|
||||
# # sans:
|
||||
# # - foo.example.com
|
||||
# # - bar.example.com
|
||||
metrics:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
ports:
|
||||
metrics:
|
||||
enabled: true
|
||||
port: 9180
|
||||
targetPort: 9180
|
||||
protocol: http
|
||||
# -- Forwarded Headers should never be enabled on Metrics entrypoint
|
||||
forwardedHeaders:
|
||||
enabled: false
|
||||
# -- Proxy Protocol should never be enabled on Metrics entrypoint
|
||||
proxyProtocol:
|
||||
enabled: false
|
||||
# udp:
|
||||
# enabled: false
|
||||
# -- Whether Role Based Access Control objects like roles and rolebindings should be created
|
||||
rbac:
|
||||
main:
|
||||
enabled: true
|
||||
primary: true
|
||||
clusterWide: true
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
verbs:
|
||||
- use
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingressclasses
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- traefik.io
|
||||
resources:
|
||||
- ingressroutes
|
||||
- ingressroutetcps
|
||||
- ingressrouteudps
|
||||
- middlewares
|
||||
- middlewaretcps
|
||||
- serverstransports
|
||||
- serverstransporttcps
|
||||
- tlsoptions
|
||||
- tlsstores
|
||||
- traefikservices
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
- endpoints
|
||||
- secrets
|
||||
- services
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- backendtlspolicies
|
||||
- gatewayclasses
|
||||
- gateways
|
||||
- grpcroutes
|
||||
- httproutes
|
||||
- referencegrants
|
||||
- tcproutes
|
||||
- tlsroutes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- gateway.networking.k8s.io
|
||||
resources:
|
||||
- backendtlspolicies/status
|
||||
- gatewayclasses/status
|
||||
- gateways/status
|
||||
- grpcroutes/status
|
||||
- httproutes/status
|
||||
- tcproutes/status
|
||||
- tlsroutes/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- hub.traefik.io
|
||||
resources:
|
||||
- accesscontrolpolicies
|
||||
- apiaccesses
|
||||
- apiportals
|
||||
- apiratelimits
|
||||
- apis
|
||||
- apiversions
|
||||
- apibundles
|
||||
- apiplans
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- traefik.io
|
||||
resources:
|
||||
- ingressroutes
|
||||
- ingressroutetcps
|
||||
- ingressrouteudps
|
||||
- middlewares
|
||||
- middlewaretcps
|
||||
- tlsoptions
|
||||
- tlsstores
|
||||
- traefikservices
|
||||
- serverstransports
|
||||
- serverstransporttcps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
verbs:
|
||||
- use
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
- endpoints
|
||||
- namespaces
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
|
||||
# -- The service account the pods will use to interact with the Kubernetes API
|
||||
serviceAccount:
|
||||
main:
|
||||
enabled: true
|
||||
primary: true
|
||||
# -- SCALE Middleware Handlers
|
||||
middlewares:
|
||||
basicAuth: []
|
||||
# - name: basicauthexample
|
||||
# users:
|
||||
# - username: testuser
|
||||
# password: testpassword
|
||||
forwardAuth: []
|
||||
# - name: forwardAuthexample
|
||||
# address: https://auth.example.com/
|
||||
# authResponseHeaders:
|
||||
# - X-Secret
|
||||
# - X-Auth-User
|
||||
# authRequestHeaders:
|
||||
# - "Accept"
|
||||
# - "X-CustomHeader"
|
||||
# authResponseHeadersRegex: "^X-"
|
||||
# trustForwardHeader: true
|
||||
customRequestHeaders: []
|
||||
# - name: customRequestHeaderExample
|
||||
# headers:
|
||||
# - name: X-Custom-Header
|
||||
# value: "foobar"
|
||||
# - name: X-Header-To-Remove
|
||||
# value: ""
|
||||
customResponseHeaders: []
|
||||
# - name: customResponseHeaderExample
|
||||
# headers:
|
||||
# - name: X-Custom-Header
|
||||
# value: "foobar"
|
||||
# - name: X-Header-To-Remove
|
||||
# value: ""
|
||||
rewriteResponseHeaders: []
|
||||
# - name: rewriteResponseHeadersName
|
||||
# headers:
|
||||
# - name: "Location"
|
||||
# regex: "^http://(.+)$"
|
||||
# replacement: "https://$1"
|
||||
# - name: "Date"
|
||||
# regex: "^[^,]+,\\s*(.+)$"
|
||||
# replacement: "$1"
|
||||
customFrameOptionsValue: []
|
||||
# - name: customFrameOptionsValueExample
|
||||
# value: "SAMEORIGIN"
|
||||
buffering: []
|
||||
# - name: bufferingExample
|
||||
# maxRequestBodyBytes: 1000000
|
||||
# memRequestBodyBytes: 1000000
|
||||
# maxResponseBodyBytes: 1000000
|
||||
# memResponseBodyBytes: 1000000
|
||||
# retryExpression: "IsNetworkError() && Attempts() < 2"
|
||||
chain: []
|
||||
# - name: chainname
|
||||
# middlewares:
|
||||
# - name: compress
|
||||
redirectScheme: []
|
||||
# - name: redirectSchemeName
|
||||
# scheme: https
|
||||
# permanent: true
|
||||
rateLimit: []
|
||||
# - name: rateLimitName
|
||||
# average: 300
|
||||
# burst: 200
|
||||
redirectRegex: []
|
||||
# - name: redirectRegexName
|
||||
# regex: putregexhere
|
||||
# replacement: replacementurlhere
|
||||
# permanent: false
|
||||
stripPrefixRegex: []
|
||||
# - name: stripPrefixRegexName
|
||||
# regex: []
|
||||
ipWhiteList: []
|
||||
# - name: ipWhiteListName
|
||||
# sourceRange: []
|
||||
# ipStrategy:
|
||||
# depth: 2
|
||||
# excludedIPs: []
|
||||
themePark: []
|
||||
# - name: themeParkName
|
||||
# -- Supported apps, lower case name
|
||||
# -- https://docs.theme-park.dev/themes
|
||||
# app: appnamehere
|
||||
# -- Supported themes, lower case name
|
||||
# -- https://docs.theme-park.dev/themes/APPNAMEHERE
|
||||
# -- https://docs.theme-park.dev/community-themes
|
||||
# theme: themenamehere
|
||||
# -- https://theme-park.dev or a self hosted url
|
||||
# baseUrl: https://theme-park.dev
|
||||
# Sets X-Real-Ip with an IP from the X-Forwarded-For or
|
||||
# Cf-Connecting-Ip (If from Cloudflare)
|
||||
# Evaluation of those headers will go from last to first
|
||||
realIP: []
|
||||
# - name: realIPName
|
||||
# -- The real IP will be the first one that is
|
||||
# -- not included in any of the CIDRs passed here
|
||||
# excludedNetworks:
|
||||
# - 1.1.1.1/24
|
||||
addPrefix: []
|
||||
# - name: addPrefixName
|
||||
# prefix: "/foo"
|
||||
geoBlock: []
|
||||
# -- https://github.com/PascalMinder/geoblock
|
||||
# - name: geoBlockName
|
||||
# allowLocalRequests: true
|
||||
# logLocalRequests: false
|
||||
# logAllowedRequests: false
|
||||
# logApiRequests: false
|
||||
# api: https://get.geojs.io/v1/ip/country/{ip}
|
||||
# apiTimeoutMs: 500
|
||||
# cacheSize: 25
|
||||
# forceMonthlyUpdate: true
|
||||
# allowUnknownCountries: false
|
||||
# unknownCountryApiResponse: nil
|
||||
# blackListMode: false
|
||||
# countries:
|
||||
# - RU
|
||||
modsecurity: []
|
||||
# - name: modsecurityName
|
||||
# modSecurityUrl: modSecurity container URL
|
||||
# timeoutMillis: Configurated timeout
|
||||
# maxBodySize: maxBodySize
|
||||
bouncer: []
|
||||
# - name: bouncer
|
||||
# enabled: false
|
||||
# logLevel: DEBUG
|
||||
# updateIntervalSeconds: 60
|
||||
# defaultDecisionSeconds: 60
|
||||
# httpTimeoutSeconds: 10
|
||||
# crowdsecMode: live
|
||||
# crowdsecAppsecEnabled: false
|
||||
# crowdsecAppsecHost: crowdsec:7422
|
||||
# crowdsecAppsecFailureBlock: true
|
||||
# crowdsecLapiKey: privateKey-foo
|
||||
# crowdsecLapiKeyFile: /etc/traefik/cs-privateKey-foo
|
||||
# crowdsecLapiHost: crowdsec:8080
|
||||
# crowdsecLapiScheme: http
|
||||
# crowdsecLapiTLSInsecureVerify: false
|
||||
# crowdsecCapiMachineId: login
|
||||
# crowdsecCapiPassword: password
|
||||
# crowdsecCapiScenarios:
|
||||
# - crowdsecurity/http-path-traversal-probing
|
||||
# - crowdsecurity/http-xss-probing
|
||||
# - crowdsecurity/http-generic-bf
|
||||
# forwardedHeadersTrustedIPs:
|
||||
# - 10.0.10.23/32
|
||||
# - 10.0.20.0/24
|
||||
# clientTrustedIPs:
|
||||
# - 192.168.1.0/24
|
||||
# forwardedHeadersCustomName: X-Custom-Header
|
||||
# redisCacheEnabled: false
|
||||
# redisCacheHost: "redis:6379"
|
||||
# redisCachePassword: password
|
||||
# redisCacheDatabase: "5"
|
||||
# crowdsecLapiTLSCertificateAuthority: |-
|
||||
# crowdsecLapiTLSCertificateAuthorityFile: /etc/traefik/crowdsec-certs/ca.pem
|
||||
# crowdsecLapiTLSCertificateBouncer: |-
|
||||
# crowdsecLapiTLSCertificateBouncerFile: /etc/traefik/crowdsec-certs/bouncer.pem
|
||||
# crowdsecLapiTLSCertificateBouncerKey: |-
|
||||
# crowdsecLapiTLSCertificateBouncerKeyFile: /etc/traefik/crowdsec-certs/bouncer-key.pem
|
||||
## Note: body of every request will be buffered in memory while the request is in-flight
|
||||
## (i.e.: during the security check and during the request processing by traefik and the backend),
|
||||
## so you may want to tune maxBodySize depending on how much RAM you have.
|
||||
portalhook:
|
||||
enabled: true
|
||||
persistence:
|
||||
plugins:
|
||||
enabled: true
|
||||
mountPath: "/plugins-storage"
|
||||
type: emptyDir
|
||||
crowdsec-bouncer-tls:
|
||||
enabled: "{{ if .Values.middlewares.bouncer }}true{{ else }}false{{ end }}"
|
||||
mountPath: "/etc/traefik/crowdsec-certs"
|
||||
type: secret
|
||||
expandObjectName: false
|
||||
objectName: crowdsec-bouncer-tls
|
||||
portal:
|
||||
open:
|
||||
enabled: true
|
||||
path: /dashboard/
|
||||
ingress:
|
||||
main:
|
||||
integrations:
|
||||
homepage:
|
||||
href: https://{{ ( index .Values.ingress.main.hosts 0 ).host }}/dashboard/
|
||||