registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/provisioner-localpv:ci
    registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/node-disk-manager:ci
    registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/snapshot-controller:ci
    registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/snapshot-provisioner:ci
    registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/openebs-k8s-provisioner:ci
    registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/node-disk-operator:ci
    registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/m-apiserver:ci

    1. # This manifest deploys the OpenEBS control plane components, with associated CRs & RBAC rules
    2. # NOTE: On GKE, deploy the openebs-operator.yaml in admin context
    3. # Create the OpenEBS namespace
    4. apiVersion: v1
    5. kind: Namespace
    6. metadata:
    7. name: openebs
    8. ---
    9. # Create Maya Service Account
    10. apiVersion: v1
    11. kind: ServiceAccount
    12. metadata:
    13. name: openebs-maya-operator
    14. namespace: openebs
    15. ---
    16. # Define Role that allows operations on K8s pods/deployments
    17. kind: ClusterRole
    18. apiVersion: rbac.authorization.k8s.io/v1beta1
    19. metadata:
    20. name: openebs-maya-operator
    21. rules:
    22. - apiGroups: ["*"]
    23. resources: ["nodes", "nodes/proxy"]
    24. verbs: ["*"]
    25. - apiGroups: ["*"]
    26. resources: ["namespaces", "services", "pods", "pods/exec", "deployments", "deployments/finalizers", "replicationcontrollers", "replicasets", "events", "endpoints", "configmaps", "secrets", "jobs", "cronjobs"]
    27. verbs: ["*"]
    28. - apiGroups: ["*"]
    29. resources: ["statefulsets", "daemonsets"]
    30. verbs: ["*"]
    31. - apiGroups: ["*"]
    32. resources: ["resourcequotas", "limitranges"]
    33. verbs: ["list", "watch"]
    34. - apiGroups: ["*"]
    35. resources: ["ingresses", "horizontalpodautoscalers", "verticalpodautoscalers", "certificatesigningrequests"]
    36. verbs: ["list", "watch"]
    37. - apiGroups: ["*"]
    38. resources: ["storageclasses", "persistentvolumeclaims", "persistentvolumes"]
    39. verbs: ["*"]
    40. - apiGroups: ["volumesnapshot.external-storage.k8s.io"]
    41. resources: ["volumesnapshots", "volumesnapshotdatas"]
    42. verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
    43. - apiGroups: ["apiextensions.k8s.io"]
    44. resources: ["customresourcedefinitions"]
    45. verbs: [ "get", "list", "create", "update", "delete", "patch"]
    46. - apiGroups: ["openebs.io"]
    47. resources: [ "*"]
    48. verbs: ["*" ]
    49. - apiGroups: ["cstor.openebs.io"]
    50. resources: [ "*"]
    51. verbs: ["*" ]
    52. - apiGroups: ["coordination.k8s.io"]
    53. resources: ["leases"]
    54. verbs: ["get", "watch", "list", "delete", "update", "create"]
    55. - apiGroups: ["admissionregistration.k8s.io"]
    56. resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
    57. verbs: ["get", "create", "list", "delete", "update", "patch"]
    58. - nonResourceURLs: ["/metrics"]
    59. verbs: ["get"]
    60. - apiGroups: ["*"]
    61. resources: ["poddisruptionbudgets"]
    62. verbs: ["get", "list", "create", "delete", "watch"]
    63. ---
    64. # Bind the Service Account with the Role Privileges.
    65. # TODO: Check if default account also needs to be there
    66. kind: ClusterRoleBinding
    67. apiVersion: rbac.authorization.k8s.io/v1beta1
    68. metadata:
    69. name: openebs-maya-operator
    70. subjects:
    71. - kind: ServiceAccount
    72. name: openebs-maya-operator
    73. namespace: openebs
    74. roleRef:
    75. kind: ClusterRole
    76. name: openebs-maya-operator
    77. apiGroup: rbac.authorization.k8s.io
    78. ---
    79. apiVersion: apps/v1
    80. kind: Deployment
    81. metadata:
    82. name: maya-apiserver
    83. namespace: openebs
    84. labels:
    85. name: maya-apiserver
    86. openebs.io/component-name: maya-apiserver
    87. openebs.io/version: dev
    88. spec:
    89. selector:
    90. matchLabels:
    91. name: maya-apiserver
    92. openebs.io/component-name: maya-apiserver
    93. replicas: 1
    94. strategy:
    95. type: Recreate
    96. rollingUpdate: null
    97. template:
    98. metadata:
    99. labels:
    100. name: maya-apiserver
    101. openebs.io/component-name: maya-apiserver
    102. openebs.io/version: dev
    103. spec:
    104. serviceAccountName: openebs-maya-operator
    105. containers:
    106. - name: maya-apiserver
    107. imagePullPolicy: IfNotPresent
    108. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/m-apiserver:ci
    109. ports:
    110. - containerPort: 5656
    111. env:
    112. # OPENEBS_IO_KUBE_CONFIG enables maya api service to connect to K8s
    113. # based on this config. This is ignored if empty.
    114. # This is supported for maya api server version 0.5.2 onwards
    115. #- name: OPENEBS_IO_KUBE_CONFIG
    116. # value: "/home/ubuntu/.kube/config"
    117. # OPENEBS_IO_K8S_MASTER enables maya api service to connect to K8s
    118. # based on this address. This is ignored if empty.
    119. # This is supported for maya api server version 0.5.2 onwards
    120. #- name: OPENEBS_IO_K8S_MASTER
    121. # value: "http://172.28.128.3:8080"
    122. # OPENEBS_NAMESPACE provides the namespace of this deployment as an
    123. # environment variable
    124. - name: OPENEBS_NAMESPACE
    125. valueFrom:
    126. fieldRef:
    127. fieldPath: metadata.namespace
    128. # OPENEBS_SERVICE_ACCOUNT provides the service account of this pod as
    129. # environment variable
    130. - name: OPENEBS_SERVICE_ACCOUNT
    131. valueFrom:
    132. fieldRef:
    133. fieldPath: spec.serviceAccountName
    134. # OPENEBS_MAYA_POD_NAME provides the name of this pod as
    135. # environment variable
    136. - name: OPENEBS_MAYA_POD_NAME
    137. valueFrom:
    138. fieldRef:
    139. fieldPath: metadata.name
    140. # If OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG is false then OpenEBS default
    141. # storageclass and storagepool will not be created.
    142. - name: OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
    143. value: "true"
    144. # OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL decides whether default cstor sparse pool should be
    145. # configured as a part of openebs installation.
    146. # If "true" a default cstor sparse pool will be configured, if "false" it will not be configured.
    147. # This value takes effect only if OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
    148. # is set to true
    149. - name: OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL
    150. value: "false"
    151. # OPENEBS_IO_INSTALL_CRD environment variable is used to enable/disable CRD installation
    152. # from Maya API server. By default the CRDs will be installed
    153. # - name: OPENEBS_IO_INSTALL_CRD
    154. # value: "true"
    155. # OPENEBS_IO_BASE_DIR is used to configure base directory for openebs on host path.
    156. # Where OpenEBS can store required files. Default base path will be /var/openebs
    157. # - name: OPENEBS_IO_BASE_DIR
    158. # value: "/var/openebs"
    159. # OPENEBS_IO_CSTOR_TARGET_DIR can be used to specify the hostpath
    160. # to be used for saving the shared content between the side cars
    161. # of cstor volume pod.
    162. # The default path used is /var/openebs/sparse
    163. #- name: OPENEBS_IO_CSTOR_TARGET_DIR
    164. # value: "/var/openebs/sparse"
    165. # OPENEBS_IO_CSTOR_POOL_SPARSE_DIR can be used to specify the hostpath
    166. # to be used for saving the shared content between the side cars
    167. # of cstor pool pod. This ENV is also used to indicate the location
    168. # of the sparse devices.
    169. # The default path used is /var/openebs/sparse
    170. #- name: OPENEBS_IO_CSTOR_POOL_SPARSE_DIR
    171. # value: "/var/openebs/sparse"
    172. # OPENEBS_IO_JIVA_POOL_DIR can be used to specify the hostpath
    173. # to be used for default Jiva StoragePool loaded by OpenEBS
    174. # The default path used is /var/openebs
    175. # This value takes effect only if OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
    176. # is set to true
    177. #- name: OPENEBS_IO_JIVA_POOL_DIR
    178. # value: "/var/openebs"
    179. # OPENEBS_IO_LOCALPV_HOSTPATH_DIR can be used to specify the hostpath
    180. # to be used for default openebs-hostpath storageclass loaded by OpenEBS
    181. # The default path used is /var/openebs/local
    182. # This value takes effect only if OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
    183. # is set to true
    184. #- name: OPENEBS_IO_LOCALPV_HOSTPATH_DIR
    185. # value: "/var/openebs/local"
    186. - name: OPENEBS_IO_JIVA_CONTROLLER_IMAGE
    187. value: "openebs/jiva:ci"
    188. - name: OPENEBS_IO_JIVA_REPLICA_IMAGE
    189. value: "openebs/jiva:ci"
    190. - name: OPENEBS_IO_JIVA_REPLICA_COUNT
    191. value: "3"
    192. - name: OPENEBS_IO_CSTOR_TARGET_IMAGE
    193. value: "openebs/cstor-istgt:ci"
    194. - name: OPENEBS_IO_CSTOR_POOL_IMAGE
    195. value: "openebs/cstor-pool:ci"
    196. - name: OPENEBS_IO_CSTOR_POOL_MGMT_IMAGE
    197. value: "openebs/cstor-pool-mgmt:ci"
    198. - name: OPENEBS_IO_CSTOR_VOLUME_MGMT_IMAGE
    199. value: "openebs/cstor-volume-mgmt:ci"
    200. - name: OPENEBS_IO_VOLUME_MONITOR_IMAGE
    201. value: "openebs/m-exporter:ci"
    202. - name: OPENEBS_IO_CSTOR_POOL_EXPORTER_IMAGE
    203. value: "openebs/m-exporter:ci"
    204. - name: OPENEBS_IO_HELPER_IMAGE
    205. value: "openebs/linux-utils:ci"
    206. # OPENEBS_IO_ENABLE_ANALYTICS if set to true sends anonymous usage
    207. # events to Google Analytics
    208. - name: OPENEBS_IO_ENABLE_ANALYTICS
    209. value: "false"
    210. - name: OPENEBS_IO_INSTALLER_TYPE
    211. value: "openebs-operator"
    212. # OPENEBS_IO_ANALYTICS_PING_INTERVAL can be used to specify the duration (in hours)
    213. # for periodic ping events sent to Google Analytics.
    214. # Default is 24h.
    215. # Minimum is 1h. You can convert this to weekly by setting 168h
    216. #- name: OPENEBS_IO_ANALYTICS_PING_INTERVAL
    217. # value: "24h"
    218. livenessProbe:
    219. exec:
    220. command:
    221. - /usr/local/bin/mayactl
    222. - version
    223. initialDelaySeconds: 30
    224. periodSeconds: 60
    225. readinessProbe:
    226. exec:
    227. command:
    228. - /usr/local/bin/mayactl
    229. - version
    230. initialDelaySeconds: 30
    231. periodSeconds: 60
    232. ---
    233. apiVersion: v1
    234. kind: Service
    235. metadata:
    236. name: maya-apiserver-service
    237. namespace: openebs
    238. labels:
    239. openebs.io/component-name: maya-apiserver-svc
    240. spec:
    241. ports:
    242. - name: api
    243. port: 5656
    244. protocol: TCP
    245. targetPort: 5656
    246. selector:
    247. name: maya-apiserver
    248. sessionAffinity: None
    249. ---
    250. apiVersion: apps/v1
    251. kind: Deployment
    252. metadata:
    253. name: openebs-provisioner
    254. namespace: openebs
    255. labels:
    256. name: openebs-provisioner
    257. openebs.io/component-name: openebs-provisioner
    258. openebs.io/version: dev
    259. spec:
    260. selector:
    261. matchLabels:
    262. name: openebs-provisioner
    263. openebs.io/component-name: openebs-provisioner
    264. replicas: 1
    265. strategy:
    266. type: Recreate
    267. rollingUpdate: null
    268. template:
    269. metadata:
    270. labels:
    271. name: openebs-provisioner
    272. openebs.io/component-name: openebs-provisioner
    273. openebs.io/version: dev
    274. spec:
    275. serviceAccountName: openebs-maya-operator
    276. containers:
    277. - name: openebs-provisioner
    278. imagePullPolicy: IfNotPresent
    279. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/openebs-k8s-provisioner:ci
    280. env:
    281. # OPENEBS_IO_K8S_MASTER enables openebs provisioner to connect to K8s
    282. # based on this address. This is ignored if empty.
    283. # This is supported for openebs provisioner version 0.5.2 onwards
    284. #- name: OPENEBS_IO_K8S_MASTER
    285. # value: "http://10.128.0.12:8080"
    286. # OPENEBS_IO_KUBE_CONFIG enables openebs provisioner to connect to K8s
    287. # based on this config. This is ignored if empty.
    288. # This is supported for openebs provisioner version 0.5.2 onwards
    289. #- name: OPENEBS_IO_KUBE_CONFIG
    290. # value: "/home/ubuntu/.kube/config"
    291. - name: NODE_NAME
    292. valueFrom:
    293. fieldRef:
    294. fieldPath: spec.nodeName
    295. - name: OPENEBS_NAMESPACE
    296. valueFrom:
    297. fieldRef:
    298. fieldPath: metadata.namespace
    299. # OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name,
    300. # that provisioner should forward the volume create/delete requests.
    301. # If not present, "maya-apiserver-service" will be used for lookup.
    302. # This is supported for openebs provisioner version 0.5.3-RC1 onwards
    303. #- name: OPENEBS_MAYA_SERVICE_NAME
    304. # value: "maya-apiserver-apiservice"
    305. # LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
    306. # leader election is enabled.
    307. #- name: LEADER_ELECTION_ENABLED
    308. # value: "true"
    309. # Process name used for matching is limited to the 15 characters
    310. # present in the pgrep output.
    311. # So fullname can't be used here with pgrep (>15 chars).A regular expression
    312. # that matches the entire command name has to specified.
    313. # Anchor `^` : matches any string that starts with `openebs-provis`
    314. # `.*`: matches any string that has `openebs-provis` followed by zero or more char
    315. livenessProbe:
    316. exec:
    317. command:
    318. - sh
    319. - -c
    320. - test `pgrep -c "^openebs-provisi.*"` = 1
    321. initialDelaySeconds: 30
    322. periodSeconds: 60
    323. ---
    324. apiVersion: apps/v1
    325. kind: Deployment
    326. metadata:
    327. name: openebs-snapshot-operator
    328. namespace: openebs
    329. labels:
    330. name: openebs-snapshot-operator
    331. openebs.io/component-name: openebs-snapshot-operator
    332. openebs.io/version: dev
    333. spec:
    334. selector:
    335. matchLabels:
    336. name: openebs-snapshot-operator
    337. openebs.io/component-name: openebs-snapshot-operator
    338. replicas: 1
    339. strategy:
    340. type: Recreate
    341. template:
    342. metadata:
    343. labels:
    344. name: openebs-snapshot-operator
    345. openebs.io/component-name: openebs-snapshot-operator
    346. openebs.io/version: dev
    347. spec:
    348. serviceAccountName: openebs-maya-operator
    349. containers:
    350. - name: snapshot-controller
    351. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/snapshot-controller:ci
    352. imagePullPolicy: IfNotPresent
    353. env:
    354. - name: OPENEBS_NAMESPACE
    355. valueFrom:
    356. fieldRef:
    357. fieldPath: metadata.namespace
    358. # Process name used for matching is limited to the 15 characters
    359. # present in the pgrep output.
    360. # So fullname can't be used here with pgrep (>15 chars).A regular expression
    361. # that matches the entire command name has to specified.
    362. # Anchor `^` : matches any string that starts with `snapshot-contro`
    363. # `.*`: matches any string that has `snapshot-contro` followed by zero or more char
    364. livenessProbe:
    365. exec:
    366. command:
    367. - sh
    368. - -c
    369. - test `pgrep -c "^snapshot-contro.*"` = 1
    370. initialDelaySeconds: 30
    371. periodSeconds: 60
    372. # OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name,
    373. # that snapshot controller should forward the snapshot create/delete requests.
    374. # If not present, "maya-apiserver-service" will be used for lookup.
    375. # This is supported for openebs provisioner version 0.5.3-RC1 onwards
    376. #- name: OPENEBS_MAYA_SERVICE_NAME
    377. # value: "maya-apiserver-apiservice"
    378. - name: snapshot-provisioner
    379. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/snapshot-provisioner:ci
    380. imagePullPolicy: IfNotPresent
    381. env:
    382. - name: OPENEBS_NAMESPACE
    383. valueFrom:
    384. fieldRef:
    385. fieldPath: metadata.namespace
    386. # OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name,
    387. # that snapshot provisioner should forward the clone create/delete requests.
    388. # If not present, "maya-apiserver-service" will be used for lookup.
    389. # This is supported for openebs provisioner version 0.5.3-RC1 onwards
    390. #- name: OPENEBS_MAYA_SERVICE_NAME
    391. # value: "maya-apiserver-apiservice"
    392. # LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
    393. # leader election is enabled.
    394. #- name: LEADER_ELECTION_ENABLED
    395. # value: "true"
    396. # Process name used for matching is limited to the 15 characters
    397. # present in the pgrep output.
    398. # So fullname can't be used here with pgrep (>15 chars).A regular expression
    399. # that matches the entire command name has to specified.
    400. # Anchor `^` : matches any string that starts with `snapshot-provis`
    401. # `.*`: matches any string that has `snapshot-provis` followed by zero or more char
    402. livenessProbe:
    403. exec:
    404. command:
    405. - sh
    406. - -c
    407. - test `pgrep -c "^snapshot-provis.*"` = 1
    408. initialDelaySeconds: 30
    409. periodSeconds: 60
    410. ---
    411. # This is the node-disk-manager related config.
    412. # It can be used to customize the disks probes and filters
    413. apiVersion: v1
    414. kind: ConfigMap
    415. metadata:
    416. name: openebs-ndm-config
    417. namespace: openebs
    418. labels:
    419. openebs.io/component-name: ndm-config
    420. data:
    421. # udev-probe is default or primary probe which should be enabled to run ndm
    422. # filterconfigs contails configs of filters - in their form fo include
    423. # and exclude comma separated strings
    424. node-disk-manager.config: |
    425. probeconfigs:
    426. - key: udev-probe
    427. name: udev probe
    428. state: true
    429. - key: seachest-probe
    430. name: seachest probe
    431. state: false
    432. - key: smart-probe
    433. name: smart probe
    434. state: true
    435. filterconfigs:
    436. - key: os-disk-exclude-filter
    437. name: os disk exclude filter
    438. state: true
    439. exclude: "/,/etc/hosts,/boot"
    440. - key: vendor-filter
    441. name: vendor filter
    442. state: true
    443. include: ""
    444. exclude: "CLOUDBYT,OpenEBS"
    445. - key: path-filter
    446. name: path filter
    447. state: true
    448. include: ""
    449. exclude: "/dev/loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-,/dev/md,/dev/rbd,/dev/zd"
    450. ---
    451. apiVersion: apps/v1
    452. kind: DaemonSet
    453. metadata:
    454. name: openebs-ndm
    455. namespace: openebs
    456. labels:
    457. name: openebs-ndm
    458. openebs.io/component-name: ndm
    459. openebs.io/version: dev
    460. spec:
    461. selector:
    462. matchLabels:
    463. name: openebs-ndm
    464. openebs.io/component-name: ndm
    465. updateStrategy:
    466. type: RollingUpdate
    467. template:
    468. metadata:
    469. labels:
    470. name: openebs-ndm
    471. openebs.io/component-name: ndm
    472. openebs.io/version: dev
    473. spec:
    474. # By default the node-disk-manager will be run on all kubernetes nodes
    475. # If you would like to limit this to only some nodes, say the nodes
    476. # that have storage attached, you could label those node and use
    477. # nodeSelector.
    478. #
    479. # e.g. label the storage nodes with - "openebs.io/nodegroup"="storage-node"
    480. # kubectl label node <node-name> "openebs.io/nodegroup"="storage-node"
    481. #nodeSelector:
    482. # "openebs.io/nodegroup": "storage-node"
    483. serviceAccountName: openebs-maya-operator
    484. hostNetwork: true
    485. # host PID is used to check status of iSCSI Service when the NDM
    486. # API service is enabled
    487. #hostPID: true
    488. containers:
    489. - name: node-disk-manager
    490. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/node-disk-manager:ci
    491. args:
    492. - -v=4
    493. # The feature-gate is used to enable the new UUID algorithm.
    494. - --feature-gates="GPTBasedUUID"
    495. # The feature gate is used to start the gRPC API service. The gRPC server
    496. # starts at 9115 port by default. This feature is currently in Alpha state
    497. # - --feature-gates="APIService"
    498. imagePullPolicy: IfNotPresent
    499. securityContext:
    500. privileged: true
    501. volumeMounts:
    502. - name: config
    503. mountPath: /host/node-disk-manager.config
    504. subPath: node-disk-manager.config
    505. readOnly: true
    506. - name: udev
    507. mountPath: /run/udev
    508. - name: procmount
    509. mountPath: /host/proc
    510. readOnly: true
    511. - name: devmount
    512. mountPath: /dev
    513. - name: basepath
    514. mountPath: /var/openebs/ndm
    515. - name: sparsepath
    516. mountPath: /var/openebs/sparse
    517. env:
    518. # namespace in which NDM is installed will be passed to NDM Daemonset
    519. # as environment variable
    520. - name: NAMESPACE
    521. valueFrom:
    522. fieldRef:
    523. fieldPath: metadata.namespace
    524. # pass hostname as env variable using downward API to the NDM container
    525. - name: NODE_NAME
    526. valueFrom:
    527. fieldRef:
    528. fieldPath: spec.nodeName
    529. # specify the directory where the sparse files need to be created.
    530. # if not specified, then sparse files will not be created.
    531. - name: SPARSE_FILE_DIR
    532. value: "/var/openebs/sparse"
    533. # Size(bytes) of the sparse file to be created.
    534. - name: SPARSE_FILE_SIZE
    535. value: "10737418240"
    536. # Specify the number of sparse files to be created
    537. - name: SPARSE_FILE_COUNT
    538. value: "1"
    539. # Process name used for matching is limited to the 15 characters
    540. # present in the pgrep output.
    541. # So fullname can be used here with pgrep (cmd is < 15 chars).
    542. livenessProbe:
    543. exec:
    544. command:
    545. - pgrep
    546. - "ndm"
    547. initialDelaySeconds: 30
    548. periodSeconds: 60
    549. volumes:
    550. - name: config
    551. configMap:
    552. name: openebs-ndm-config
    553. - name: udev
    554. hostPath:
    555. path: /run/udev
    556. type: Directory
    557. # mount /proc (to access mount file of process 1 of host) inside container
    558. # to read mount-point of disks and partitions
    559. - name: procmount
    560. hostPath:
    561. path: /proc
    562. type: Directory
    563. - name: devmount
    564. # the /dev directory is mounted so that we have access to the devices that
    565. # are connected at runtime of the pod.
    566. hostPath:
    567. path: /dev
    568. type: Directory
    569. - name: basepath
    570. hostPath:
    571. path: /var/openebs/ndm
    572. type: DirectoryOrCreate
    573. - name: sparsepath
    574. hostPath:
    575. path: /var/openebs/sparse
    576. ---
    577. apiVersion: apps/v1
    578. kind: Deployment
    579. metadata:
    580. name: openebs-ndm-operator
    581. namespace: openebs
    582. labels:
    583. name: openebs-ndm-operator
    584. openebs.io/component-name: ndm-operator
    585. openebs.io/version: dev
    586. spec:
    587. selector:
    588. matchLabels:
    589. name: openebs-ndm-operator
    590. openebs.io/component-name: ndm-operator
    591. replicas: 1
    592. strategy:
    593. type: Recreate
    594. template:
    595. metadata:
    596. labels:
    597. name: openebs-ndm-operator
    598. openebs.io/component-name: ndm-operator
    599. openebs.io/version: dev
    600. spec:
    601. serviceAccountName: openebs-maya-operator
    602. containers:
    603. - name: node-disk-operator
    604. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/node-disk-operator:ci
    605. imagePullPolicy: IfNotPresent
    606. readinessProbe:
    607. exec:
    608. command:
    609. - stat
    610. - /tmp/operator-sdk-ready
    611. initialDelaySeconds: 4
    612. periodSeconds: 10
    613. failureThreshold: 1
    614. env:
    615. - name: WATCH_NAMESPACE
    616. valueFrom:
    617. fieldRef:
    618. fieldPath: metadata.namespace
    619. - name: POD_NAME
    620. valueFrom:
    621. fieldRef:
    622. fieldPath: metadata.name
    623. # the service account of the ndm-operator pod
    624. - name: SERVICE_ACCOUNT
    625. valueFrom:
    626. fieldRef:
    627. fieldPath: spec.serviceAccountName
    628. - name: OPERATOR_NAME
    629. value: "node-disk-operator"
    630. - name: CLEANUP_JOB_IMAGE
    631. value: "openebs/linux-utils:ci"
    632. # OPENEBS_IO_INSTALL_CRD environment variable is used to enable/disable CRD installation
    633. # from NDM operator. By default the CRDs will be installed
    634. #- name: OPENEBS_IO_INSTALL_CRD
    635. # value: "true"
    636. # Process name used for matching is limited to the 15 characters
    637. # present in the pgrep output.
    638. # So fullname can be used here with pgrep (cmd is < 15 chars).
    639. livenessProbe:
    640. exec:
    641. command:
    642. - pgrep
    643. - "ndo"
    644. initialDelaySeconds: 30
    645. periodSeconds: 60
    646. ---
    647. apiVersion: apps/v1
    648. kind: Deployment
    649. metadata:
    650. name: openebs-admission-server
    651. namespace: openebs
    652. labels:
    653. app: admission-webhook
    654. openebs.io/component-name: admission-webhook
    655. openebs.io/version: dev
    656. spec:
    657. replicas: 1
    658. strategy:
    659. type: Recreate
    660. rollingUpdate: null
    661. selector:
    662. matchLabels:
    663. app: admission-webhook
    664. template:
    665. metadata:
    666. labels:
    667. app: admission-webhook
    668. openebs.io/component-name: admission-webhook
    669. openebs.io/version: dev
    670. spec:
    671. serviceAccountName: openebs-maya-operator
    672. containers:
    673. - name: admission-webhook
    674. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/admission-server:ci
    675. imagePullPolicy: IfNotPresent
    676. args:
    677. - -alsologtostderr
    678. - -v=2
    679. - 2>&1
    680. env:
    681. - name: OPENEBS_NAMESPACE
    682. valueFrom:
    683. fieldRef:
    684. fieldPath: metadata.namespace
    685. - name: ADMISSION_WEBHOOK_NAME
    686. value: "openebs-admission-server"
    687. - name: ADMISSION_WEBHOOK_FAILURE_POLICY
    688. value: "Fail"
    689. # Process name used for matching is limited to the 15 characters
    690. # present in the pgrep output.
    691. # So fullname can't be used here with pgrep (>15 chars).A regular expression
    692. # Anchor `^` : matches any string that starts with `admission-serve`
    693. # `.*`: matche any string that has `admission-serve` followed by zero or more char
    694. # that matches the entire command name has to specified.
    695. livenessProbe:
    696. exec:
    697. command:
    698. - sh
    699. - -c
    700. - test `pgrep -c "^admission-serve.*"` = 1
    701. initialDelaySeconds: 30
    702. periodSeconds: 60
    703. ---
    704. apiVersion: apps/v1
    705. kind: Deployment
    706. metadata:
    707. name: openebs-localpv-provisioner
    708. namespace: openebs
    709. labels:
    710. name: openebs-localpv-provisioner
    711. openebs.io/component-name: openebs-localpv-provisioner
    712. openebs.io/version: dev
    713. spec:
    714. selector:
    715. matchLabels:
    716. name: openebs-localpv-provisioner
    717. openebs.io/component-name: openebs-localpv-provisioner
    718. replicas: 1
    719. strategy:
    720. type: Recreate
    721. template:
    722. metadata:
    723. labels:
    724. name: openebs-localpv-provisioner
    725. openebs.io/component-name: openebs-localpv-provisioner
    726. openebs.io/version: dev
    727. spec:
    728. serviceAccountName: openebs-maya-operator
    729. containers:
    730. - name: openebs-provisioner-hostpath
    731. imagePullPolicy: IfNotPresent
    732. image: registry.cn-hangzhou.aliyuncs.com/k8smaste/zp/openebs/provisioner-localpv:ci
    733. env:
    734. # OPENEBS_IO_K8S_MASTER enables openebs provisioner to connect to K8s
    735. # based on this address. This is ignored if empty.
    736. # This is supported for openebs provisioner version 0.5.2 onwards
    737. #- name: OPENEBS_IO_K8S_MASTER
    738. # value: "http://10.128.0.12:8080"
    739. # OPENEBS_IO_KUBE_CONFIG enables openebs provisioner to connect to K8s
    740. # based on this config. This is ignored if empty.
    741. # This is supported for openebs provisioner version 0.5.2 onwards
    742. #- name: OPENEBS_IO_KUBE_CONFIG
    743. # value: "/home/ubuntu/.kube/config"
    744. - name: NODE_NAME
    745. valueFrom:
    746. fieldRef:
    747. fieldPath: spec.nodeName
    748. - name: OPENEBS_NAMESPACE
    749. valueFrom:
    750. fieldRef:
    751. fieldPath: metadata.namespace
    752. # OPENEBS_SERVICE_ACCOUNT provides the service account of this pod as
    753. # environment variable
    754. - name: OPENEBS_SERVICE_ACCOUNT
    755. valueFrom:
    756. fieldRef:
    757. fieldPath: spec.serviceAccountName
    758. - name: OPENEBS_IO_ENABLE_ANALYTICS
    759. value: "false"
    760. - name: OPENEBS_IO_INSTALLER_TYPE
    761. value: "openebs-operator"
    762. - name: OPENEBS_IO_HELPER_IMAGE
    763. value: "openebs/linux-utils:2.3.0"
    764. # LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
    765. # leader election is enabled.
    766. #- name: LEADER_ELECTION_ENABLED
    767. # value: "true"
    768. # Process name used for matching is limited to the 15 characters
    769. # present in the pgrep output.
    770. # So fullname can't be used here with pgrep (>15 chars).A regular expression
    771. # that matches the entire command name has to specified.
    772. # Anchor `^` : matches any string that starts with `provisioner-loc`
    773. # `.*`: matches any string that has `provisioner-loc` followed by zero or more char
    774. livenessProbe:
    775. exec:
    776. command:
    777. - sh
    778. - -c
    779. - test `pgrep -c "^provisioner-loc.*"` = 1
    780. initialDelaySeconds: 30
    781. periodSeconds: 60
    782. ---