update at 2024-03-08 15:27:13
parent
271a41fd7c
commit
122060d721
|
@ -0,0 +1,49 @@
|
|||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
labels:
|
||||
app: home-assistant
|
||||
name: home-assistant
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: home-assistant
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: home-assistant
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 1
|
||||
containers:
|
||||
- image: homeassistant/home-assistant:stable
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: home-assistant
|
||||
ports:
|
||||
- containerPort: 8123
|
||||
name: web
|
||||
env:
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: config
|
||||
- mountPath: /run/dbus
|
||||
name: dbus
|
||||
readOnly: true
|
||||
dnsPolicy: Default
|
||||
hostNetwork: true
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: config
|
||||
hostPath:
|
||||
path: /data/home-assistant/config
|
||||
type: DirectoryOrCreate
|
||||
- name: dbus
|
||||
hostPath:
|
||||
path: /run/dbus
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 0
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
|
@ -0,0 +1,34 @@
|
|||
# 智能家居助手:HomeAssistant
|
||||
|
||||
## 开源项目
|
||||
|
||||
项目地址:https://github.com/home-assistant/core
|
||||
官网:https://www.home-assistant.io/
|
||||
|
||||
## 目录结构
|
||||
|
||||
```txt
|
||||
home-assistant
|
||||
├── daemonset.yaml
|
||||
└── kustomization.yaml
|
||||
```
|
||||
|
||||
## 准备 daemonset.yaml
|
||||
|
||||
<FileBlock showLineNumbers title="daemonset.yaml" file="home-network/home-assistant.yaml" />
|
||||
|
||||
## 准备 kustomization.yaml
|
||||
|
||||
```txt
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- daemonset.yaml
|
||||
|
||||
namespace: default
|
||||
```
|
||||
|
||||
## 访问 HomeAssistant
|
||||
|
||||
访问入口:http://`路由器内网 IP`:8123/
|
Loading…
Reference in New Issue