-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-deployment.yaml
83 lines (81 loc) · 2.4 KB
/
k8s-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: movies-go
labels:
app: movies-go
spec:
replicas: 1
selector:
matchLabels:
app: movies-go
template:
metadata:
name: movies-go
labels:
app: movies-go
spec:
shareProcessNamespace: true
securityContext:
runAsUser: 1
runAsGroup: 1
fsGroup: 1
containers:
- name: movies-go
image: zhangyicloud/movies-go:latest
imagePullPolicy: Always
env:
- name: DD_TRACE_ENABLED
value: "false"
- name: DD_PROFILING_ENABLED
value: "false"
- name: datakit
image: pubrepo.jiagouyun.com/datakit/datakit:1.6.0
imagePullPolicy: IfNotPresent
env:
- name: ENV_DATAWAY
value: "https://openway.guance.com?token=tkn_f5b2989ba6ab44bc988cf7e2aa4a6de3"
- name: ENV_DEFAULT_ENABLED_INPUTS
value: "container,ddtrace,profile,self"
- name: ENV_LOG
value: stdout
- name: ENV_GIN_LOG
value: stdout
- name: ENV_HTTP_LISTEN
value: "0.0.0.0:9529"
- name: datakit-profiler
image: pubrepo.jiagouyun.com/datakit-operator/go-pprof:latest
imagePullPolicy: Always
workingDir: /app/datakit-profiler
env:
- name: DK_AGENT_HOST # datakit listening host
value: "127.0.0.1"
- name: DK_AGENT_PORT # datakit listening port
value: "9529"
- name: DK_PROFILE_VERSION # user's app version
value: "1.2.333"
- name: DK_PROFILE_ENV # user's app run env
value: "prod"
- name: DK_PROFILE_DURATION # profiling duration at every time
value: "240"
- name: DK_PROFILE_SCHEDULE # profiling schedule plan
value: "*/20 * * * *"
command:
- "cmd.sh"
securityContext:
runAsUser: 1
runAsGroup: 1
capabilities:
add:
- SYS_PTRACE
- SYS_ADMIN
volumeMounts:
- mountPath: /etc/localtime
name: timezone
readOnly: true
restartPolicy: Always
volumes:
- name: timezone
hostPath:
path: /etc/localtime
type: FileOrCreate