Payee Bench

Overview

Payee Bench (码上交付) is a single-instance Alipay redemption-code shop deployed to 72602 through the ops-docs GitOps Application. Public host is https://pay.72602.space; state is SQLite on a local-path PVC.

  • ArgoCD Application: parent argocd/ops-docs applies manifests/payee-bench/
  • Namespace: payee-bench
  • Image: docker.io/library/payee-bench:16593f2 (imported into k3s containerd)
  • Service: payee-bench (port 3000, ClusterIP)
  • Ingress: pay.72602.space (TLS via lets-encrypt)
  • Database: PVC payee-bench-data (1Gi, local-path), /app/data/shop.sqlite

Subsections of Payee Bench

Install (ArgoCD)

🚀Installation

Environment
Install By

Preliminary

1. Kubernetes is installed; if not, check 🔗link


2. Helm is installed; if not, check 🔗link


3. ArgoCD is installed; if not, check 🔗link


1.prepare `payee-bench-runtime`

Build the Secret from the protected runtime env file, never from arguments or Git:

Details
kubectl create namespace payee-bench --dry-run=client -o yaml | kubectl apply -f -
kubectl -n payee-bench create secret generic payee-bench-runtime \
  --from-env-file=/home/aaron/.payee-bench-migrate/runtime.env \
  --dry-run=client -o yaml | kubectl apply -f -

Keep CARD_ENCRYPTION_KEY fixed for the life of the database. The Secret holds the Alipay app id, seller id, app private key, Alipay public key, APP_SECRET, and the admin password.

2.prepare image

The 72602 node has no registry login, so build and import into containerd:

Details
git clone https://github.com/AaronYang0628/payee-bench.git /home/aaron/build/payee-bench
cd /home/aaron/build/payee-bench
git checkout --detach 16593f2
podman build --format docker --network=host \
  --build-arg HTTP_PROXY=http://192.168.0.25:17890 \
  --build-arg HTTPS_PROXY=http://192.168.0.25:17890 \
  -t docker.io/library/payee-bench:16593f2 .
podman save --format oci-archive -o /tmp/payee-bench-16593f2.tar docker.io/library/payee-bench:16593f2
sudo k3s ctr -n k8s.io images import /tmp/payee-bench-16593f2.tar

3.prepare `manifests/payee-bench`

The parent ops-docs Application reads manifests/kustomization.yaml; its resources list must include every top-level file plus payee-bench/namespace.yaml, pvc.yaml, deployment.yaml, service.yaml, and ingress.yaml. The Namespace carries sync-wave -1.

4.sync by argocd

Details
argocd app get ops-docs --hard-refresh
argocd app wait ops-docs --sync --health --timeout 300

5.verify

Details
kubectl -n payee-bench rollout status deployment/payee-bench --timeout=300s
kubectl -n payee-bench get pods,svc,ingress,pvc,certificate
curl -fsS https://pay.72602.space/api/health
curl -fsS https://pay.72602.space/api/config

/api/config must report mode=production and paymentConfigured=true. Deleting the Pod must leave the product and stock intact; the PVC is payee-bench-data.

🛎️FAQ

Q1: payment gateway fails after deploy

The Pod needs direct egress to openapi.alipay.com:443. Verify with a signed alipay.trade.query through the app; a confirmationPending response indicates the request or response verification failed. Do not rotate CARD_ENCRYPTION_KEY to fix payment errors.