renovate-ci / validate-renovate (push) Skipped
ci / lint-compose (push) Successful in 14s
ci / lint-actionlint (push) Successful in 6s
ci / lint-shellcheck (push) Successful in 13s
ci / lint-prettier (push) Successful in 19s
ci / lint-ruff (push) Successful in 9s
ci / lint-yaml (push) Successful in 10s
ci / lint-dockerfiles (push) Successful in 6s
ci / validate (push) Successful in 10s
ci / build (push) Successful in 30s
88 lines
2.5 KiB
YAML
88 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
reloader.stakater.com/auto: "true"
|
|
name: webinar-checker
|
|
namespace: edu-master
|
|
labels:
|
|
app: edu-master-webinar-checker
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: edu-master-webinar-checker
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
edu.forust.xyz/source-commit: "90829d6c8080b9928f9da23587678e640939e10a"
|
|
labels:
|
|
app: edu-master-webinar-checker
|
|
spec:
|
|
# Enforces dependency order like compose depends_on:
|
|
# redis healthy -> session-keeper healthy (EXISTS EDU_PHPSESSID)
|
|
initContainers:
|
|
- name: wait-deps
|
|
image: redis:8.10.2-alpine
|
|
env:
|
|
- name: REDISCLI_AUTH
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: edu-master-secrets
|
|
key: REDIS_PASSWORD
|
|
command:
|
|
- /bin/sh
|
|
- -ec
|
|
- |
|
|
i=0
|
|
until redis-cli -h redis ping | grep -q PONG; do
|
|
i=$((i+1))
|
|
[ "$i" -ge 300 ] && echo "TIMEOUT: redis not ready" && exit 1
|
|
sleep 2
|
|
done
|
|
echo "redis ok"
|
|
until [ "$(redis-cli -h redis EXISTS EDU_PHPSESSID)" = "1" ]; do
|
|
i=$((i+1))
|
|
[ "$i" -ge 300 ] && echo "TIMEOUT: no PHPSESSID (session-keeper down?)" && exit 1
|
|
sleep 2
|
|
done
|
|
echo "PHPSESSID ok"
|
|
containers:
|
|
- name: webinar-checker
|
|
image: gcr.forust.xyz/forust/webinar-checker@sha256:66c146f7b43cb9f0dc31ba9aa36d217e01df42ddafba5971b79c12ec215b2c01
|
|
ports:
|
|
- name: metrics
|
|
containerPort: 8000
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: metrics
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
failureThreshold: 12
|
|
initialDelaySeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /live
|
|
port: metrics
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 15
|
|
timeoutSeconds: 3
|
|
failureThreshold: 4
|
|
envFrom:
|
|
- secretRef:
|
|
name: edu-master-secrets
|
|
env:
|
|
- name: TZ
|
|
value: "Europe/Kyiv"
|
|
resources:
|
|
requests:
|
|
cpu: "50m"
|
|
memory: "192Mi"
|
|
limits:
|
|
cpu: "600m"
|
|
memory: "384Mi"
|