initial commit
Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
commit
aca076e864
21 changed files with 1558 additions and 0 deletions
78
templates/homeassistant.yaml
Normal file
78
templates/homeassistant.yaml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: homeassistant
|
||||
labels:
|
||||
app: homeassistant
|
||||
spec:
|
||||
selector:
|
||||
app: homeassistant
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: http-port
|
||||
port: 8123
|
||||
targetPort: 8123
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: homeassistant-proxy
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: homeassistant
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: homeassistant
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
ports:
|
||||
- name: http-port
|
||||
containerPort: 8123
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: homeassistant-proxy-nginx-conf
|
||||
items:
|
||||
- key: nginx.conf
|
||||
path: nginx.conf
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: homeassistant-proxy-nginx-conf
|
||||
namespace: default
|
||||
data:
|
||||
nginx.conf: |
|
||||
worker_processes auto;
|
||||
events {
|
||||
worker_connections 2048;
|
||||
}
|
||||
http {
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
server {
|
||||
error_log stdout;
|
||||
access_log stdout;
|
||||
|
||||
listen 8123;
|
||||
listen [::]:8123;
|
||||
proxy_buffering off;
|
||||
location / {
|
||||
proxy_pass http://172.30.32.1:8123;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue