logging-deployer.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. apiVersion: "v1"
  2. kind: "List"
  3. items:
  4. -
  5. apiVersion: "v1"
  6. kind: "Template"
  7. metadata:
  8. name: logging-deployer-account-template
  9. annotations:
  10. description: "Template for creating the deployer account and roles needed for the aggregated logging deployer. Create as cluster-admin."
  11. tags: "infrastructure"
  12. objects:
  13. -
  14. apiVersion: v1
  15. kind: ServiceAccount
  16. name: logging-deployer
  17. metadata:
  18. name: logging-deployer
  19. labels:
  20. logging-infra: deployer
  21. provider: openshift
  22. component: deployer
  23. -
  24. apiVersion: v1
  25. kind: ServiceAccount
  26. metadata:
  27. name: aggregated-logging-kibana
  28. -
  29. apiVersion: v1
  30. kind: ServiceAccount
  31. metadata:
  32. name: aggregated-logging-elasticsearch
  33. -
  34. apiVersion: v1
  35. kind: ServiceAccount
  36. metadata:
  37. name: aggregated-logging-fluentd
  38. -
  39. apiVersion: v1
  40. kind: ServiceAccount
  41. metadata:
  42. name: aggregated-logging-curator
  43. - apiVersion: v1
  44. kind: ClusterRole
  45. metadata:
  46. name: oauth-editor
  47. rules:
  48. - resources:
  49. - oauthclients
  50. verbs:
  51. - create
  52. - delete
  53. - apiVersion: v1
  54. kind: ClusterRole
  55. metadata:
  56. name: daemonset-admin
  57. rules:
  58. - resources:
  59. - daemonsets
  60. apiGroups:
  61. - extensions
  62. verbs:
  63. - create
  64. - get
  65. - list
  66. - watch
  67. - delete
  68. - update
  69. - apiVersion: v1
  70. kind: ClusterRole
  71. metadata:
  72. name: rolebinding-reader
  73. rules:
  74. - resources:
  75. - clusterrolebindings
  76. verbs:
  77. - get
  78. -
  79. apiVersion: v1
  80. kind: RoleBinding
  81. metadata:
  82. name: logging-deployer-edit-role
  83. roleRef:
  84. name: edit
  85. subjects:
  86. - kind: ServiceAccount
  87. name: logging-deployer
  88. -
  89. apiVersion: v1
  90. kind: RoleBinding
  91. metadata:
  92. name: logging-deployer-dsadmin-role
  93. roleRef:
  94. name: daemonset-admin
  95. subjects:
  96. - kind: ServiceAccount
  97. name: logging-deployer
  98. -
  99. apiVersion: v1
  100. kind: RoleBinding
  101. metadata:
  102. name: logging-elasticsearch-view-role
  103. roleRef:
  104. name: view
  105. subjects:
  106. - kind: ServiceAccount
  107. name: aggregated-logging-elasticsearch
  108. -
  109. apiVersion: "v1"
  110. kind: "Template"
  111. metadata:
  112. name: logging-deployer-template
  113. annotations:
  114. description: "Template for running the aggregated logging deployer in a pod. Requires empowered 'logging-deployer' service account."
  115. tags: "infrastructure"
  116. labels:
  117. logging-infra: deployer
  118. provider: openshift
  119. objects:
  120. -
  121. apiVersion: v1
  122. kind: Pod
  123. metadata:
  124. generateName: logging-deployer-
  125. spec:
  126. containers:
  127. - image: ${IMAGE_PREFIX}logging-deployer:${IMAGE_VERSION}
  128. imagePullPolicy: Always
  129. name: deployer
  130. volumeMounts:
  131. - name: empty
  132. mountPath: /etc/deploy
  133. env:
  134. - name: PROJECT
  135. valueFrom:
  136. fieldRef:
  137. fieldPath: metadata.namespace
  138. - name: IMAGE_PREFIX
  139. value: ${IMAGE_PREFIX}
  140. - name: IMAGE_VERSION
  141. value: ${IMAGE_VERSION}
  142. - name: IMAGE_PULL_SECRET
  143. value: ${IMAGE_PULL_SECRET}
  144. - name: INSECURE_REGISTRY
  145. value: ${INSECURE_REGISTRY}
  146. - name: ENABLE_OPS_CLUSTER
  147. value: ${ENABLE_OPS_CLUSTER}
  148. - name: KIBANA_HOSTNAME
  149. value: ${KIBANA_HOSTNAME}
  150. - name: KIBANA_OPS_HOSTNAME
  151. value: ${KIBANA_OPS_HOSTNAME}
  152. - name: PUBLIC_MASTER_URL
  153. value: ${PUBLIC_MASTER_URL}
  154. - name: MASTER_URL
  155. value: ${MASTER_URL}
  156. - name: ES_INSTANCE_RAM
  157. value: ${ES_INSTANCE_RAM}
  158. - name: ES_PVC_SIZE
  159. value: ${ES_PVC_SIZE}
  160. - name: ES_PVC_PREFIX
  161. value: ${ES_PVC_PREFIX}
  162. - name: ES_PVC_DYNAMIC
  163. value: ${ES_PVC_DYNAMIC}
  164. - name: ES_CLUSTER_SIZE
  165. value: ${ES_CLUSTER_SIZE}
  166. - name: ES_NODE_QUORUM
  167. value: ${ES_NODE_QUORUM}
  168. - name: ES_RECOVER_AFTER_NODES
  169. value: ${ES_RECOVER_AFTER_NODES}
  170. - name: ES_RECOVER_EXPECTED_NODES
  171. value: ${ES_RECOVER_EXPECTED_NODES}
  172. - name: ES_RECOVER_AFTER_TIME
  173. value: ${ES_RECOVER_AFTER_TIME}
  174. - name: ES_OPS_INSTANCE_RAM
  175. value: ${ES_OPS_INSTANCE_RAM}
  176. - name: ES_OPS_PVC_SIZE
  177. value: ${ES_OPS_PVC_SIZE}
  178. - name: ES_OPS_PVC_PREFIX
  179. value: ${ES_OPS_PVC_PREFIX}
  180. - name: ES_OPS_PVC_DYNAMIC
  181. value: ${ES_OPS_PVC_DYNAMIC}
  182. - name: ES_OPS_CLUSTER_SIZE
  183. value: ${ES_OPS_CLUSTER_SIZE}
  184. - name: ES_OPS_NODE_QUORUM
  185. value: ${ES_OPS_NODE_QUORUM}
  186. - name: ES_OPS_RECOVER_AFTER_NODES
  187. value: ${ES_OPS_RECOVER_AFTER_NODES}
  188. - name: ES_OPS_RECOVER_EXPECTED_NODES
  189. value: ${ES_OPS_RECOVER_EXPECTED_NODES}
  190. - name: ES_OPS_RECOVER_AFTER_TIME
  191. value: ${ES_OPS_RECOVER_AFTER_TIME}
  192. - name: FLUENTD_NODESELECTOR
  193. value: ${FLUENTD_NODESELECTOR}
  194. - name: ES_NODESELECTOR
  195. value: ${ES_NODESELECTOR}
  196. - name: ES_OPS_NODESELECTOR
  197. value: ${ES_OPS_NODESELECTOR}
  198. - name: KIBANA_NODESELECTOR
  199. value: ${KIBANA_NODESELECTOR}
  200. - name: KIBANA_OPS_NODESELECTOR
  201. value: ${KIBANA_OPS_NODESELECTOR}
  202. - name: CURATOR_NODESELECTOR
  203. value: ${CURATOR_NODESELECTOR}
  204. - name: CURATOR_OPS_NODESELECTOR
  205. value: ${CURATOR_OPS_NODESELECTOR}
  206. - name: MODE
  207. value: ${MODE}
  208. dnsPolicy: ClusterFirst
  209. restartPolicy: Never
  210. serviceAccount: logging-deployer
  211. volumes:
  212. - name: empty
  213. emptyDir: {}
  214. parameters:
  215. -
  216. description: "The mode that the deployer runs in."
  217. name: MODE
  218. value: "install"
  219. -
  220. description: 'Specify prefix for logging components; e.g. for "registry.access.redhat.com/openshift3/logging-deployer:3.4.0", set prefix "registry.access.redhat.com/openshift3/"'
  221. name: IMAGE_PREFIX
  222. value: "registry.access.redhat.com/openshift3/"
  223. -
  224. description: 'Specify version for logging components; e.g. for "registry.access.redhat.com/openshift3/logging-deployer:3.4.0", set version "3.4.0"'
  225. name: IMAGE_VERSION
  226. value: "v3.4"
  227. -
  228. description: "(Deprecated) Specify the name of an existing pull secret to be used for pulling component images from an authenticated registry."
  229. name: IMAGE_PULL_SECRET
  230. -
  231. description: "(Deprecated) Allow the registry for logging component images to be non-secure (not secured with a certificate signed by a known CA)"
  232. name: INSECURE_REGISTRY
  233. value: "false"
  234. -
  235. description: "(Deprecated) If true, set up to use a second ES cluster for ops logs."
  236. name: ENABLE_OPS_CLUSTER
  237. value: "false"
  238. -
  239. description: "(Deprecated) External hostname where clients will reach kibana"
  240. name: KIBANA_HOSTNAME
  241. value: "kibana.example.com"
  242. -
  243. description: "(Deprecated) External hostname at which admins will visit the ops Kibana."
  244. name: KIBANA_OPS_HOSTNAME
  245. value: kibana-ops.example.com
  246. -
  247. description: "(Deprecated) External URL for the master, for OAuth purposes"
  248. name: PUBLIC_MASTER_URL
  249. value: "https://localhost:8443"
  250. -
  251. description: "(Deprecated) Internal URL for the master, for authentication retrieval"
  252. name: MASTER_URL
  253. value: "https://kubernetes.default.svc.cluster.local"
  254. -
  255. description: "(Deprecated) How many instances of ElasticSearch to deploy."
  256. name: ES_CLUSTER_SIZE
  257. value: "1"
  258. -
  259. description: "(Deprecated) Amount of RAM to reserve per ElasticSearch instance."
  260. name: ES_INSTANCE_RAM
  261. value: "8G"
  262. -
  263. description: "(Deprecated) Size of the PersistentVolumeClaim to create per ElasticSearch instance, e.g. 100G. If empty, no PVCs will be created and emptyDir volumes are used instead."
  264. name: ES_PVC_SIZE
  265. -
  266. description: "(Deprecated) Prefix for the names of PersistentVolumeClaims to be created; a number will be appended per instance. If they don't already exist, they will be created with size ES_PVC_SIZE."
  267. name: ES_PVC_PREFIX
  268. value: "logging-es-"
  269. -
  270. description: '(Deprecated) Set to "true" to request dynamic provisioning (if enabled for your cluster) of a PersistentVolume for the ES PVC. '
  271. name: ES_PVC_DYNAMIC
  272. -
  273. description: "(Deprecated) Number of nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
  274. name: ES_NODE_QUORUM
  275. -
  276. description: "(Deprecated) Number of nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_CLUSTER_SIZE."
  277. name: ES_RECOVER_AFTER_NODES
  278. -
  279. description: "(Deprecated) Number of nodes desired to be present before the cluster will recover from a full restart. By default, ES_CLUSTER_SIZE."
  280. name: ES_RECOVER_EXPECTED_NODES
  281. -
  282. description: "(Deprecated) Timeout for *expected* nodes to be present when cluster is recovering from a full restart."
  283. name: ES_RECOVER_AFTER_TIME
  284. value: "5m"
  285. -
  286. description: "(Deprecated) How many ops instances of ElasticSearch to deploy. By default, ES_CLUSTER_SIZE."
  287. name: ES_OPS_CLUSTER_SIZE
  288. -
  289. description: "(Deprecated) Amount of RAM to reserve per ops ElasticSearch instance."
  290. name: ES_OPS_INSTANCE_RAM
  291. value: "8G"
  292. -
  293. description: "(Deprecated) Size of the PersistentVolumeClaim to create per ElasticSearch ops instance, e.g. 100G. If empty, no PVCs will be created and emptyDir volumes are used instead."
  294. name: ES_OPS_PVC_SIZE
  295. -
  296. description: "(Deprecated) Prefix for the names of PersistentVolumeClaims to be created; a number will be appended per instance. If they don't already exist, they will be created with size ES_OPS_PVC_SIZE."
  297. name: ES_OPS_PVC_PREFIX
  298. value: "logging-es-ops-"
  299. -
  300. description: '(Deprecated) Set to "true" to request dynamic provisioning (if enabled for your cluster) of a PersistentVolume for the ES ops PVC. '
  301. name: ES_OPS_PVC_DYNAMIC
  302. -
  303. description: "(Deprecated) Number of ops nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
  304. name: ES_OPS_NODE_QUORUM
  305. -
  306. description: "(Deprecated) Number of ops nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_OPS_CLUSTER_SIZE."
  307. name: ES_OPS_RECOVER_AFTER_NODES
  308. -
  309. description: "(Deprecated) Number of ops nodes desired to be present before the cluster will recover from a full restart. By default, ES_OPS_CLUSTER_SIZE."
  310. name: ES_OPS_RECOVER_EXPECTED_NODES
  311. -
  312. description: "(Deprecated) Timeout for *expected* ops nodes to be present when cluster is recovering from a full restart."
  313. name: ES_OPS_RECOVER_AFTER_TIME
  314. value: "5m"
  315. -
  316. description: "(Deprecated) The nodeSelector used for the Fluentd DaemonSet."
  317. name: FLUENTD_NODESELECTOR
  318. value: "logging-infra-fluentd=true"
  319. -
  320. description: "(Deprecated) Node selector Elasticsearch cluster (label=value)."
  321. name: ES_NODESELECTOR
  322. value: ""
  323. -
  324. description: "(Deprecated) Node selector Elasticsearch operations cluster (label=value)."
  325. name: ES_OPS_NODESELECTOR
  326. value: ""
  327. -
  328. description: "(Deprecated) Node selector Kibana cluster (label=value)."
  329. name: KIBANA_NODESELECTOR
  330. value: ""
  331. -
  332. description: "(Deprecated) Node selector Kibana operations cluster (label=value)."
  333. name: KIBANA_OPS_NODESELECTOR
  334. value: ""
  335. -
  336. description: "(Deprecated) Node selector Curator (label=value)."
  337. name: CURATOR_NODESELECTOR
  338. value: ""
  339. -
  340. description: "(Deprecated) Node selector operations Curator (label=value)."
  341. name: CURATOR_OPS_NODESELECTOR
  342. value: ""