Parcourir la source

Initial add of smarthome ingress and setup

Breandan Dezendorf il y a 2 ans
Parent
commit
6c3c314acb

+ 69 - 0
dezendorf/homelab/k3s/smarthome/ingress.yaml

@@ -0,0 +1,69 @@
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+  name: homeassistant-ingress-route
+  namespace: smarthome
+spec:
+  entryPoints:
+    - web
+  routes:
+  - match: Host(`homeassistant.dezendorf.net`)
+    kind: Rule
+    middlewares:
+    - name: redirecthttps
+    services:
+    - name: homeassistant-service
+      port: 2342
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+  name: homeassistant-websecure-route
+  namespace: smarthome
+spec:
+  entryPoints:
+    - websecure
+  routes:
+  - match: Host(`homeassistant.dezendorf.net`)
+    kind: Rule
+    services:
+    - name: homeassistant-service
+      port: 2342
+  tls:
+    certResolver: myresolver
+
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+  name: homebridge-ingress-route
+  namespace: smarthome
+spec:
+  entryPoints:
+    - web
+  routes:
+  - match: Host(`homebridge.dezendorf.net`)
+    kind: Rule
+    middlewares:
+    - name: redirecthttps
+    services:
+    - name: homebridge-service
+      port: 2342
+---
+apiVersion: traefik.containo.us/v1alpha1
+kind: IngressRoute
+metadata:
+  name: homebridge-websecure-route
+  namespace: smarthome
+spec:
+  entryPoints:
+    - websecure
+  routes:
+  - match: Host(`homebridge.dezendorf.net`)
+    kind: Rule
+    services:
+    - name: homebridge-service
+      port: 2342
+  tls:
+    certResolver: myresolver

+ 4 - 0
dezendorf/homelab/k3s/smarthome/setup.sh

@@ -0,0 +1,4 @@
+kubectl create namespace smarthome
+kubectl apply --namespace smarthome -f homeassistant.yaml
+kubectl apply --namespace smarthome -f homebridge.yaml
+kubectl apply --namespace smarthome -f ingress.yaml