Ship production deployment and runtime observability

This commit is contained in:
ms2k 2026-07-18 04:22:14 +09:00
commit 775dd61963

View file

@ -0,0 +1,61 @@
apiVersion: batch/v1
kind: Job
metadata:
name: @@JOB_NAME@@
namespace: remora-testbed
labels:
app.kubernetes.io/name: remora-deployment-test
spec:
backoffLimit: 0
activeDeadlineSeconds: 300
template:
metadata:
labels:
app.kubernetes.io/name: remora-deployment-test
spec:
restartPolicy: Never
automountServiceAccountToken: false
enableServiceLinks: false
dnsPolicy: None
dnsConfig:
nameservers: [10.96.0.53]
searches: [remora-testbed.svc.cluster.local, svc.cluster.local, cluster.local]
options:
- {name: ndots, value: "5"}
initContainers:
- name: smoke
image: @@CURL_IMAGE@@
imagePullPolicy: Never
command: [sh, -ec]
args:
- |
retry="--retry 30 --retry-all-errors --retry-delay 1"
test "$(curl $retry --silent --output /dev/null --write-out '%{http_code}' http://remora-remora-api-metrics:9090/health/ready)" = 200
test "$(curl $retry --silent --output /dev/null --write-out '%{http_code}' http://remora-remora-web/health/ready)" = 200
curl $retry --fail --silent http://remora-remora-api-metrics:9090/metrics | grep -q remora_background_runs_total
curl $retry --fail --silent http://remora-remora-web/runtime-config.js | grep -q '"oidcClientId":"remora-web"'
test "$(curl $retry --silent --output /dev/null --write-out '%{http_code}' http://remora-remora/v1/jobs)" = 401
if curl --connect-timeout 2 --max-time 5 --insecure --silent --fail https://remora-remora-worker:8443/internal/v1/jobs/x/claim >/dev/null 2>&1; then
exit 1
fi
resources:
requests: {cpu: 10m, memory: 16Mi}
limits: {cpu: 250m, memory: 64Mi}
containers:
- name: tests
image: @@TEST_IMAGE@@
imagePullPolicy: Never
envFrom:
- configMapRef:
name: @@PROFILE_NAME@@
env:
- {name: REMORA_DEPLOYMENT_API_URL, value: "http://remora-remora/v1"}
volumeMounts:
- {name: profile, mountPath: /run/remora-fixture, readOnly: true}
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {cpu: "2", memory: 1Gi}
volumes:
- name: profile
configMap:
name: @@PROFILE_NAME@@-file