Skip to content

Commit

Permalink
[home] fixed port redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberdev committed Jan 29, 2024
1 parent 0af9020 commit a4131de
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 20 deletions.
29 changes: 13 additions & 16 deletions apps/home/ha/base/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ metadata:
external-dns.alpha.kubernetes.io/hostname: home.gruber.dev.br
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
external-dns.alpha.kubernetes.io/ttl: "120"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
tailscale.com/funnel: "true"
spec:
ingressClassName: nginx
ingressClassName: tailscale
rules:
- host: home.gruber.dev.br
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: homeassistant
port:
name: ha
tls:
- hosts:
- home.gruber.dev.br
secretName: ha-tls
- host: home.gruber.dev.br
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ha-tailscale
port:
name: web
port: 80
27 changes: 23 additions & 4 deletions apps/home/ha/base/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,31 @@ metadata:
kube-vip.io/vipHost: homeassistant
spec:
ports:
- name: ha
port: 80
protocol: TCP
targetPort: 8123
- name: ha
port: 80
protocol: TCP
targetPort: 8123
selector:
app: home-assistant
type: LoadBalancer
loadBalancerIP: "192.168.1.137"
loadBalancerClass: kube-vip.io/kube-vip-class
---
apiVersion: v1
kind: Service
metadata:
name: ha-tailscale
labels:
app: home-assistant
annotations:
tailscale.com/hostname: "home"
spec:
selector:
app: home-assistant
ports:
- name: web
port: 80
targetPort: 8123
protocol: TCP
loadBalancerClass: tailscale
type: LoadBalancer

0 comments on commit a4131de

Please sign in to comment.