Files
ttl.sh/kustomize/overlays/dev/reaper.yaml
Salah Al Saleh 7624fbfa13 Add a dev env in Okteto (#128)
* add a dev env
2024-02-05 09:16:45 -08:00

62 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: ttl-reaper
labels:
app: ttl-reaper
spec:
selector:
matchLabels:
app: ttl-reaper
template:
metadata:
labels:
app: ttl-reaper
spec:
restartPolicy: Always
initContainers:
- name: wait-for-registry
image: quay.io/curl/curl:latest
command:
- sh
- -c
- |
until curl -s -o /dev/null -w "%{http_code}" ttl-registry:5000/v2/; do
echo "Waiting for Docker Registry to be ready..."
sleep 2
done
- name: wait-for-redis
image: redis:latest
command:
- sh
- -c
- |
until redis-cli -h ttl-redis -p 6379 ping | grep "PONG"; do
echo "Waiting for Redis to be ready..."
sleep 2
done
containers:
- name: ttl-reaper
image: ttl-reaper
ports:
- containerPort: 8000
env:
- name: REGISTRY_URL
value: http://ttl-registry:5000
- name: REDISCLOUD_URL
value: redis://ttl-redis:6379
---
apiVersion: v1
kind: Service
metadata:
name: ttl-reaper
labels:
app: ttl-reaper
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 8000
targetPort: 8000
selector:
app: ttl-reaper