Skip to content

catalog: prod (storefront v2 M2 / S1 promoted to production) - #136

Merged
MIERAI merged 1 commit into
mainfrom
catalog-prod
Nov 23, 2026
Merged

MIERAI merged 1 commit into
mainfrom
catalog-prod

Conversation

@MIERAI

@MIERAI MIERAI commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Promotion step 2 of S1 (storefront design doc §14.1), prod. Go/no-go gates passed (staging 3 h: browse/web SLOs 100 %, 0 errors, no alerts; catalog-staging ContinuousArchiving=True, backup completed; weekday 15:00 JST) — numbers in the change record (gitops NEXT.md §00).

  • catalog/app.yaml: prod with promotion: { from: staging, soak: 10m }; header comment updated
  • catalog/overlays/prod: copy of staging — namespace catalog-prod, NetworkPolicy web env prod, ObjectStore prefix s3://cnpg/catalog-prod, image tag 3182342
  • backup-s3 in catalog-prod: infrastructure-live offsite-backup: pin all three host keys of the phone #32 (already applied, targeted, 2 adds per cluster)
  • Created on both clusters (slo-platform has no per-cluster environments; accepted by the owner). Nothing calls it until storefront-prod sets CATALOG_URL (separate PR, after web is promoted to prod).

Render (slo-platform v0.1.2 render.py all, before = main, after = this branch):

cluster Applications new existing byte-identical root
laptop 26 → 28 catalog-prod, catalog-slo-prod 26/26 unchanged
lab 20 → 22 catalog-prod, catalog-slo-prod 20/20 unchanged

catalog-prod differs from catalog-staging only in namespace, backup prefix and NetworkPolicy env; catalog-slo-prod = catalog-slo-staging with env renamed. No platform.yaml / version change.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Rendered diff (as Argo CD renders: kustomize / Helm, against origin/main)

catalog-prod (+301 / -1)
@@ -1 +1,301 @@
-
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: catalog
+  namespace: catalog-prod
+spec:
+  ports:
+  - name: http
+    port: 8080
+    targetPort: http
+  selector:
+    app: catalog
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  annotations:
+    argocd.argoproj.io/sync-wave: "1"
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: catalog
+  namespace: catalog-prod
+spec:
+  replicas: 2
+  selector:
+    matchLabels:
+      app: catalog
+  strategy:
+    rollingUpdate:
+      maxSurge: 1
+      maxUnavailable: 0
+    type: RollingUpdate
+  template:
+    metadata:
+      labels:
+        app: catalog
+    spec:
+      containers:
+      - env:
+        - name: AUTH_MODE
+          value: none
+        - name: DATABASE_URL
+          valueFrom:
+            secretKeyRef:
+              key: uri
+              name: postgres-app
+        image: ghcr.io/mierai/storefront-catalog:3182342
+        livenessProbe:
+          failureThreshold: 6
+          httpGet:
+            path: /livez
+            port: http
+          periodSeconds: 20
+          timeoutSeconds: 5
+        name: catalog
+        ports:
+        - containerPort: 8080
+          name: http
+        - containerPort: 9090
+          name: metrics
+        readinessProbe:
+          httpGet:
+            path: /readyz
+            port: http
+          periodSeconds: 5
+          timeoutSeconds: 3
+        resources:
+          limits:
+            memory: 128Mi
+          requests:
+            cpu: 20m
+            memory: 24Mi
+        securityContext:
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop:
+            - ALL
+          readOnlyRootFilesystem: true
+      imagePullSecrets:
+      - name: ghcr-pull
+      initContainers:
+      - args:
+        - migrate
+        - up
+        env:
+        - name: DATABASE_URL
+          valueFrom:
+            secretKeyRef:
+              key: uri
+              name: postgres-app
+        image: ghcr.io/mierai/storefront-catalog:3182342
+        name: migrate
+        resources:
+          limits:
+            memory: 64Mi
+          requests:
+            cpu: 20m
+            memory: 16Mi
+        securityContext:
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop:
+            - ALL
+          readOnlyRootFilesystem: true
+      securityContext:
+        runAsGroup: 65532
+        runAsNonRoot: true
+        runAsUser: 65532
+        seccompProfile:
+          type: RuntimeDefault
+---
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: catalog
+  namespace: catalog-prod
+spec:
+  minAvailable: 1
+  selector:
+    matchLabels:
+      app: catalog
+---
+apiVersion: barmancloud.cnpg.io/v1
+kind: ObjectStore
+metadata:
+  annotations:
+    argocd.argoproj.io/sync-wave: "0"
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: backups
+  namespace: catalog-prod
+spec:
+  configuration:
+    data:
+      compression: gzip
+    destinationPath: s3://cnpg/catalog-prod
+    endpointURL: http://seaweedfs.object-storage:8333
+    s3Credentials:
+      accessKeyId:
+        key: ACCESS_KEY_ID
+        name: backup-s3
+      secretAccessKey:
+        key: ACCESS_SECRET_KEY
+        name: backup-s3
+    wal:
+      compression: gzip
+  instanceSidecarConfiguration:
+    resources:
+      limits:
+        memory: 512Mi
+      requests:
+        cpu: 10m
+        memory: 128Mi
+  retentionPolicy: 7d
+---
+apiVersion: monitoring.coreos.com/v1
+kind: PodMonitor
+metadata:
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: catalog
+  namespace: catalog-prod
+spec:
+  podMetricsEndpoints:
+  - interval: 15s
+    path: /metrics
+    port: metrics
+  podTargetLabels:
+  - app
+  selector:
+    matchLabels:
+      app: catalog
+---
+apiVersion: monitoring.coreos.com/v1
+kind: PodMonitor
+metadata:
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: postgres
+  namespace: catalog-prod
+spec:
+  podMetricsEndpoints:
+  - interval: 30s
+    port: metrics
+  selector:
+    matchLabels:
+      cnpg.io/cluster: postgres
+---
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: postgres
+  namespace: catalog-prod
+spec:
+  groups:
+  - name: catalog.postgres
+    rules:
+    - alert: PostgresWalArchivingFailing
+      annotations:
+        runbook: https://github.com/MIERAI/gitops-platform-blueprint/blob/main/docs/runbook.md#database-backups
+        summary: '{{ $labels.namespace }}/{{ $labels.pod }}: WAL archiving fails,
+          point-in-time recovery window is not advancing'
+      expr: increase(cnpg_pg_stat_archiver_failed_count[10m]) > 0
+      for: 10m
+      labels:
+        severity: ticket
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: catalog
+  namespace: catalog-prod
+spec:
+  ingress:
+  - from:
+    - namespaceSelector:
+        matchLabels:
+          slo-platform/app: storefront
+          slo-platform/env: prod
+      podSelector:
+        matchLabels:
+          app: web
+    - podSelector: {}
+    - namespaceSelector:
+        matchLabels:
+          kubernetes.io/metadata.name: monitoring
+    ports:
+    - port: http
+  - from:
+    - namespaceSelector:
+        matchLabels:
+          kubernetes.io/metadata.name: monitoring
+    ports:
+    - port: metrics
+  podSelector:
+    matchLabels:
+      app: catalog
+  policyTypes:
+  - Ingress
+---
+apiVersion: postgresql.cnpg.io/v1
+kind: Cluster
+metadata:
+  annotations:
+    argocd.argoproj.io/sync-wave: "0"
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: postgres
+  namespace: catalog-prod
+spec:
+  bootstrap:
+    initdb:
+      database: catalog
+      owner: catalog
+  imageName: ghcr.io/cloudnative-pg/postgresql:16.10
+  instances: 1
+  plugins:
+  - isWALArchiver: true
+    name: barman-cloud.cloudnative-pg.io
+    parameters:
+      barmanObjectName: backups
+  postgresql:
+    parameters:
+      max_connections: "50"
+      shared_buffers: 32MB
+  resources:
+    limits:
+      memory: 256Mi
+    requests:
+      cpu: 20m
+      memory: 96Mi
+  smartShutdownTimeout: 10
+  storage:
+    size: 1Gi
+---
+apiVersion: postgresql.cnpg.io/v1
+kind: ScheduledBackup
+metadata:
+  annotations:
+    argocd.argoproj.io/sync-wave: "1"
+  labels:
+    app.kubernetes.io/part-of: storefront
+  name: daily
+  namespace: catalog-prod
+spec:
+  backupOwnerReference: self
+  cluster:
+    name: postgres
+  immediate: true
+  method: plugin

@MIERAI
MIERAI merged commit d8b582c into main Nov 23, 2026
2 checks passed
@MIERAI
MIERAI deleted the catalog-prod branch November 23, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant