From 3b3461fd3c4c5e64c0810a90d3b5e06fcaf3707c Mon Sep 17 00:00:00 2001 From: Hermes Agent service account Date: Fri, 12 Jun 2026 15:52:49 -0500 Subject: [PATCH] feat(platform): Add connections (signal-cli-rest-api) service - Deploy signal-cli-rest-api 0.85 for Hermes Signal notifications - Replace broken astro-orbiter VM (10.1.71.130:8080) with K8s service - ArgoCD-managed GitOps deployment in connections namespace - NFS-backed persistent storage for signal-cli state - Fixes UNREGISTERED_FAILURE affecting midday market cron job - Epcot-themed service (communication pavilion concept) Service endpoint: http://connections.connections.svc.cluster.local:8080 --- cluster/platform/connections/application.yaml | 35 ++++++++++ cluster/platform/connections/deployment.yaml | 67 +++++++++++++++++++ cluster/platform/connections/namespace.yaml | 8 +++ .../connections/persistentvolumeclaim.yaml | 16 +++++ cluster/platform/connections/service.yaml | 17 +++++ 5 files changed, 143 insertions(+) create mode 100644 cluster/platform/connections/application.yaml create mode 100644 cluster/platform/connections/deployment.yaml create mode 100644 cluster/platform/connections/namespace.yaml create mode 100644 cluster/platform/connections/persistentvolumeclaim.yaml create mode 100644 cluster/platform/connections/service.yaml diff --git a/cluster/platform/connections/application.yaml b/cluster/platform/connections/application.yaml new file mode 100644 index 0000000..f14d5e8 --- /dev/null +++ b/cluster/platform/connections/application.yaml @@ -0,0 +1,35 @@ +# ------------------------------------------------------------------------------ +# Platform: connections (Signal Gateway) +# Theme: epcot-connections (EPCOT: Communication & World Showcase) +# Wave 8 — Signal-cli REST API for Hermes notifications +# ------------------------------------------------------------------------------ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: connections + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "8" +spec: + project: default + source: + repoURL: https://gitea.mk-labs.cloud/rblundon/homelab.git + targetRevision: main + path: cluster/platform/connections + directory: + exclude: "application.yaml" + destination: + server: https://kubernetes.default.svc + namespace: connections + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + retry: + limit: 5 + backoff: + duration: 5s + factor: 2 + maxDuration: 3m diff --git a/cluster/platform/connections/deployment.yaml b/cluster/platform/connections/deployment.yaml new file mode 100644 index 0000000..8a9d103 --- /dev/null +++ b/cluster/platform/connections/deployment.yaml @@ -0,0 +1,67 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: connections + namespace: connections + labels: + app.kubernetes.io/name: connections + app.kubernetes.io/component: messaging-gateway + app.kubernetes.io/version: "0.85" # Pin version initially +spec: + replicas: 1 # MUST be 1 - signal-cli state is not multi-instance safe + strategy: + type: Recreate # Prevents dual mount of PVC + selector: + matchLabels: + app.kubernetes.io/name: connections + template: + metadata: + labels: + app.kubernetes.io/name: connections + app.kubernetes.io/component: messaging-gateway + spec: + securityContext: + fsGroup: 1000 + runAsUser: 1000 + runAsNonRoot: true + containers: + - name: signal-cli-rest-api + image: bbernhard/signal-cli-rest-api:0.85 # Pin version, test upgrades + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + name: http + protocol: TCP + env: + - name: MODE + value: "json-rpc" # json-rpc mode for API compatibility + volumeMounts: + - name: signal-data + mountPath: /home/.local/share/signal-cli + resources: + requests: + memory: "256Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "500m" + livenessProbe: + httpGet: + path: /v1/health + port: 8080 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /v1/health + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 2 + volumes: + - name: signal-data + persistentVolumeClaim: + claimName: signal-cli-data diff --git a/cluster/platform/connections/namespace.yaml b/cluster/platform/connections/namespace.yaml new file mode 100644 index 0000000..c5e55eb --- /dev/null +++ b/cluster/platform/connections/namespace.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: connections + labels: + app.kubernetes.io/name: connections + app.kubernetes.io/component: messaging-gateway + theme: epcot diff --git a/cluster/platform/connections/persistentvolumeclaim.yaml b/cluster/platform/connections/persistentvolumeclaim.yaml new file mode 100644 index 0000000..2f02198 --- /dev/null +++ b/cluster/platform/connections/persistentvolumeclaim.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: signal-cli-data + namespace: connections + labels: + app.kubernetes.io/name: connections + app.kubernetes.io/component: storage +spec: + accessModes: + - ReadWriteOnce + storageClassName: nfs-emporium # NFS CSI storage class + resources: + requests: + storage: 2Gi # signal-cli state is small, 2Gi provides headroom + volumeMode: Filesystem diff --git a/cluster/platform/connections/service.yaml b/cluster/platform/connections/service.yaml new file mode 100644 index 0000000..b3f1ab2 --- /dev/null +++ b/cluster/platform/connections/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: connections + namespace: connections + labels: + app.kubernetes.io/name: connections + app.kubernetes.io/component: messaging-gateway +spec: + type: ClusterIP + ports: + - port: 8080 + targetPort: 8080 + protocol: TCP + name: http + selector: + app.kubernetes.io/name: connections