pokeapi/Resources/k8s/kustomize/base/deployments/graphql-deployment.yaml

55 lines
1.7 KiB
YAML
Raw Normal View History

2021-05-27 17:25:40 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: graphql
labels:
component: graphql
spec:
replicas: 1
selector:
matchLabels:
component: graphql
template:
metadata:
labels:
component: graphql
spec:
initContainers:
- name: pokeapi-connection-checker
image: curlimages/curl:latest
2021-06-01 13:17:54 +00:00
command: ["sh", "-c"]
args:
- until curl -f -s --output /dev/null http://pokeapi:80/api/v2/; do
echo waiting for pokeapi;
sleep 2;
done;
2021-05-27 17:25:40 +00:00
containers:
- name: graphql-engine
2023-01-09 15:11:23 +00:00
image: hasura/graphql-engine:v2.16.1
2021-05-27 17:25:40 +00:00
ports:
- containerPort: 8080
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-env-secret
key: POSTGRES_PASSWORD
- name: HASURA_GRAPHQL_ADMIN_SECRET
valueFrom:
secretKeyRef:
name: graphql-env-secret
key: HASURA_GRAPHQL_ADMIN_SECRET
2021-05-27 17:25:40 +00:00
- name: HASURA_GRAPHQL_DATABASE_URL
value: postgres://ash:$(POSTGRES_PASSWORD)@postgresql:5432/pokeapi
- name: HASURA_GRAPHQL_ENABLE_CONSOLE
value: "true"
- name: HASURA_GRAPHQL_DEV_MODE
value: "false"
- name: HASURA_GRAPHQL_ENABLED_LOG_TYPES
value: startup, http-log, webhook-log, websocket-log, query-log
- name: HASURA_GRAPHQL_UNAUTHORIZED_ROLE
value: anon
- name: HASURA_GRAPHQL_ENABLE_TELEMETRY
value: "false"
resources: {}