mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 02:12:55 +02:00
HA: add ingress, svc, endpoint
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/rubenhensen/k8scd.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: home-assistant
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: home-assistant
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
name: external-ip
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 192.168.1.204
|
||||||
|
ports:
|
||||||
|
- name: app
|
||||||
|
port: 8123
|
||||||
|
protocol: TCP
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-ingress
|
||||||
|
annotations:
|
||||||
|
# nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
||||||
|
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
|
||||||
|
# nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
# type of authentication
|
||||||
|
# nginx.ingress.kubernetes.io/auth-type: basic
|
||||||
|
# name of the secret that contains the user/password definitions
|
||||||
|
# nginx.ingress.kubernetes.io/auth-secret: longhorn-basic-auth
|
||||||
|
# message to display with an appropriate context why the authentication is required
|
||||||
|
# nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '
|
||||||
|
|
||||||
|
# nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/"
|
||||||
|
# nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE"
|
||||||
|
# If you encounter a redirect loop or are getting a 307 response code
|
||||||
|
# then you need to force the nginx ingress to connect to the backend using HTTPS.
|
||||||
|
#
|
||||||
|
# nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||||
|
# namespace: ente-photos
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: ha.hensen.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: app
|
||||||
|
port:
|
||||||
|
number: 8123
|
||||||
|
|
||||||
|
# TLS configuration for HTTPS
|
||||||
|
tls:
|
||||||
|
# TLS secretName used on ClusterIssuer
|
||||||
|
- secretName: letsencrypt-prod
|
||||||
|
hosts:
|
||||||
|
- ha.hensen.io
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: external-ip
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: app
|
||||||
|
port: 8123
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8123
|
||||||
|
clusterIP: None
|
||||||
|
type: ClusterIP
|
||||||
Reference in New Issue
Block a user