deploy-heketi-template.yml 3.8 KB

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