Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add homebridge #229

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Add homebridge #229

wants to merge 13 commits into from

Conversation

volschin
Copy link
Owner

@volschin volschin commented Jul 2, 2024

@volschin volschin linked an issue Jul 2, 2024 that may be closed by this pull request
@volschin volschin force-pushed the Homebridge branch 2 times, most recently from 3ce4e37 to d7dc2ba Compare July 19, 2024 09:09
Copy link

github-actions bot commented Jul 19, 2024

--- kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/homebridge

+++ kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/homebridge

@@ -0,0 +1,42 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: homebridge
+  namespace: flux-system
+spec:
+  commonMetadata:
+    labels:
+      app.kubernetes.io/name: homebridge
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  dependsOn:
+  - name: external-secrets-stores
+  interval: 120m
+  path: ./kubernetes/apps/home/homebridge/app
+  postBuild:
+    substitute:
+      APP: homebridge
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+    - kind: ConfigMap
+      name: cluster-user-settings
+      optional: true
+    - kind: Secret
+      name: cluster-user-secrets
+      optional: true
+  prune: true
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: home
+  wait: true
+
--- kubernetes/apps/home/homebridge/app Kustomization: flux-system/homebridge HelmRelease: home/homebridge

+++ kubernetes/apps/home/homebridge/app Kustomization: flux-system/homebridge HelmRelease: home/homebridge

@@ -0,0 +1,134 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: homebridge
+    kustomize.toolkit.fluxcd.io/name: homebridge
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: homebridge
+  namespace: home
+spec:
+  chartRef:
+    kind: OCIRepository
+    name: app-template
+    namespace: flux-system
+  install:
+    remediation:
+      retries: 3
+  interval: 60m
+  maxHistory: 3
+  uninstall:
+    keepHistory: false
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+  values:
+    configMaps:
+      config:
+        data:
+          startup.sh: |-
+            #!/bin/sh
+            npm install --save homebridge-dummy@latest
+            npm install --save homebridge-myq@latest
+            npm install --save homebridge-nest@latest
+            npm install --save homebridge-orbit-irrigation@latest
+            npm install --save homebridge-tplink-smarthome@latest
+            npm install --save -g homebridge-camera-ui@latest
+        enabled: true
+        nameOverride: startup-sh
+    controllers:
+      main:
+        annotations:
+          reloader.stakater.com/auto: 'true'
+        containers:
+          main:
+            env:
+              ENABLE_AVAHI: '1'
+              HOMEBRIDGE_CONFIG_UI: '1'
+              HOMEBRIDGE_CONFIG_UI_PORT: '8080'
+              TZ: Europe/Berlin
+            image:
+              repository: docker.io/homebridge/homebridge
+              tag: 2024-06-27@sha256:be09c4402c351520069014ba77a6d12f22021294c04125b827a8e7cb5b79b9da
+            probes:
+              liveness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /
+                    port: 8581
+                  initialDelaySeconds: 30
+                  periodSeconds: 10
+                  timeoutSeconds: 2
+              readiness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /
+                    port: 8581
+                  initialDelaySeconds: 30
+                  periodSeconds: 10
+                  timeoutSeconds: 2
+              startup:
+                enabled: false
+            resources:
+              limits:
+                memory: 750Mi
+              requests:
+                cpu: 10m
+                memory: 100Mi
+        strategy: Recreate
+    defaultPodOptions:
+      dnsPolicy: ClusterFirstWithHostNet
+      hostNetwork: true
+    ingress:
+      main:
+        annotations:
+          external-dns.alpha.kubernetes.io/target: internal...PLACEHOLDER..
+          gethomepage.dev/description: "FHEM f\xFCr iPhone"
+          gethomepage.dev/enabled: 'true'
+          gethomepage.dev/group: Apple HomeKit
+          gethomepage.dev/icon: homebridge.svg
+          gethomepage.dev/name: Homebridge FHEM
+          gethomepage.dev/widget.fields: '["updates", "child_bridges"]'
+          gethomepage.dev/widget.password: externalsecret
+          gethomepage.dev/widget.type: homebridge
+          gethomepage.dev/widget.url: http://homebridge.home
+          gethomepage.dev/widget.username: externalsecret
+          nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
+        className: internal
+        enabled: true
+        hosts:
+        - host: homebridge...PLACEHOLDER..
+          paths:
+          - path: /
+            service:
+              name: main
+              port: http
+        tls:
+          hosts:
+          - homebridge...PLACEHOLDER..
+    persistence:
+      homebridge:
+        enabled: true
+        existingClaim: homebridge-config
+      startup-sh:
+        enabled: true
+        globalMounts:
+        - defaultMode: 493
+          path: /homebridge/startup.sh
+          subPath: startup.sh
+        name: homebridge-startup-sh
+        type: configMap
+    service:
+      main:
+        ports:
+          http:
+            port: 8581
+
--- kubernetes/apps/home/homebridge/app Kustomization: flux-system/homebridge PersistentVolumeClaim: home/homebridge-config

+++ kubernetes/apps/home/homebridge/app Kustomization: flux-system/homebridge PersistentVolumeClaim: home/homebridge-config

@@ -0,0 +1,20 @@

+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  labels:
+    app.kubernetes.io/instance: homebridge
+    app.kubernetes.io/name: homebridge
+    kustomize.toolkit.fluxcd.io/name: homebridge
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+    snapshot.home.arpa/enabled: 'true'
+  name: homebridge-config
+  namespace: home
+spec:
+  accessModes:
+  - ReadWriteOnce
+  resources:
+    requests:
+      storage: 250Mi
+  storageClassName: openebs-zfspv-ssd
+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: try to run homebridge on talos
1 participant