cloudwise-apm-euspace.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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.0
  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: DISABLE_E2E_TRACING
  69. value: 'false'
  70. - name: DISABLE_STACK_TRACING
  71. value: 'true'
  72. - name: DISABLE_REG_HOST
  73. value: 'false'
  74. volumes:
  75. - name: sys-fs-cgroup
  76. hostPath:
  77. path: /sys/fs/cgroup
  78. - name: sys-kernel-debug
  79. hostPath:
  80. path: /sys/kernel/debug
  81. - name: host-usr
  82. hostPath:
  83. path: /usr
  84. type: Directory
  85. - name: host-var
  86. hostPath:
  87. path: /var
  88. type: Directory
  89. - name: host-run
  90. hostPath:
  91. path: /run
  92. type: Directory
  93. - name: host-tmp
  94. hostPath:
  95. path: /tmp
  96. type: Directory
  97. ---
  98. kind: ClusterRole
  99. apiVersion: rbac.authorization.k8s.io/v1
  100. metadata:
  101. name: euspace-agent-role
  102. rules:
  103. - apiGroups: [""]
  104. resources:
  105. - nodes
  106. - namespaces
  107. - configmaps
  108. - services
  109. - pods
  110. - replicationcontrollers
  111. verbs: ["get", "list", "watch"]
  112. - apiGroups: ["apps"]
  113. resources:
  114. - daemonsets
  115. - deployments
  116. - replicasets
  117. - statefulsets
  118. verbs: ["get", "list", "watch"]
  119. - apiGroups: ["extensions", "networking.k8s.io"]
  120. resources: ["ingresses"]
  121. verbs: ["get", "list", "watch"]
  122. - apiGroups: ["route.openshift.io"]
  123. resources: ["routes"]
  124. verbs: ["get", "list", "watch"]
  125. ---
  126. apiVersion: rbac.authorization.k8s.io/v1
  127. kind: ClusterRoleBinding
  128. metadata:
  129. name: cw-agent-view-binding
  130. subjects:
  131. - kind: ServiceAccount
  132. name: default
  133. namespace: cloudwise
  134. roleRef:
  135. kind: ClusterRole
  136. name: euspace-agent-role
  137. apiGroup: rbac.authorization.k8s.io