mirror of
https://github.com/replicatedhq/ttl.sh.git
synced 2026-07-12 07:39:19 +00:00
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ttl-hooks
|
|
labels:
|
|
app: ttl-hooks
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: ttl-hooks
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ttl-hooks
|
|
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-hooks
|
|
image: ttl-hooks
|
|
ports:
|
|
- containerPort: 8000
|
|
env:
|
|
- name: REDISCLOUD_URL
|
|
value: redis://ttl-redis:6379
|
|
- name: HOOK_TOKEN
|
|
value: dev-hook-token
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ttl-hooks
|
|
labels:
|
|
app: ttl-hooks
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8000
|
|
targetPort: 8000
|
|
selector:
|
|
app: ttl-hooks |