minimal hasura gql server + postgres k8s config
Test with: podman kube play deployment.yaml
This commit is contained in:
commit
4ed90a4403
1 changed files with 68 additions and 0 deletions
68
deployment.yaml
Normal file
68
deployment.yaml
Normal file
|
@ -0,0 +1,68 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: hasura
|
||||
hasuraService: custom
|
||||
name: hasura
|
||||
namespace: default
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hasura
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: hasura
|
||||
spec:
|
||||
containers:
|
||||
- image: hasura/graphql-engine:v2.13.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: graphql
|
||||
env:
|
||||
- name: HASURA_GRAPHQL_DATABASE_URL
|
||||
value: postgres://admin:admin@localhost:5432/hasura
|
||||
## enable the console served by server
|
||||
- name: HASURA_GRAPHQL_ENABLE_CONSOLE
|
||||
value: "true"
|
||||
## enable debugging mode. It is recommended to disable this in production
|
||||
- name: HASURA_GRAPHQL_DEV_MODE
|
||||
value: "true"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
- args:
|
||||
- postgres
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: admin
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: admin
|
||||
- name: POSTGRES_DB
|
||||
value: hasura
|
||||
image: docker.io/library/postgres:14
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
hostPort: 5432
|
||||
resources: {}
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- CAP_MKNOD
|
||||
- CAP_NET_RAW
|
||||
- CAP_AUDIT_WRITE
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: 287b935fc2bc82f82816c5ef9158c75fd769170f1d3395eac79be2e827c3fa4a-pvc
|
||||
enableServiceLinks: false
|
||||
hostname: pg
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: 287b935fc2bc82f82816c5ef9158c75fd769170f1d3395eac79be2e827c3fa4a-pvc
|
||||
persistentVolumeClaim:
|
||||
claimName: 287b935fc2bc82f82816c5ef9158c75fd769170f1d3395eac79be2e827c3fa4a
|
||||
status: {}
|
Loading…
Add table
Reference in a new issue