Use helm and local provider
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d44bea3d66
commit
0e6f763db5
7 changed files with 177 additions and 90 deletions
|
|
@ -7,6 +7,20 @@ data:
|
|||
serversTransport:
|
||||
insecureSkipVerify: true
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":8000/tcp"
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
websecure:
|
||||
address: ":8443/tcp"
|
||||
http:
|
||||
tls:
|
||||
options: default
|
||||
traefik:
|
||||
address: ":9000/tcp"
|
||||
{% for traefik_entrypoint in traefik_entrypoints %}
|
||||
{{ traefik_entrypoint.name }}:
|
||||
address: :{{ traefik_entrypoint.port }}
|
||||
|
|
@ -26,18 +40,11 @@ data:
|
|||
watch: true
|
||||
metrics:
|
||||
prometheus:
|
||||
buckets:
|
||||
- 0.1
|
||||
- 0.3
|
||||
- 1.2
|
||||
- 5
|
||||
entryPoint: traefik
|
||||
ping:
|
||||
entryPoint: traefik
|
||||
api:
|
||||
insecure: true
|
||||
dashboard: true
|
||||
debug: true
|
||||
log:
|
||||
level: WARN
|
||||
format: json
|
||||
|
|
|
|||
73
templates/traefik-file-provider.yml.j2
Normal file
73
templates/traefik-file-provider.yml.j2
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: traefik-file-provider
|
||||
namespace: traefik
|
||||
data:
|
||||
traefik-middlewares.yaml: |
|
||||
http:
|
||||
middlewares:
|
||||
compress:
|
||||
compress:
|
||||
excludedContentTypes: ["text/event-stream"]
|
||||
rate-limit:
|
||||
rateLimit:
|
||||
average: 100
|
||||
burst: 50
|
||||
security_headers:
|
||||
headers:
|
||||
accessControlAllowMethods: ["GET", "OPTIONS", "PUT"]
|
||||
accessControlAllowOrigin: "origin-list-or-null"
|
||||
accessControlMaxAge: 100
|
||||
addVaryHeader: true
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
forceSTSHeader: true
|
||||
frameDeny: true
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
customFrameOptionsValue: "SAMEORIGIN"
|
||||
referrerPolicy: "same-origin"
|
||||
featurePolicy: "vibrate 'self'"
|
||||
stsSeconds: 315360000
|
||||
sslRedirect: true
|
||||
contentSecurityPolicy: "default-src 'self' 'unsafe-inline'"
|
||||
# customResponseHeaders:
|
||||
# X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex,"
|
||||
# server: ""
|
||||
{% if ingress_whitelist is defined %}
|
||||
traefik-ipwhitelist:
|
||||
ipWhiteList:
|
||||
sourceRange:
|
||||
{% for acl_whitelist in ingress_whitelist %}
|
||||
- {{ acl_whitelist }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if basic_auth|bool %}
|
||||
basic-auth:
|
||||
basicAuth:
|
||||
removeHeader: true
|
||||
usersFile: "/etc/traefik/basic-auth/basic_auth"
|
||||
# users:
|
||||
# - {{ basic_auth_data }}
|
||||
{% endif %}
|
||||
authelia:
|
||||
forwardAuth:
|
||||
address: "http://authelia:9091/api/verify?rd=https://login.example.com/"
|
||||
trustForwardHeader: true
|
||||
authReponseHeaders: ["Remote-User", "Remote-Groups", "Remote-Name", "Remote-Email"]
|
||||
|
||||
traefik-tls-defaults-options.yaml: |
|
||||
tls:
|
||||
options:
|
||||
default:
|
||||
sniStrict: true
|
||||
minVersion: VersionTLS12
|
||||
curvePreferences:
|
||||
- CurveP521
|
||||
- CurveP384
|
||||
cipherSuites:
|
||||
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
|
||||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
||||
|
|
@ -30,17 +30,6 @@ spec:
|
|||
services:
|
||||
- name: api@internal
|
||||
kind: TraefikService
|
||||
# - name: traefik-dashboard
|
||||
# port: 8080
|
||||
# # (default 1) A weight used by the weighted round-robin strategy (WRR).
|
||||
# weight: 1
|
||||
# # (default true) PassHostHeader controls whether to leave the request's Host
|
||||
# # Header as it was before it reached the proxy, or whether to let the proxy set it
|
||||
# # to the destination (backend) host.
|
||||
# passHostHeader: true
|
||||
# responseForwarding:
|
||||
# # (default 100ms) Interval between flushes of the buffered response body to the client.
|
||||
# flushInterval: 100ms
|
||||
- match: Host(`traefik.{{ traefik_domain }}`) && PathPrefix(`/ping`)
|
||||
kind: Rule
|
||||
services:
|
||||
|
|
@ -58,6 +47,3 @@ spec:
|
|||
{% if traefik_dashboard_certificate is defined %}
|
||||
secretName: {{ traefik_dashboard_certificate }}
|
||||
{% endif %}
|
||||
options:
|
||||
name: default
|
||||
namespace: {{ traefik_namespace }}
|
||||
|
|
@ -2,20 +2,24 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: traefik
|
||||
app.kubernetes.io/instance: traefik
|
||||
app.kubernetes.io/name: traefik
|
||||
name: traefik
|
||||
namespace: {{ traefik_namespace }}
|
||||
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
- name: web
|
||||
hostPort: 80
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- protocol: TCP
|
||||
targetPort: web
|
||||
- name: websecure
|
||||
hostPort: 443
|
||||
port: 443
|
||||
name: https
|
||||
targetPort: 443
|
||||
type: LoadBalancer
|
||||
protocol: TCP
|
||||
targetPort: websecure
|
||||
selector:
|
||||
app: traefik
|
||||
app.kubernetes.io/instance: traefik
|
||||
app.kubernetes.io/name: traefik
|
||||
sessionAffinity: None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue