diff --git a/esphome/kustomization.yaml b/esphome/kustomization.yaml new file mode 100644 index 0000000..4ae436c --- /dev/null +++ b/esphome/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - main.yaml \ No newline at end of file diff --git a/esphome/main.yaml b/esphome/main.yaml new file mode 100644 index 0000000..473573b --- /dev/null +++ b/esphome/main.yaml @@ -0,0 +1,104 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: esphome + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: esphome + app.kubernetes.io/version: 1.18.0 + helm.sh/chart: esphome-8.4.2 + name: esphome +spec: + ports: + - name: http + port: 6052 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/instance: esphome + app.kubernetes.io/name: esphome + type: ClusterIP +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + app.kubernetes.io/instance: esphome + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: esphome + app.kubernetes.io/version: 1.18.0 + helm.sh/chart: esphome-8.4.2 + name: esphome-config +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: openebs-3-replicas +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: esphome + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: esphome + app.kubernetes.io/version: 1.18.0 + helm.sh/chart: esphome-8.4.2 + name: esphome +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app.kubernetes.io/instance: esphome + app.kubernetes.io/name: esphome + strategy: + type: Recreate + template: + metadata: + labels: + app.kubernetes.io/instance: esphome + app.kubernetes.io/name: esphome + spec: + automountServiceAccountToken: true + containers: + - image: esphome/esphome:2025.5.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + initialDelaySeconds: 0 + periodSeconds: 10 + tcpSocket: + port: 6052 + timeoutSeconds: 1 + name: esphome + ports: + - containerPort: 6052 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + initialDelaySeconds: 0 + periodSeconds: 10 + tcpSocket: + port: 6052 + timeoutSeconds: 1 + startupProbe: + failureThreshold: 30 + initialDelaySeconds: 0 + periodSeconds: 5 + tcpSocket: + port: 6052 + timeoutSeconds: 1 + volumeMounts: + - mountPath: /config + name: config + dnsPolicy: ClusterFirst + enableServiceLinks: true + serviceAccountName: default + volumes: + - name: config + persistentVolumeClaim: + claimName: esphome-config diff --git a/esphome/src/kustomization.yaml b/esphome/src/kustomization.yaml new file mode 100644 index 0000000..9e4f144 --- /dev/null +++ b/esphome/src/kustomization.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +helmCharts: + - name: esphome + repo: https://k8s-at-home.com/charts/ + version: 8.4.2 + releaseName: esphome + includeCRDs: true + namespace: esphome + valuesFile: values.yaml diff --git a/esphome/src/values.yaml b/esphome/src/values.yaml new file mode 100644 index 0000000..7371467 --- /dev/null +++ b/esphome/src/values.yaml @@ -0,0 +1,48 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml +# + +image: + # -- image repository + repository: esphome/esphome + # -- image pull policy + pullPolicy: IfNotPresent + # -- image tag + tag: 2025.5.0 + +# -- environment variables. +# @default -- See below +env: {} + # ESPHOME_DASHBOARD_USE_PING: true + # ESPHOME_DASHBOARD_RELATIVE_URL: "/" + # ESPHOME_QUICKWIZARD: + # ESPHOME_IS_HASSIO: + # DISABLE_HA_AUTHENTICATION: + # USERNAME: + # PASSWORD: + +# -- Configures service settings for the chart. +# @default -- See values.yaml +service: + main: + ports: + http: + port: 6052 + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See values.yaml + main: + enabled: false + +# -- Configure persistence settings for the chart under this key. +# @default -- See values.yaml +persistence: + config: + enabled: true + storageClass: openebs-3-replicas + accessMode: ReadWriteOnce + size: 1Gi \ No newline at end of file