Update traefik internal services template

This commit is contained in:
Finn 2024-08-02 16:09:09 -07:00
parent ff18cdf1cf
commit 41a2f09959
12 changed files with 49 additions and 19 deletions

View file

@ -27,4 +27,4 @@ signing_key_path: "/secrets/janky.bot.signing.key"
trusted_key_servers: trusted_key_servers:
- server_name: "matrix.org" - server_name: "matrix.org"
public_baseurl: https://matrix.janky.bot public_baseurl: https://matrix.janky.bot
ip_range_whitelist: [10.5.1.245] ip_range_whitelist: [10.5.1.245,10.5.1.1]

View file

@ -7,6 +7,7 @@ resources:
- bridge-signal.yaml - bridge-signal.yaml
- bridge-telegram.yaml - bridge-telegram.yaml
- janky.bot-homeserver.yaml - janky.bot-homeserver.yaml
- janky.solutions-homeserver.yaml
- secrets.yaml - secrets.yaml
- secrets-init.yaml - secrets-init.yaml
configMapGenerator: configMapGenerator:
@ -18,3 +19,12 @@ configMapGenerator:
files: files:
- config-janky.bot/homeserver.yaml - config-janky.bot/homeserver.yaml
- config-janky.bot/log.yaml - config-janky.bot/log.yaml
- name: synapse-janky-solutions
files:
- config-janky.solutions/homeserver.yaml
- config-janky.solutions/log.yaml
- name: appservices-janky-solutions
files:
- appservices-janky.solutions/facebook.yaml
- appservices-janky.solutions/telegram.yaml
- appservices-janky.solutions/signal.yaml

View file

@ -4,5 +4,5 @@ namespace: monica
resources: resources:
- namespace.yaml - namespace.yaml
- monica.yaml - monica.yaml
- mysql.yaml - database.yaml
- secrets.yaml - secrets.yaml

View file

@ -64,6 +64,7 @@ spec:
- metadata: - metadata:
name: storage name: storage
spec: spec:
storageClassName: longhorn
accessModes: ["ReadWriteOnce"] accessModes: ["ReadWriteOnce"]
resources: resources:
requests: requests:

View file

@ -27,7 +27,7 @@ spec:
app: mysql app: mysql
spec: spec:
containers: containers:
- image: docker.io/library/mysql:5.7 - image: docker.io/library/mysql:8
name: mysql name: mysql
resources: {} resources: {}
ports: ports:
@ -50,6 +50,7 @@ spec:
- metadata: - metadata:
name: storage name: storage
spec: spec:
storageClassName: longhorn
accessModes: ["ReadWriteOnce"] accessModes: ["ReadWriteOnce"]
resources: resources:
requests: requests:

View file

@ -19,6 +19,8 @@ apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: prometheus-internal name: prometheus-internal
annotations:
janky.solutions/auth-glue: prometheus
spec: spec:
rules: rules:
- host: prometheus.monitoring.k8s - host: prometheus.monitoring.k8s

View file

@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- traefik-default-cert.yaml - traefik-default-cert.yaml
- traefik-dashboard.yaml
configMapGenerator: configMapGenerator:
- name: traefik-additional-configs - name: traefik-additional-configs
namespace: kube-system namespace: kube-system

View file

@ -0,0 +1,12 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
namespace: kube-system
spec:
routes:
- match: Host(`traefik.kube-system.k8s`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
kind: Rule
services:
- name: api@internal
kind: TraefikService

View file

@ -1,21 +1,25 @@
{{
$services := list
(list "minio-console" "minio-console.home.finn.io" "http://minio:9001")
(list "minio" "storage.home.finn.io" "http://minio:9000")
(list "jellyfin" "jellyfin.janky.solutions" "http://jellyfin:8096")
(list "dns" "dns.janky.solutions" "http://dns:9191")
(list "dns443" "dns.janky.solutions:443" "http://dns:9191")
(list "matrix" "matrix.janky.solutions" "http://matrix:8008")
}}
http: http:
routers: routers:
minio: {{range $_, $service := $services}}
{{index $service 0}}:
entryPoints: entryPoints:
- websecure - websecure
rule: "Host(`storage.home.finn.io`)" rule: "Host(`{{ index $service 1 }}`)"
service: minio service: {{ index $service 0 }}
minio-console: {{end}}
entryPoints:
- websecure
rule: "Host(`minio-console.home.finn.io`)"
service: minio-console
services: services:
minio: {{range $_, $service := $services}}
{{index $service 0}}:
loadBalancer: loadBalancer:
servers: servers:
- url: "http://minio:9000/" - url: "{{index $service 2}}"
minio-console: {{end}}
loadBalancer:
servers:
- url: "http://minio:9001/"

View file

@ -3,6 +3,5 @@
ansible_user: root ansible_user: root
roles: roles:
- base - base
- monitoring
- k8s-node - k8s-node
- k8s-usb-node - k8s-usb-node

View file

@ -3,5 +3,4 @@
ansible_user: root ansible_user: root
roles: roles:
- base - base
- monitoring
- k8s-node - k8s-node

View file

@ -22,6 +22,7 @@ spec:
additionalArguments: additionalArguments:
- --providers.file.directory=/file-configs - --providers.file.directory=/file-configs
- --providers.file.watch=true - --providers.file.watch=true
- --providers.file.debugLogGeneratedTemplate=true
volumes: volumes:
- name: traefik-additional-configs - name: traefik-additional-configs
mountPath: /file-configs mountPath: /file-configs