glusterfs-template.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. resources:
  44. requests:
  45. memory: 100Mi
  46. cpu: 100m
  47. volumeMounts:
  48. - name: glusterfs-heketi
  49. mountPath: "/var/lib/heketi"
  50. - name: glusterfs-run
  51. mountPath: "/run"
  52. - name: glusterfs-lvm
  53. mountPath: "/run/lvm"
  54. - name: glusterfs-etc
  55. mountPath: "/etc/glusterfs"
  56. - name: glusterfs-logs
  57. mountPath: "/var/log/glusterfs"
  58. - name: glusterfs-config
  59. mountPath: "/var/lib/glusterd"
  60. - name: glusterfs-dev
  61. mountPath: "/dev"
  62. - name: glusterfs-misc
  63. mountPath: "/var/lib/misc/glusterfsd"
  64. - name: glusterfs-cgroup
  65. mountPath: "/sys/fs/cgroup"
  66. readOnly: true
  67. - name: glusterfs-ssl
  68. mountPath: "/etc/ssl"
  69. readOnly: true
  70. - name: glusterfs-target
  71. mountPath: "/etc/target"
  72. securityContext:
  73. capabilities: {}
  74. privileged: true
  75. readinessProbe:
  76. timeoutSeconds: 3
  77. initialDelaySeconds: 40
  78. exec:
  79. command:
  80. - "/bin/bash"
  81. - "-c"
  82. - systemctl status glusterd.service
  83. periodSeconds: 25
  84. successThreshold: 1
  85. failureThreshold: 15
  86. livenessProbe:
  87. timeoutSeconds: 3
  88. initialDelaySeconds: 40
  89. exec:
  90. command:
  91. - "/bin/bash"
  92. - "-c"
  93. - systemctl status glusterd.service
  94. periodSeconds: 25
  95. successThreshold: 1
  96. failureThreshold: 15
  97. terminationMessagePath: "/dev/termination-log"
  98. volumes:
  99. - name: glusterfs-heketi
  100. hostPath:
  101. path: "/var/lib/heketi"
  102. - name: glusterfs-run
  103. emptyDir: {}
  104. - name: glusterfs-lvm
  105. hostPath:
  106. path: "/run/lvm"
  107. - name: glusterfs-etc
  108. hostPath:
  109. path: "/etc/glusterfs"
  110. - name: glusterfs-logs
  111. hostPath:
  112. path: "/var/log/glusterfs"
  113. - name: glusterfs-config
  114. hostPath:
  115. path: "/var/lib/glusterd"
  116. - name: glusterfs-dev
  117. hostPath:
  118. path: "/dev"
  119. - name: glusterfs-misc
  120. hostPath:
  121. path: "/var/lib/misc/glusterfsd"
  122. - name: glusterfs-cgroup
  123. hostPath:
  124. path: "/sys/fs/cgroup"
  125. - name: glusterfs-ssl
  126. hostPath:
  127. path: "/etc/ssl"
  128. - name: glusterfs-target
  129. hostPath:
  130. path: "/etc/target"
  131. restartPolicy: Always
  132. terminationGracePeriodSeconds: 30
  133. dnsPolicy: ClusterFirst
  134. securityContext: {}
  135. parameters:
  136. - name: NODE_LABELS
  137. displayName: Daemonset Node Labels
  138. description: Labels which define the daemonset node selector. Must contain at least one label of the format \'glusterfs=<CLUSTER_NAME>-host\'
  139. value: '{ "glusterfs": "storage-host" }'
  140. - name: IMAGE_NAME
  141. displayName: GlusterFS container image name
  142. required: True
  143. - name: IMAGE_VERSION
  144. displayName: GlusterFS container image version
  145. required: True
  146. - name: CLUSTER_NAME
  147. displayName: GlusterFS cluster name
  148. description: A unique name to identify which heketi service manages this cluster, useful for running multiple heketi instances
  149. value: storage
  150. - name: GB_GLFS_LRU_COUNT
  151. displayName: Maximum number of block hosting volumes
  152. description: This value is to set maximum number of block hosting volumes.
  153. value: "15"
  154. required: true
  155. - name: TCMU_LOGDIR
  156. displayName: Tcmu runner log directory
  157. description: This value is to set tcmu runner log directory
  158. value: "/var/log/glusterfs/gluster-block"
  159. required: true