mirror of
https://github.com/Traceworks2023/nxtgauge-gitops.git
synced 2026-06-11 14:00:10 +00:00
16 of 20 rust services were crashing on boot because their main.rs calls
std::env::var('PORT').expect(...). This commit adds the missing PORT env
to each deployment YAML, matching its containerPort (9100-9118).
Also adds BEECEPTOR_URL to the ConfigMap - the payments service requires
it for the mock payment gateway integration.
Adds apps/registry/ with retention script + CronJob (keep last 3 SHA
builds, preserve -latest aliases) to prevent the single-build wipeout
that caused the original registry outage.
AI assistant image also rebuilt: 2876b45 (main branch) - it was on a
ghost SHA tag that was GC'd.
33 lines
880 B
YAML
33 lines
880 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: registry-keep-last-3-builds
|
|
namespace: registry
|
|
spec:
|
|
schedule: "*/15 * * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 2
|
|
failedJobsHistoryLimit: 3
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 1
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: prune
|
|
image: python:3.12-alpine
|
|
command: ["python", "/scripts/prune.py"]
|
|
volumeMounts:
|
|
- name: script
|
|
mountPath: /scripts
|
|
- name: auth
|
|
mountPath: /auth
|
|
readOnly: true
|
|
volumes:
|
|
- name: script
|
|
configMap:
|
|
name: registry-retention-script
|
|
- name: auth
|
|
secret:
|
|
secretName: registry-regcred
|