Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-20 20:57:42 +01:00
parent e8511f6e50
commit fa8ad5f2ff
4 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: esphome
name: esphome
spec:
selector:
matchLabels:
app.kubernetes.io/name: esphome
template:
metadata:
labels:
app.kubernetes.io/name: esphome
spec:
containers:
- env:
- name: ESPHOME_DASHBOARD_USE_PING
value: "true"
image: esphome/esphome:2022.12.3
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 6052
timeoutSeconds: 1
name: esphome
ports:
- containerPort: 6052
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 6052
timeoutSeconds: 1
startupProbe:
failureThreshold: 30
periodSeconds: 5
successThreshold: 1
tcpSocket:
port: 6052
timeoutSeconds: 1
volumeMounts:
- mountPath: /config
name: config
volumes:
- name: config
persistentVolumeClaim:
claimName: esphome-config

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: esphome-config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path-fast

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: esphome
annotations:
external-dns.alpha.kubernetes.io/hostname: esphome.martyn.berlin
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
selector:
app.kubernetes.io/name: esphome
type: LoadBalancer

View File

@ -0,0 +1,17 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: esphome
namespace: argocd
spec:
destination:
namespace: esphome
server: https://kubernetes.default.svc
project: apps
source:
path: apps-kustomized/esphome
repoURL: https://git.martyn.berlin/martyn/infra4talos
targetRevision: HEAD
syncPolicy:
automated:
selfHeal: true