-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathkubernetes-deployment.yaml
92 lines (91 loc) · 2.14 KB
/
kubernetes-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hasura-proxy-internal
labels:
app: hasura-proxy-internal
type: support
spec:
replicas: 2
selector:
matchLabels:
app: hasura-proxy-internal
type: support
template:
metadata:
labels:
app: hasura-proxy-internal
type: support
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9393"
prometheus.io/path: "/metrics"
spec:
securityContext:
runAsUser: 65534 # nobody
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/worker
operator: Exists
containers:
- name: graphql-proxy
image: ghcr.io/lukaszraczylo/graphql-monitoring-proxy:latest
imagePullPolicy: Always
resources:
limits:
cpu: "1"
memory: "640Mi"
requests:
cpu: "0.75"
memory: "512Mi"
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
ports:
- name: web
containerPort: 8080
- name: monitoring
containerPort: 9393
env:
- name: PORT_GRAPHQL
value: "8080"
- name: MONITORING_PORT
value: "9393"
- name: HOST_GRAPHQL
value: http://hasura-internal:8080/v1/graphql
- name: ENABLE_GLOBAL_CACHE
value: "true"
- name: CACHE_TTL
value: "10"
- name: BLOCK_SCHEMA_INTROSPECTION
value: "true"
---
apiVersion: v1
kind: Service
metadata:
name: hasura-proxy-internal
labels:
app: hasura-proxy-internal
type: support
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9393"
prometheus.io/path: "/metrics"
spec:
ports:
- name: web
port: 8080
targetPort: 8080
- name: monitoring
port: 9393
targetPort: 9393
selector:
app: hasura-proxy-internal
type: support
type: ClusterIP