Add traefik config file to route to services out of cluster

This commit is contained in:
Finn 2024-08-02 13:57:50 -07:00
parent 9d1c4d07f5
commit b5965274a4
4 changed files with 38 additions and 2 deletions

View file

@ -2,4 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- traefik-default-cert.yaml
configMapGenerator:
- name: traefik-additional-configs
namespace: kube-system
options:
disableNameSuffixHash: true
files:
- traefik/external-services.yaml

View file

@ -10,7 +10,7 @@ spec:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: traefik-default
name: default
namespace: kube-system
spec:
issuerRef:

View file

@ -0,0 +1,21 @@
http:
routers:
minio:
entryPoints:
- websecure
rule: "Host(`storage.home.finn.io`)"
service: minio
minio-console:
entryPoints:
- websecure
rule: "Host(`minio-console.home.finn.io`)"
service: minio-console
services:
minio:
loadBalancer:
servers:
- url: "http://minio:9000/"
minio-console:
loadBalancer:
servers:
- url: "http://minio:9001/"

View file

@ -5,6 +5,8 @@ metadata:
namespace: kube-system
spec:
valuesContent: |-
deployment:
replicas: 2
ports:
web:
proxyProtocol:
@ -17,3 +19,10 @@ spec:
trustedIPs:
- 10.5.1.245/32
- 10.42.0.0/16 # traffic getting redirected from other nodes
additionalArguments:
- --providers.file.directory=/file-configs
- --providers.file.watch=true
volumes:
- name: traefik-additional-configs
mountPath: /file-configs
type: configMap