-
Notifications
You must be signed in to change notification settings - Fork 28
/
apm-daemonset-pod-agent.yaml
148 lines (148 loc) · 4.72 KB
/
apm-daemonset-pod-agent.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# apm-daemonset-pod-agent.yaml
# 23.8.25
# Riverbed-Community-Toolkit (https://github.com/riverbed/Riverbed-Community-Toolkit)
#
# Description
#
# Deploy the APM Daemonset POD agent on a Kubernetes cluster
#
# Usage:
#
# 1. Customize the env variables in the container definition (container name: apm-daemonset-pod-agent)
#
# replace {{APM Daemonset POD agent image URI}} for example: 1234-5678-90.dkr.ecr.eu-west-3.amazonaws.com/alluvio-aternity-apm-daemonset-pod-agent:23.8
# replace {{ALLUVIO_ATERNITY_APM_CUSTOMER_ID}}, for example: 12341234-12341234-13241234
# replace {{ALLUVIO_ATERNITY_APM_SAAS_SERVER_HOST}} for example: agents.apm.my_environment.aternity.com
#
# 2. Apply
#
# kubectl apply -f apm-daemonset-pod-agent.yaml
#
# 3. Check resources status
#
# kubectl --namespace alluvio-aternity get daemonset
#
# kubectl --namespace alluvio-aternity get pod
#
# 4. Clean up
#
# kubectl delete -f apm-daemonset-pod-agent.yaml
#
---
apiVersion: v1
kind: Namespace
metadata:
name: alluvio-aternity
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
namespace: alluvio-aternity
name: apm-daemonset-pod-agent
labels:
app.kubernetes.io/name: daemonset-pod-agent
app.kubernetes.io/component: apm-agent
app.kubernetes.io/part-of: alluvio-aternity
spec:
selector:
matchLabels:
app.kubernetes.io/name: daemonset-pod-agent
app.kubernetes.io/component: apm-agent
app.kubernetes.io/part-of: alluvio-aternity
template:
metadata:
name: apm-daemonset-pod-agent
labels:
app.kubernetes.io/name: daemonset-pod-agent
app.kubernetes.io/component: apm-agent
app.kubernetes.io/part-of: alluvio-aternity
spec:
containers:
# TODO: Replace {{APM Daemonset POD agent image path}} with the actual value
- name: apm-daemonset-pod-agent
image : {{APM Daemonset POD agent image path}}
env:
# TODO: Replace {{ALLUVIO_ATERNITY_APM_CUSTOMER_ID}} and {{ALLUVIO_ATERNITY_APM_SAAS_SERVER_HOST}} with actual values
- name: ALLUVIO_ATERNITY_APM_CUSTOMER_ID
value: {{ALLUVIO_ATERNITY_APM_CUSTOMER_ID}}
- name: ALLUVIO_ATERNITY_APM_SAAS_SERVER_HOST
value: {{ALLUVIO_ATERNITY_APM_SAAS_SERVER_HOST}}
resources:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 2G
cpu: 1000m
ports:
- containerPort: 2111
hostPort: 2111
name: dsaport
protocol: TCP
- containerPort: 7071
hostPort: 7071
name: daport
protocol: TCP
- containerPort: 7072
hostPort: 7072
name: agentrtport
protocol: TCP
- containerPort: 7073
hostPort: 7073
name: profilerport
protocol: TCP
- containerPort: 7074
hostPort: 7074
name: cmxport
protocol: TCP
volumeMounts:
- name: alluvio-aternity-apm
mountPath: /opt
readOnly: false
- name: dockersocket
mountPath: /var/run/dockersocket
- name: pks-dockersocket
mountPath: /var/run/pks-dockersocket
- name: proc
mountPath: /host/proc
readOnly: true
- name: cgroup
mountPath: /host/sys/fs/cgroup
readOnly: true
securityContext:
privileged: true
readinessProbe:
exec:
command: ["/opt/Panorama/hedzup/mn/bin/agent","status"]
initialDelaySeconds: 15
periodSeconds: 30
timeoutSeconds: 30
failureThreshold: 3
volumes:
- name: alluvio-aternity-apm
hostPath:
# Must be a writable node path
path: /var/lib/toolbox/alluvio-aternity-apm
- name: dockersocket
hostPath:
path: /var/run/docker.sock
- name: pks-dockersocket
hostPath:
path: /var/vcap/data/sys/run/docker/docker.sock
- name: proc
hostPath:
path: /proc
- name: cgroup
hostPath:
path: /sys/fs/cgroup
hostNetwork: true
hostIPC: true
hostPID: true
dnsPolicy: ClusterFirstWithHostNet
tolerations:
- operator: "Exists"
effect: "NoSchedule"
- operator: "Exists"
effect: "NoExecute"
updateStrategy:
type: RollingUpdate