apiVersion: apps/v1 kind: Deployment metadata: name: fischerx-api namespace: fischerx labels: app: fischerx-api spec: replicas: 2 selector: matchLabels: app: fischerx-api strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 template: metadata: labels: app: fischerx-api spec: containers: - name: fischerx-api image: fischerx-api:latest imagePullPolicy: IfNotPresent ports: - containerPort: 3001 name: http env: - name: NODE_ENV valueFrom: configMapKeyRef: name: fischerx-config key: NODE_ENV - name: PORT valueFrom: configMapKeyRef: name: fischerx-config key: API_PORT - name: DATABASE_URL valueFrom: configMapKeyRef: name: fischerx-config key: DATABASE_URL - name: REDIS_HOST valueFrom: configMapKeyRef: name: fischerx-config key: REDIS_HOST - name: REDIS_PORT valueFrom: configMapKeyRef: name: fischerx-config key: REDIS_PORT - name: JWT_SECRET valueFrom: secretKeyRef: name: fischerx-secret key: JWT_SECRET resources: requests: cpu: "250m" memory: "512Mi" limits: cpu: "1000m" memory: "1Gi" livenessProbe: httpGet: path: /api/health port: 3001 initialDelaySeconds: 60 periodSeconds: 10 readinessProbe: httpGet: path: /api/health port: 3001 initialDelaySeconds: 30 periodSeconds: 5