mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-09 04:15:52 +10:00
add home assisstant
This commit is contained in:
+17
-1
@@ -228,7 +228,6 @@ spec:
|
||||
|
||||
---
|
||||
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@@ -251,3 +250,20 @@ data:
|
||||
# xpack.security.enabled: false
|
||||
# logging.silent: false
|
||||
# logging.quiet: false
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: elasticsearch-config
|
||||
namespace: es
|
||||
data:
|
||||
elasticsearch.yml: |
|
||||
s3:
|
||||
client:
|
||||
default:
|
||||
endpoint: minio.db.svc.cluster.local:9000
|
||||
protocol: http
|
||||
region: ap-southeast-2
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
namespace: home-apps
|
||||
name: ha-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: nfs-client
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ha
|
||||
namespace: home-apps
|
||||
labels:
|
||||
app: ha
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ha
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ha
|
||||
name: ha
|
||||
spec:
|
||||
containers:
|
||||
- name: ha
|
||||
image: ghcr.io/home-assistant/home-assistant:stable
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 5678
|
||||
name: web
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: TZ
|
||||
value: "Australia/Melbourne"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 526Mi
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: ha-pvc
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ha
|
||||
labels:
|
||||
name: ha
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: ha
|
||||
ports:
|
||||
- name: ha
|
||||
targetPort: web
|
||||
port: 8123
|
||||
protocol: TCP
|
||||
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ha-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
kubernetes.io/tls-acme: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/auth-url: "https://id.junv.me/oauth2/auth"
|
||||
nginx.ingress.kubernetes.io/auth-signin: "https://id.junv.me/oauth2/start?rd=https%3A%2F%2F$host$request_uri"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- home.junv.me
|
||||
secretName: ha-tls-new
|
||||
rules:
|
||||
- host: home.junv.me
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: ha
|
||||
port:
|
||||
number: 80
|
||||
path: /
|
||||
pathType: Prefix
|
||||
@@ -0,0 +1,90 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ipsec-vpn
|
||||
namespace: home-apps
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 500
|
||||
# nodePort: 500
|
||||
protocol: UDP
|
||||
targetPort: 500
|
||||
name: ipsec-udp-1
|
||||
- port: 4500
|
||||
# nodePort: 4500
|
||||
protocol: UDP
|
||||
targetPort: 4500
|
||||
name: ipsec-udp-2
|
||||
selector:
|
||||
app: ipsec-vpn
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ipsec-vpn
|
||||
spec:
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ipsec-vpn
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ipsec-vpn
|
||||
spec:
|
||||
containers:
|
||||
- name: ipsec-vpn
|
||||
image: hwdsl2/ipsec-vpn-server
|
||||
env:
|
||||
- name: VPN_USER
|
||||
value: happy
|
||||
- name: VPN_IPSEC_PSK
|
||||
value: hellovpn!!
|
||||
- name: VPN_PASSWORD
|
||||
value: AlwaysHappy!!
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["NET_ADMIN"]
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/ipsec.d
|
||||
- name: host-volumes
|
||||
mountPath: /lib/modules
|
||||
ports:
|
||||
- containerPort: 500
|
||||
protocol: UDP
|
||||
- containerPort: 4500
|
||||
protocol: UDP
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: ipsec-pvc
|
||||
- name: host-volumes
|
||||
hostPath:
|
||||
path: /lib/modules
|
||||
type: Directory
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
namespace: home-apps
|
||||
name: ipsec-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: nfs-client
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
Reference in New Issue
Block a user