-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
128 lines (127 loc) · 2.83 KB
/
k8s.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: es-data-claim
annotations:
volume.alpha.kubernetes.io/storage-class: default
spec:
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
labels:
name: elasticsearch
spec:
ports:
- port: 9200
selector:
app: elasticsearch
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: elasticsearch
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.1
imagePullPolicy: Always
ports:
- containerPort: 9200
env:
- name: ES_JAVA_OPTS
value: "-Xms128m -Xmx128m -XX:-AssumeMP -XX:-UseConcMarkSweepGC"
- name: discovery.type
value: single-node
readinessProbe:
httpGet:
path: /
port: 9200
initialDelaySeconds: 30
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /
port: 9200
initialDelaySeconds: 30
timeoutSeconds: 3
resources:
requests:
memory: 250Mi
cpu: 100m
limits:
memory: 750Mi
cpu: 500m
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: es-data
securityContext:
runAsUser: 1000
fsGroup: 1000
volumes:
- name: es-data
persistentVolumeClaim:
claimName: es-data-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: triweb-media
name: triweb-media
namespace: default
spec:
progressDeadlineSeconds: 60
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: triweb-media
strategy:
rollingUpdate:
maxSurge: 2
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: triweb-media
spec:
containers:
- env:
- name: ES_URL
value: http://elasticsearch:9200
- name: ES_INDEX
value: triweb-media
image: gcr.io/trinitynashville-188115/media:20200505114824-f125631
imagePullPolicy: Always
name: triweb-media
ports:
- containerPort: 9000
protocol: TCP
resources:
limits:
cpu: 250m
memory: 400Mi
requests:
cpu: 100m
memory: 128Mi
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30