heketi-template.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ---
  2. kind: Template
  3. apiVersion: v1
  4. metadata:
  5. name: heketi
  6. labels:
  7. glusterfs: heketi-template
  8. heketi: template
  9. annotations:
  10. description: Heketi service deployment template
  11. tags: glusterfs,heketi
  12. objects:
  13. - kind: Service
  14. apiVersion: v1
  15. metadata:
  16. name: heketi-${CLUSTER_NAME}
  17. labels:
  18. glusterfs: heketi-${CLUSTER_NAME}-service
  19. heketi: ${CLUSTER_NAME}-service
  20. annotations:
  21. description: Exposes Heketi service
  22. spec:
  23. ports:
  24. - name: heketi
  25. port: 8080
  26. targetPort: 8080
  27. selector:
  28. glusterfs: heketi-${CLUSTER_NAME}-pod
  29. - kind: Route
  30. apiVersion: v1
  31. metadata:
  32. name: ${HEKETI_ROUTE}
  33. labels:
  34. glusterfs: heketi-${CLUSTER_NAME}-route
  35. heketi: ${CLUSTER_NAME}-route
  36. spec:
  37. to:
  38. kind: Service
  39. name: heketi-${CLUSTER_NAME}
  40. - kind: DeploymentConfig
  41. apiVersion: v1
  42. metadata:
  43. name: heketi-${CLUSTER_NAME}
  44. labels:
  45. glusterfs: heketi-${CLUSTER_NAME}-dc
  46. heketi: ${CLUSTER_NAME}-dc
  47. annotations:
  48. description: Defines how to deploy Heketi
  49. spec:
  50. replicas: 1
  51. selector:
  52. glusterfs: heketi-${CLUSTER_NAME}-pod
  53. triggers:
  54. - type: ConfigChange
  55. strategy:
  56. type: Recreate
  57. template:
  58. metadata:
  59. name: heketi-${CLUSTER_NAME}
  60. labels:
  61. glusterfs: heketi-${CLUSTER_NAME}-pod
  62. heketi: ${CLUSTER_NAME}-pod
  63. spec:
  64. serviceAccountName: heketi-${CLUSTER_NAME}-service-account
  65. containers:
  66. - name: heketi
  67. image: ${IMAGE_NAME}
  68. imagePullPolicy: IfNotPresent
  69. env:
  70. - name: HEKETI_USER_KEY
  71. value: ${HEKETI_USER_KEY}
  72. - name: HEKETI_ADMIN_KEY
  73. value: ${HEKETI_ADMIN_KEY}
  74. - name: HEKETI_EXECUTOR
  75. value: ${HEKETI_EXECUTOR}
  76. - name: HEKETI_FSTAB
  77. value: ${HEKETI_FSTAB}
  78. - name: HEKETI_SNAPSHOT_LIMIT
  79. value: '14'
  80. - name: HEKETI_KUBE_GLUSTER_DAEMONSET
  81. value: '1'
  82. - name: HEKETI_IGNORE_STALE_OPERATIONS
  83. value: "true"
  84. ports:
  85. - containerPort: 8080
  86. volumeMounts:
  87. - name: db
  88. mountPath: /var/lib/heketi
  89. - name: config
  90. mountPath: /etc/heketi
  91. readinessProbe:
  92. timeoutSeconds: 3
  93. initialDelaySeconds: 3
  94. httpGet:
  95. path: /hello
  96. port: 8080
  97. livenessProbe:
  98. timeoutSeconds: 3
  99. initialDelaySeconds: 30
  100. httpGet:
  101. path: /hello
  102. port: 8080
  103. volumes:
  104. - name: db
  105. glusterfs:
  106. endpoints: heketi-db-${CLUSTER_NAME}-endpoints
  107. path: heketidbstorage
  108. - name: config
  109. secret:
  110. secretName: heketi-${CLUSTER_NAME}-config-secret
  111. parameters:
  112. - name: HEKETI_USER_KEY
  113. displayName: Heketi User Secret
  114. description: Set secret for those creating volumes as type _user_
  115. - name: HEKETI_ADMIN_KEY
  116. displayName: Heketi Administrator Secret
  117. description: Set secret for administration of the Heketi service as user _admin_
  118. - name: HEKETI_EXECUTOR
  119. displayName: heketi executor type
  120. description: Set the executor type, kubernetes or ssh
  121. value: kubernetes
  122. - name: HEKETI_FSTAB
  123. displayName: heketi fstab path
  124. description: Set the fstab path, file that is populated with bricks that heketi creates
  125. value: /var/lib/heketi/fstab
  126. - name: HEKETI_ROUTE
  127. displayName: heketi route name
  128. description: Set the hostname for the route URL
  129. value: "heketi-glusterfs"
  130. - name: IMAGE_NAME
  131. displayName: heketi container image name
  132. required: True
  133. - name: CLUSTER_NAME
  134. displayName: GlusterFS cluster name
  135. description: A unique name to identify this heketi service, useful for running multiple heketi instances
  136. value: glusterfs