glusterfs-template.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. volumeMounts:
  39. - name: glusterfs-heketi
  40. mountPath: "/var/lib/heketi"
  41. - name: glusterfs-run
  42. mountPath: "/run"
  43. - name: glusterfs-lvm
  44. mountPath: "/run/lvm"
  45. - name: glusterfs-etc
  46. mountPath: "/etc/glusterfs"
  47. - name: glusterfs-logs
  48. mountPath: "/var/log/glusterfs"
  49. - name: glusterfs-config
  50. mountPath: "/var/lib/glusterd"
  51. - name: glusterfs-dev
  52. mountPath: "/dev"
  53. - name: glusterfs-misc
  54. mountPath: "/var/lib/misc/glusterfsd"
  55. - name: glusterfs-cgroup
  56. mountPath: "/sys/fs/cgroup"
  57. readOnly: true
  58. - name: glusterfs-ssl
  59. mountPath: "/etc/ssl"
  60. readOnly: true
  61. securityContext:
  62. capabilities: {}
  63. privileged: true
  64. readinessProbe:
  65. timeoutSeconds: 3
  66. initialDelaySeconds: 40
  67. exec:
  68. command:
  69. - "/bin/bash"
  70. - "-c"
  71. - systemctl status glusterd.service
  72. periodSeconds: 25
  73. successThreshold: 1
  74. failureThreshold: 15
  75. livenessProbe:
  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. resources: {}
  87. terminationMessagePath: "/dev/termination-log"
  88. volumes:
  89. - name: glusterfs-heketi
  90. hostPath:
  91. path: "/var/lib/heketi"
  92. - name: glusterfs-run
  93. emptyDir: {}
  94. - name: glusterfs-lvm
  95. hostPath:
  96. path: "/run/lvm"
  97. - name: glusterfs-etc
  98. hostPath:
  99. path: "/etc/glusterfs"
  100. - name: glusterfs-logs
  101. hostPath:
  102. path: "/var/log/glusterfs"
  103. - name: glusterfs-config
  104. hostPath:
  105. path: "/var/lib/glusterd"
  106. - name: glusterfs-dev
  107. hostPath:
  108. path: "/dev"
  109. - name: glusterfs-misc
  110. hostPath:
  111. path: "/var/lib/misc/glusterfsd"
  112. - name: glusterfs-cgroup
  113. hostPath:
  114. path: "/sys/fs/cgroup"
  115. - name: glusterfs-ssl
  116. hostPath:
  117. path: "/etc/ssl"
  118. restartPolicy: Always
  119. terminationGracePeriodSeconds: 30
  120. dnsPolicy: ClusterFirst
  121. securityContext: {}
  122. parameters:
  123. - name: NODE_LABELS
  124. displayName: Daemonset Node Labels
  125. description: Labels which define the daemonset node selector. Must contain at least one label of the format \'glusterfs=<CLUSTER_NAME>-host\'
  126. value: '{ "glusterfs": "storage-host" }'
  127. - name: IMAGE_NAME
  128. displayName: GlusterFS container image name
  129. required: True
  130. - name: IMAGE_VERSION
  131. displayName: GlusterFS container image version
  132. required: True
  133. - name: CLUSTER_NAME
  134. displayName: GlusterFS cluster name
  135. description: A unique name to identify which heketi service manages this cluster, useful for running multiple heketi instances
  136. value: storage