chore(examples): drop orphaned Redis from HSM deploy examples (#15)
The current KMS is a pure Go binary. Per DEPRECATED.md the Node.js + PostgreSQL + Redis Infisical fork was replaced — "no Node.js / Postgres / Redis dependencies." The KMS Go runtime contains zero Redis references; the `REDIS_URL` / `REDIS_HOST` knobs in these examples were leftover from the deprecated stack and are never read. Remove the orphaned Redis declarations from the three HSM compose examples and the Zymbit k8s manifest: - zymbit-hsm/compose.yml: redis service, REDIS_URL env, depends_on, volume - zymbit-hsm/kubernetes-deployment.yaml: Redis Deployment/Service/PVC, REDIS_HOST/PORT ConfigMap keys, redis egress NetworkPolicy rule - aws-cloudhsm/compose.yml: redis service, REDIS_URL env, depends_on, volume - google-cloud-hsm/compose.yml: redis service, REDIS_URL env, depends_on, volume No consumer migration needed — nothing read Redis. Postgres left intact.
This commit is contained in:
@@ -35,9 +35,6 @@ services:
|
||||
PORT: "8080"
|
||||
DB_CONNECTION_STRING: "postgresql://kms:password@postgres:5432/kms"
|
||||
|
||||
# Redis for session management
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
|
||||
# Logging
|
||||
LOG_LEVEL: "info"
|
||||
|
||||
@@ -56,7 +53,6 @@ services:
|
||||
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
# Health check
|
||||
healthcheck:
|
||||
@@ -96,22 +92,6 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Redis for caching and sessions
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: lux-kms-redis
|
||||
restart: unless-stopped
|
||||
command: redis-server --appendonly yes --requirepass "${REDIS_PASSWORD}"
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
networks:
|
||||
- kms-internal
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
# Optional: CloudHSM client sidecar (for initialization tasks)
|
||||
cloudhsm-client:
|
||||
image: amazonlinux:2
|
||||
@@ -135,5 +115,3 @@ volumes:
|
||||
driver: local
|
||||
postgres-data:
|
||||
driver: local
|
||||
redis-data:
|
||||
driver: local
|
||||
|
||||
@@ -30,9 +30,6 @@ services:
|
||||
# Database Configuration
|
||||
- DB_CONNECTION_URI=${DB_CONNECTION_URI}
|
||||
|
||||
# Redis Configuration
|
||||
- REDIS_URL=${REDIS_URL:-redis://redis:6379}
|
||||
|
||||
# Monitoring
|
||||
- ENABLE_METRICS=${ENABLE_METRICS:-true}
|
||||
- METRICS_PORT=9090
|
||||
@@ -56,7 +53,6 @@ services:
|
||||
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
networks:
|
||||
- lux-kms-network
|
||||
@@ -90,25 +86,6 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: lux-kms-redis
|
||||
restart: unless-stopped
|
||||
|
||||
command: redis-server --appendonly yes
|
||||
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
networks:
|
||||
- lux-kms-network
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
# Optional: Prometheus for metrics collection
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
@@ -173,8 +150,6 @@ volumes:
|
||||
driver: local
|
||||
postgres-data:
|
||||
driver: local
|
||||
redis-data:
|
||||
driver: local
|
||||
prometheus-data:
|
||||
driver: local
|
||||
grafana-data:
|
||||
|
||||
@@ -38,9 +38,6 @@ services:
|
||||
# Database
|
||||
DB_CONNECTION_URI: "postgresql://kms:password@postgres:5432/kms"
|
||||
|
||||
# Redis (optional)
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
|
||||
# Secrets (use Docker secrets in production)
|
||||
env_file:
|
||||
- .env.secrets # Contains HSM_PIN, ENCRYPTION_KEY, AUTH_SECRET
|
||||
@@ -53,8 +50,6 @@ services:
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
# Health check
|
||||
healthcheck:
|
||||
@@ -84,28 +79,9 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Redis Cache
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: kms-redis
|
||||
restart: unless-stopped
|
||||
|
||||
command: redis-server --appendonly yes
|
||||
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
driver: local
|
||||
redis-data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
default:
|
||||
|
||||
@@ -38,10 +38,6 @@ data:
|
||||
DB_NAME: "kms"
|
||||
DB_USER: "kms"
|
||||
|
||||
# Redis Configuration
|
||||
REDIS_HOST: "redis-service"
|
||||
REDIS_PORT: "6379"
|
||||
|
||||
---
|
||||
# Secret for sensitive configuration
|
||||
apiVersion: v1
|
||||
@@ -157,77 +153,6 @@ spec:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
|
||||
---
|
||||
# Redis Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: kms-zymbit
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
volumeMounts:
|
||||
- name: redis-storage
|
||||
mountPath: /data
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["redis-cli", "ping"]
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["redis-cli", "ping"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
volumes:
|
||||
- name: redis-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: redis-pvc
|
||||
|
||||
---
|
||||
# Redis Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-service
|
||||
namespace: kms-zymbit
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
# Redis PVC
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: redis-pvc
|
||||
namespace: kms-zymbit
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
|
||||
---
|
||||
# KMS Deployment with Zymbit HSM
|
||||
apiVersion: apps/v1
|
||||
@@ -402,13 +327,6 @@ spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
- to: # Allow DNS
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
|
||||
Reference in New Issue
Block a user