cloudwise-apm-euspace.yaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. apiVersion: v1
  2. kind: Namespace
  3. metadata:
  4. name: cloudwise
  5. ---
  6. apiVersion: apps/v1
  7. kind: DaemonSet
  8. metadata:
  9. name: cloudwise-apm-euspace
  10. namespace: cloudwise
  11. spec:
  12. selector:
  13. matchLabels:
  14. app: cloudwise-apm-euspace
  15. template:
  16. metadata:
  17. annotations:
  18. container.apparmor.security.beta.kubernetes.io/cloudwise-apm-euspace: unconfined
  19. name: cloudwise-apm-euspace
  20. namespace: cloudwise
  21. labels:
  22. app: cloudwise-apm-euspace
  23. spec:
  24. hostPID: true
  25. nodeSelector:
  26. kubernetes.io/os: linux
  27. kubernetes.io/arch: amd64
  28. containers:
  29. - name: cloudwise-apm-euspace
  30. image: harbor.cloudwise.com/apm/euspace_dev:1.2
  31. imagePullPolicy: Always
  32. # imagePullPolicy: IfNotPresent
  33. args: ["--listen", "0.0.0.0:8123", "--cgroupfs-root", "/host/sys/fs/cgroup","--run-in-container"]
  34. ports:
  35. - containerPort: 8123
  36. name: http
  37. securityContext:
  38. privileged: true
  39. runAsUser: 0
  40. volumeMounts:
  41. - name: sys-fs-cgroup
  42. mountPath: /host/sys/fs/cgroup
  43. readOnly: true
  44. - name: sys-kernel-debug
  45. mountPath: /sys/kernel/debug
  46. readOnly: true
  47. - name: host-usr
  48. mountPath: /host/usr
  49. readOnly: true
  50. mountPropagation: HostToContainer
  51. - name: host-var
  52. mountPath: /host/var
  53. readOnly: false
  54. mountPropagation: HostToContainer
  55. - name: host-run
  56. mountPath: /host/run
  57. readOnly: false
  58. mountPropagation: HostToContainer
  59. - name: host-tmp
  60. mountPath: /host/tmp
  61. readOnly: false
  62. mountPropagation: HostToContainer
  63. env:
  64. - name: SEND
  65. value: '1'
  66. - name: TRACES_ENDPOINT
  67. value: 'http://10.0.16.250:18080/docp/api/v2/data/receive'
  68. - name: FILTER_PID
  69. value: ''
  70. - name: DISABLE_STACK_TRACING
  71. value: 'true'
  72. volumes:
  73. - name: sys-fs-cgroup
  74. hostPath:
  75. path: /sys/fs/cgroup
  76. - name: sys-kernel-debug
  77. hostPath:
  78. path: /sys/kernel/debug
  79. - name: host-usr
  80. hostPath:
  81. path: /usr
  82. type: Directory
  83. - name: host-var
  84. hostPath:
  85. path: /var
  86. type: Directory
  87. - name: host-run
  88. hostPath:
  89. path: /run
  90. type: Directory
  91. - name: host-tmp
  92. hostPath:
  93. path: /tmp
  94. type: Directory
  95. ---
  96. kind: ClusterRole
  97. apiVersion: rbac.authorization.k8s.io/v1
  98. metadata:
  99. name: euspace-agent-role
  100. rules:
  101. - apiGroups: [""]
  102. resources:
  103. - nodes
  104. - namespaces
  105. - configmaps
  106. - services
  107. - pods
  108. - replicationcontrollers
  109. verbs: ["get", "list", "watch"]
  110. - apiGroups: ["apps"]
  111. resources:
  112. - daemonsets
  113. - deployments
  114. - replicasets
  115. - statefulsets
  116. verbs: ["get", "list", "watch"]
  117. - apiGroups: ["extensions", "networking.k8s.io"]
  118. resources: ["ingresses"]
  119. verbs: ["get", "list", "watch"]
  120. - apiGroups: ["route.openshift.io"]
  121. resources: ["routes"]
  122. verbs: ["get", "list", "watch"]
  123. ---
  124. apiVersion: rbac.authorization.k8s.io/v1
  125. kind: ClusterRoleBinding
  126. metadata:
  127. name: cw-agent-view-binding
  128. subjects:
  129. - kind: ServiceAccount
  130. name: default
  131. namespace: cloudwise
  132. roleRef:
  133. kind: ClusterRole
  134. name: euspace-agent-role
  135. apiGroup: rbac.authorization.k8s.io