diff --git a/apps-kustomized/esphome/deploy.yaml b/apps-kustomized/esphome/deploy.yaml new file mode 100644 index 0000000..cc0864f --- /dev/null +++ b/apps-kustomized/esphome/deploy.yaml @@ -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 diff --git a/apps-kustomized/esphome/pvc.yaml b/apps-kustomized/esphome/pvc.yaml new file mode 100644 index 0000000..8a8488a --- /dev/null +++ b/apps-kustomized/esphome/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: esphome-config +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + storageClassName: local-path-fast diff --git a/apps-kustomized/esphome/service.yaml b/apps-kustomized/esphome/service.yaml new file mode 100644 index 0000000..ca38289 --- /dev/null +++ b/apps-kustomized/esphome/service.yaml @@ -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 diff --git a/everything-app/esphome.yaml b/everything-app/esphome.yaml new file mode 100644 index 0000000..fcf6e11 --- /dev/null +++ b/everything-app/esphome.yaml @@ -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