diff --git a/kubernetes/apps/home-automation/kustomization.yaml b/kubernetes/apps/home-automation/kustomization.yaml index f63159cd..a05e7a24 100644 --- a/kubernetes/apps/home-automation/kustomization.yaml +++ b/kubernetes/apps/home-automation/kustomization.yaml @@ -7,4 +7,5 @@ resources: - ./namespace.yaml # Flux-Kustomizations - ./home-assistant/ks.yaml - - ./mosquitto/ks.yaml \ No newline at end of file + - ./matter-server/ks.yaml + - ./mosquitto/ks.yaml diff --git a/kubernetes/apps/home-automation/matter-server/app/helmrelease.yaml b/kubernetes/apps/home-automation/matter-server/app/helmrelease.yaml new file mode 100644 index 00000000..01134f52 --- /dev/null +++ b/kubernetes/apps/home-automation/matter-server/app/helmrelease.yaml @@ -0,0 +1,107 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: &app matter-server +spec: + interval: 15m + chart: + spec: + chart: app-template + version: 3.2.1 + interval: 15m + sourceRef: + kind: HelmRepository + name: bjw-s + namespace: flux-system + maxHistory: 3 + install: + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + strategy: rollback + retries: 3 + values: + controllers: + matter-server: + type: statefulset + annotations: + reloader.stakater.com/auto: "true" + pod: + annotations: + k8s.v1.cni.cncf.io/networks: | + [{ + "name":"multus-iot", + "namespace": "kube-system", + "ips": ["10.1.3.152/24"] + }] + securityContext: + runAsUser: 568 + runAsGroup: 568 + runAsNonRoot: true + fsGroup: 568 + fsGroupChangePolicy: OnRootMismatch + + containers: + app: + image: + repository: ghcr.io/home-assistant-libs/python-matter-server + tag: 6.0.1 + pullPolicy: IfNotPresent + env: + TZ: "America/Chicago" + MATTER_SERVER__INSTANCE_NAME: Matter-Server + MATTER_SERVER__PORT: &port 5580 + MATTER_SERVER__APPLICATION_URL: &host matter.jahanson.tech + MATTER_SERVER__LOG_LEVEL: info + probes: + liveness: + enabled: true + readiness: + enabled: true + startup: + enabled: true + spec: + failureThreshold: 30 + periodSeconds: 5 + resources: + requests: + memory: "100M" + limits: + memory: "500M" + service: + app: + controller: *app + type: LoadBalancer + annotations: + io.cilium/lb-ipam-ips: "10.1.1.37" + ports: + api: + enabled: true + primary: true + protocol: TCP + port: *port + externalTrafficPolicy: Cluster + persistence: + config: + enabled: true + existingClaim: matter-server + advancedMounts: + matter-server: + app: + - path: "/data" + ingress: + app: + className: internal-nginx + hosts: + - host: *host + paths: + - path: / + service: + identifier: app + port: http + tls: + - hosts: [*host] diff --git a/kubernetes/apps/home-automation/matter-server/app/kustomization.yaml b/kubernetes/apps/home-automation/matter-server/app/kustomization.yaml new file mode 100644 index 00000000..a928a563 --- /dev/null +++ b/kubernetes/apps/home-automation/matter-server/app/kustomization.yaml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml + - ../../../../templates/volsync diff --git a/kubernetes/apps/home-automation/matter-server/ks.yaml b/kubernetes/apps/home-automation/matter-server/ks.yaml new file mode 100644 index 00000000..99ac80f8 --- /dev/null +++ b/kubernetes/apps/home-automation/matter-server/ks.yaml @@ -0,0 +1,28 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app matter-server + namespace: flux-system +spec: + targetNamespace: home-automation + commonMetadata: + labels: + app.kubernetes.io/name: *app + dependsOn: + - name: openebs-cluster + - name: volsync + path: ./kubernetes/apps/home-automation/matter-server/app + prune: true + sourceRef: + kind: GitRepository + name: homelab + wait: false + interval: 30m + retryInterval: 1m + timeout: 5m + postBuild: + substitute: + APP: *app + VOLSYNC_CAPACITY: 1Gi