Skip to content

Commit 0b61013

Browse files
authored
feat(traefik): add Traefik configuration files and resources (#941)
* feat(traefik): add Traefik configuration files and resources Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(traefik): correct web port redirection configuration Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(traefik): remove unnecessary redirection scheme and permanence settings Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(policyignore): expand ignored patterns for various resources Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(traefik): update redirection configuration to use HTTPS scheme and remove deprecated HelmRelease Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(traefik): update dashboard ingress route match rule to include API path prefix Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(traefik): simplify dashboard ingress route match rule by removing API path prefix Signed-off-by: Nikolai Emil Damm <[email protected]> * chore(cloudflared): remove obsolete HelmRelease, HelmRepository, and related configurations Signed-off-by: Nikolai Emil Damm <[email protected]> * fix(traefik): update service type to LoadBalancer in helm-release configuration Signed-off-by: Nikolai Emil Damm <[email protected]> * feat(cloudflared): add HelmRelease, HelmRepository, and related configurations for Cloudflared Signed-off-by: Nikolai Emil Damm <[email protected]> * feat(variables): add traefik_service_type to ConfigMap and cloudflared_tunnel_token to Secret Signed-off-by: Nikolai Emil Damm <[email protected]> * refactor(dex): remove deprecated HelmRelease and related resources; update namespace labels Signed-off-by: Nikolai Emil Damm <[email protected]> --------- Signed-off-by: Nikolai Emil Damm <[email protected]>
1 parent cf32611 commit 0b61013

28 files changed

+113
-174
lines changed

.policyignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,34 @@
66
*README.md
77
argo*
88
aws*
9+
best-practices-cel*
10+
best-practices*
911
castai*
12+
cert-manager*
13+
cleanup*
1014
consul*
15+
external-secret-operator*
16+
flux-cel*
17+
flux*
1118
istio*
19+
karpenter*
1220
kasten*
21+
kubecost-cel*
22+
kubecost*
23+
kubevirt*
1324
linkerd*
1425
nginx*
1526
openshift*
27+
other-cel*
28+
other*
29+
pod-security-cel*
30+
pod-security*
31+
psa-cel*
32+
psa*
33+
psp-migration-cel*
34+
psp-migration*
1635
tekton*
36+
traefik-cel*
37+
traefik*
1738
velero*
1839
windows-security*

k8s/bases/infrastructure/cloudflared/namespace.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

k8s/bases/infrastructure/controllers/dex/helm-release.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ kind: HelmRelease
33
metadata:
44
name: dex
55
namespace: dex
6-
labels:
7-
helm.toolkit.fluxcd.io/crds: enabled
8-
helm.toolkit.fluxcd.io/helm-test: enabled
9-
helm.toolkit.fluxcd.io/remediation: enabled
106
spec:
117
interval: 10m
128
chart:
@@ -22,12 +18,12 @@ spec:
2218
enabled: true
2319
className: ${ingress_class_name:=}
2420
hosts:
25-
- host: dex.${cluster_domain}
21+
- host: dex.${domain}
2622
paths:
2723
- path: /
2824
pathType: ImplementationSpecific
2925
config:
30-
issuer: https://dex.${cluster_domain}
26+
issuer: https://dex.${domain}
3127
storage:
3228
type: kubernetes
3329
config:
@@ -38,17 +34,15 @@ spec:
3834
- name: GitHub
3935
id: github
4036
secret: ${dex_client_secret}
41-
redirectURIs:
42-
- https://headlamp.${cluster_domain}/oidc-callback
43-
- https://grafana.${cluster_domain}/login/generic_oauth
37+
redirectURIs: []
4438
connectors:
4539
- name: GitHub
4640
type: github
4741
id: github
4842
config:
49-
clientID: ${github_client_id}
50-
clientSecret: ${github_client_secret}
43+
clientID: ${github_app_client_id}
44+
clientSecret: ${github_app_client_secret}
5145
teamNameField: slug
52-
redirectURI: https://dex.${cluster_domain}/callback
46+
redirectURI: https://dex.${domain}/callback
5347
orgs:
54-
- name: devantlerware
48+
- name: devantler-tech

k8s/bases/infrastructure/controllers/dex/namespace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ metadata:
55
labels:
66
goldilocks.fairwinds.com/enabled: "true"
77
goldilocks.fairwinds.com/vpa-update-mode: "auto"
8-
goldilocks.fairwinds.com/vpa-min-replicas: "1"
8+
goldilocks.fairwinds.com/vpa-min-replicas: "2"

k8s/bases/infrastructure/controllers/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ kind: Kustomization
44
resources:
55
- cert-manager/
66
- cilium/
7+
- dex/
78
- reloader/
9+
- traefik/
File renamed without changes.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: helm.toolkit.fluxcd.io/v2
2+
kind: HelmRelease
3+
metadata:
4+
name: traefik
5+
namespace: traefik
6+
spec:
7+
interval: 10m
8+
chart:
9+
spec:
10+
chart: traefik
11+
version: 35.2.0
12+
sourceRef:
13+
kind: HelmRepository
14+
name: traefik
15+
# https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml
16+
values:
17+
ports:
18+
web:
19+
redirections:
20+
entryPoint:
21+
to: websecure
22+
scheme: https
23+
# websecure:
24+
# middlewares:
25+
# - traefik-auth-headers@kubernetescrd
26+
# tlsStore:
27+
# default:
28+
# defaultCertificate:
29+
# secretName: cluster-issuer-certificate-tls
30+
service:
31+
type: ${traefik_service_type:=LoadBalancer}
32+
ingressRoute:
33+
dashboard:
34+
enabled: true
35+
matchRule: Host(`traefik.${domain}`)
36+
entryPoints:
37+
- websecure
38+
# middlewares:
39+
# - name: traefik-forward-auth
40+
# annotations:
41+
# gethomepage.dev/enabled: "true"
42+
# gethomepage.dev/name: Traefik
43+
# gethomepage.dev/description: Dashboard for monitoring the traefik reverse proxy.
44+
# gethomepage.dev/group: Monitoring
45+
# gethomepage.dev/icon: traefik
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: traefik
5+
# labels:
6+
# goldilocks.fairwinds.com/enabled: "true"
7+
# goldilocks.fairwinds.com/vpa-update-mode: "auto"
8+
# goldilocks.fairwinds.com/vpa-min-replicas: "1"

0 commit comments

Comments
 (0)