forked from zincsearch/zincsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkube-deployment.yaml
90 lines (85 loc) · 1.72 KB
/
kube-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
# create namespace
apiVersion: v1
kind: Namespace
metadata:
name: zinc
labels:
name: zinc
---
apiVersion: v1
kind: Service
metadata:
name: z
namespace: zinc
spec:
clusterIP: None
selector:
app: zinc
ports:
- name: http
port: 4080
targetPort: 4080
---
# create statefulset
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: zinc
namespace: zinc
labels:
name: zinc
spec:
serviceName: z
replicas: 1
selector:
matchLabels:
name: zinc
app: zinc
template:
metadata:
labels:
name: zinc
app: zinc
spec:
securityContext:
fsGroup: 2000
runAsUser: 10000
runAsGroup: 3000
runAsNonRoot: true
# terminationGracePeriodSeconds: 0
containers:
- name: zinc
image: public.ecr.aws/m5j1b6u0/zinc:v0.1.1
env:
- name: FIRST_ADMIN_USER
value: admin
- name: FIRST_ADMIN_PASSWORD
value: Complexpass#123
- name: DATA_PATH
value: /go/bin/data
# command: ["/bin/bash", "-c", "while true; do sleep 1; done"]
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 1024m
memory: 512Mi
requests:
cpu: 32m
memory: 50Mi
ports:
- containerPort: 4080
name: http
volumeMounts:
- name: data
mountPath: /go/bin/data
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
# storageClassName: default
# NOTE: You can increase the storage size
resources:
requests:
storage: 10Gi