diff --git a/kubernetes/apps/default/kustomization.yaml b/kubernetes/apps/default/kustomization.yaml index e614ca1f..db734fe9 100644 --- a/kubernetes/apps/default/kustomization.yaml +++ b/kubernetes/apps/default/kustomization.yaml @@ -13,6 +13,7 @@ resources: - ./it-tools/ks.yaml - ./linkwarden/ks.yaml - ./maintainerr/ks.yaml + - ./matter-server/ks.yaml - ./morphos/ks.yaml - ./omegabrr/ks.yaml - ./overseerr/ks.yaml diff --git a/kubernetes/apps/default/matter-server/app/gatus.yaml b/kubernetes/apps/default/matter-server/app/gatus.yaml new file mode 100644 index 00000000..d3e788a9 --- /dev/null +++ b/kubernetes/apps/default/matter-server/app/gatus.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: matter-server-gatus-ep + labels: + gatus.io/enabled: "true" +data: + config.yaml: | + endpoints: + - name: matter-server + group: infrastructure + url: ws://matter-server.default.svc.cluster.local:5580 + interval: 1m + ui: + hide-url: true + hide-hostname: true + conditions: + - "[CONNECTED] == true" + alerts: + - type: pushover diff --git a/kubernetes/apps/default/matter-server/app/helmrelease.yaml b/kubernetes/apps/default/matter-server/app/helmrelease.yaml new file mode 100644 index 00000000..569d8ac9 --- /dev/null +++ b/kubernetes/apps/default/matter-server/app/helmrelease.yaml @@ -0,0 +1,79 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: &app matter-server +spec: + interval: 30m + chart: + spec: + chart: app-template + version: 3.5.1 + sourceRef: + kind: HelmRepository + name: bjw-s + namespace: flux-system + install: + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + retries: 3 + strategy: rollback + values: + controllers: + matter-server: + annotations: + reloader.stakater.com/auto: "true" + containers: + app: + image: + repository: ghcr.io/home-assistant-libs/python-matter-server + tag: 6.6.1 + pullPolicy: IfNotPresent + env: + TZ: "America/Chicago" + MATTER_SERVER__INSTANCE_NAME: *app + MATTER_SERVER__PORT: &port 5580 + MATTER_SERVER__APPLICATION_URL: &host matter.jahanson.tech + MATTER_SERVER__LOG_LEVEL: debug + resources: + requests: + memory: "100Mi" + limits: + memory: "300Mi" + defaultPodOptions: + securityContext: + runAsNonRoot: true + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + fsGroupChangePolicy: OnRootMismatch + seccompProfile: { type: RuntimeDefault } + service: + app: + controller: matter-server + annotations: + external-dns.alpha.kubernetes.io/hostname: *host + io.cilium/lb-ipam-ips: 10.1.1.40 + ports: + http: + port: *port + ingress: + app: + className: internal-nginx + hosts: + - host: *host + paths: + - path: / + service: + identifier: app + port: *port + tls: + - hosts: + - *host + persistence: + data: + existingClaim: *app diff --git a/kubernetes/apps/default/matter-server/app/kustomization.yaml b/kubernetes/apps/default/matter-server/app/kustomization.yaml new file mode 100644 index 00000000..9d010a15 --- /dev/null +++ b/kubernetes/apps/default/matter-server/app/kustomization.yaml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./gatus.yaml + - ./helmrelease.yaml + - ../../../../templates/volsync diff --git a/kubernetes/apps/default/matter-server/ks.yaml b/kubernetes/apps/default/matter-server/ks.yaml new file mode 100644 index 00000000..4338a61c --- /dev/null +++ b/kubernetes/apps/default/matter-server/ks.yaml @@ -0,0 +1,24 @@ +--- +# 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: default + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./kubernetes/apps/default/matter-server/app + prune: true + sourceRef: + kind: GitRepository + name: theshire + wait: false # no flux ks dependents + interval: 30m + timeout: 5m + postBuild: + substitute: + APP: *app + VOLSYNC_CAPACITY: 1Gi