# Draft scaffold only (not production-ready app image) # Purpose: establish k8s shape for bridge v1.1 deployment in namespace shard. apiVersion: v1 kind: ConfigMap metadata: name: chattr-bridge-config namespace: shard data: BRIDGE_ACTOR_IDS: "dingo,shard,prime" BRIDGE_DEFAULT_CHANNEL: "general" BRIDGE_UNMENTIONED_POLICY: "fanout_all" BRIDGE_MAX_HOPS: "4" BRIDGE_DEDUPE_TTL_SEC: "600" BRIDGE_HANDOFF_INACTIVITY_MIN: "30" BRIDGE_HANDOFF_MAX_MSGS: "40" BRIDGE_HANDOFF_MAX_PAYLOAD_KB: "16" BRIDGE_RELAY_COOLDOWN_SEC: "5" BRIDGE_ADAPTER_TIMEOUT_SEC: "45" BRIDGE_POLL_INTERVAL_MS: "1000" BRIDGE_LOG_LEVEL: "info" BRIDGE_DB_PATH: "/var/lib/chattr-bridge/bridge.db" SHARD_ADAPTER_URL: "http://shard-adapter.shard.svc.cluster.local:8081/ingest" # PRIME_ADAPTER_URL may be internal service or external URL depending on Prime host reachability. # If external, ensure network policy + auth + TLS are configured. PRIME_ADAPTER_URL: "http://prime-adapter.shard.svc.cluster.local:8081/ingest" CHATTR_BASE_URL: "https://chattr.aeternalisgames.com" --- apiVersion: v1 kind: Secret metadata: name: chattr-bridge-secrets namespace: shard type: Opaque stringData: BRIDGE_SHARED_SIGNING_KEY: "REPLACE_ME" CHATTR_API_TOKEN: "REPLACE_ME" --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: chattr-bridge-state namespace: shard spec: accessModes: ["ReadWriteOnce"] resources: requests: storage: 2Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: chattr-bridge namespace: shard labels: app: chattr-bridge spec: replicas: 1 selector: matchLabels: app: chattr-bridge template: metadata: labels: app: chattr-bridge spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault containers: - name: bridge # Replace with actual built image once implementation exists image: ghcr.io/aeternalisgames/chattr-bridge:v1.1-draft imagePullPolicy: IfNotPresent envFrom: - configMapRef: name: chattr-bridge-config - secretRef: name: chattr-bridge-secrets ports: - name: http containerPort: 8080 securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: ["ALL"] volumeMounts: - name: state mountPath: /var/lib/chattr-bridge readinessProbe: httpGet: path: /readyz port: 8080 initialDelaySeconds: 8 periodSeconds: 10 livenessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 20 periodSeconds: 20 resources: requests: cpu: 100m memory: 128Mi limits: cpu: 1 memory: 512Mi volumes: - name: state persistentVolumeClaim: claimName: chattr-bridge-state --- apiVersion: v1 kind: Service metadata: name: chattr-bridge namespace: shard spec: selector: app: chattr-bridge ports: - name: http port: 8080 targetPort: 8080 --- # Optional ingress only if you need external callbacks into bridge. apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: chattr-bridge-ingress namespace: shard annotations: cert-manager.io/cluster-issuer: letsencrypt-godaddy nginx.ingress.kubernetes.io/ssl-redirect: "true" spec: ingressClassName: nginx rules: - host: bridge.aeternalisgames.com http: paths: - path: / pathType: Prefix backend: service: name: chattr-bridge port: number: 8080 tls: - hosts: ["bridge.aeternalisgames.com"] secretName: bridge-aeternalisgames-tls