glusterfs-template.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ---
  2. kind: Template
  3. apiVersion: v1
  4. metadata:
  5. name: glusterfs
  6. labels:
  7. glusterfs: template
  8. annotations:
  9. description: GlusterFS DaemonSet template
  10. tags: glusterfs
  11. objects:
  12. - kind: DaemonSet
  13. apiVersion: extensions/v1beta1
  14. metadata:
  15. name: glusterfs-${CLUSTER_NAME}
  16. labels:
  17. glusterfs: ${CLUSTER_NAME}-daemonset
  18. annotations:
  19. description: GlusterFS DaemonSet
  20. tags: glusterfs
  21. spec:
  22. selector:
  23. matchLabels:
  24. glusterfs: ${CLUSTER_NAME}-pod
  25. template:
  26. metadata:
  27. name: glusterfs-${CLUSTER_NAME}
  28. labels:
  29. glusterfs: ${CLUSTER_NAME}-pod
  30. glusterfs-node: pod
  31. spec:
  32. nodeSelector: "${{NODE_LABELS}}"
  33. hostNetwork: true
  34. containers:
  35. - name: glusterfs
  36. image: ${IMAGE_NAME}:${IMAGE_VERSION}
  37. imagePullPolicy: IfNotPresent
  38. env:
  39. - name: GB_GLFS_LRU_COUNT
  40. value: "${GB_GLFS_LRU_COUNT}"
  41. - name: TCMU_LOGDIR
  42. value: "${TCMU_LOGDIR}"
  43. - name: GB_LOGDIR
  44. value: "/var/log/glusterfs/gluster-block"
  45. resources:
  46. requests:
  47. memory: 100Mi
  48. cpu: 100m
  49. volumeMounts:
  50. - name: glusterfs-heketi
  51. mountPath: "/var/lib/heketi"
  52. - name: glusterfs-run
  53. mountPath: "/run"
  54. - name: glusterfs-lvm
  55. mountPath: "/run/lvm"
  56. - name: glusterfs-etc
  57. mountPath: "/etc/glusterfs"
  58. - name: glusterfs-logs
  59. mountPath: "/var/log/glusterfs"
  60. - name: glusterfs-config
  61. mountPath: "/var/lib/glusterd"
  62. - name: glusterfs-dev
  63. mountPath: "/dev"
  64. - name: glusterfs-misc
  65. mountPath: "/var/lib/misc/glusterfsd"
  66. - name: glusterfs-cgroup
  67. mountPath: "/sys/fs/cgroup"
  68. readOnly: true
  69. - name: glusterfs-ssl
  70. mountPath: "/etc/ssl"
  71. readOnly: true
  72. - name: glusterfs-target
  73. mountPath: "/etc/target"
  74. securityContext:
  75. capabilities: {}
  76. privileged: true
  77. readinessProbe:
  78. timeoutSeconds: 3
  79. initialDelaySeconds: 40
  80. exec:
  81. command:
  82. - "/bin/bash"
  83. - "-c"
  84. - systemctl status glusterd.service
  85. periodSeconds: 25
  86. successThreshold: 1
  87. failureThreshold: 50
  88. livenessProbe:
  89. timeoutSeconds: 3
  90. initialDelaySeconds: 40
  91. exec:
  92. command:
  93. - "/bin/bash"
  94. - "-c"
  95. - systemctl status glusterd.service
  96. periodSeconds: 25
  97. successThreshold: 1
  98. failureThreshold: 50
  99. terminationMessagePath: "/dev/termination-log"
  100. volumes:
  101. - name: glusterfs-heketi
  102. hostPath:
  103. path: "/var/lib/heketi"
  104. - name: glusterfs-run
  105. emptyDir: {}
  106. - name: glusterfs-lvm
  107. hostPath:
  108. path: "/run/lvm"
  109. - name: glusterfs-etc
  110. hostPath:
  111. path: "/etc/glusterfs"
  112. - name: glusterfs-logs
  113. hostPath:
  114. path: "/var/log/glusterfs"
  115. - name: glusterfs-config
  116. hostPath:
  117. path: "/var/lib/glusterd"
  118. - name: glusterfs-dev
  119. hostPath:
  120. path: "/dev"
  121. - name: glusterfs-misc
  122. hostPath:
  123. path: "/var/lib/misc/glusterfsd"
  124. - name: glusterfs-cgroup
  125. hostPath:
  126. path: "/sys/fs/cgroup"
  127. - name: glusterfs-ssl
  128. hostPath:
  129. path: "/etc/ssl"
  130. - name: glusterfs-target
  131. hostPath:
  132. path: "/etc/target"
  133. restartPolicy: Always
  134. terminationGracePeriodSeconds: 30
  135. dnsPolicy: ClusterFirst
  136. securityContext: {}
  137. parameters:
  138. - name: NODE_LABELS
  139. displayName: Daemonset Node Labels
  140. description: Labels which define the daemonset node selector. Must contain at least one label of the format \'glusterfs=<CLUSTER_NAME>-host\'
  141. value: '{ "glusterfs": "storage-host" }'
  142. - name: IMAGE_NAME
  143. displayName: GlusterFS container image name
  144. required: True
  145. - name: IMAGE_VERSION
  146. displayName: GlusterFS container image version
  147. required: True
  148. - name: CLUSTER_NAME
  149. displayName: GlusterFS cluster name
  150. description: A unique name to identify which heketi service manages this cluster, useful for running multiple heketi instances
  151. value: storage
  152. - name: GB_GLFS_LRU_COUNT
  153. displayName: Maximum number of block hosting volumes
  154. description: This value is to set maximum number of block hosting volumes.
  155. value: "15"
  156. required: true
  157. - name: TCMU_LOGDIR
  158. displayName: Tcmu runner log directory
  159. description: This value is to set tcmu runner log directory
  160. value: "/var/log/glusterfs/gluster-block"
  161. required: true