add csi ceph

This commit is contained in:
ace
2023-06-11 02:50:22 +03:00
parent 73f93631c2
commit b44245392e
8 changed files with 121 additions and 5 deletions

View File

@ -0,0 +1,37 @@
ceph_csi_rbd_namespace: "ceph-csi-rbd"
ceph_csi_rbd_chart_ref: "ceph-csi/ceph-csi-rbd"
ceph_csi_rbd_default_values:
nodeplugin:
httpMetrics:
# Fix nginx conflict
containerPort: 8082
storageClass:
# Specifies whether the storageclass should be created
create: true
name: csi-rbd-sc
# Annotations for the storage class
# Example:
# annotations:
# storageclass.kubernetes.io/is-default-class: "true"
annotations: {}
# (required) String representing a Ceph cluster to provision storage from.
# Should be unique across all Ceph clusters in use for provisioning,
# cannot be greater than 36 bytes in length, and should remain immutable for
# the lifetime of the StorageClass in use.
clusterID: ceph
# (required) Ceph pool into which the RBD image shall be created
# eg: pool: replicapool
pool: k8s
secret:
# Specifies whether the secret should be created
create: true
name: csi-rbd-secret
# Key values correspond to a user name and its key, as defined in the
# ceph cluster. User ID should have required access to the 'pool'
# specified in the storage class
userID: ""
userKey: ""

View File

@ -0,0 +1,12 @@
- set_fact:
ceph_csi_rbd_combined_values: "{{ ceph_csi_rbd_default_values | combine(ceph_csi_rbd_values, recursive=true) }}"
- name: Deploy CSI Ceph RBD {{ ceph_csi_rbd_version }}
kubernetes.core.helm:
create_namespace: true
release_namespace: "{{ ceph_csi_rbd_namespace | default('ceph-csi-rbd') }}"
release_name: "{{ ceph_csi_rbd_name | default('ceph-csi-rbd') }}"
chart_ref: "{{ ceph_csi_rbd_chart_ref }}"
chart_version: "{{ ceph_csi_rbd_version | default(omit) }}"
release_values: "{{ ceph_csi_rbd_combined_values | from_yaml | default(omit) }}"
#wait: true