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_cephfs_namespace: "ceph-csi-cephfs"
ceph_csi_cephfs_chart_ref: "ceph-csi/ceph-csi-cephfs"
ceph_csi_cephfs_default_values:
nodeplugin:
httpMetrics:
# Fix nginx conflict
containerPort: 8083
storageClass:
# Specifies whether the storageclass should be created
create: true
name: csi-cephfs-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) CephFS filesystem name into which the volume shall be created
# eg: fsName: myfs
fsName: cephfs
secret:
# Specifies whether the secret should be created
create: true
name: csi-cephfs-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_cephfs_combined_values: "{{ ceph_csi_cephfs_default_values | combine(ceph_csi_cephfs_values, recursive=true) }}"
- name: Deploy CSI CephFS {{ ceph_csi_cephfs_version }}
kubernetes.core.helm:
create_namespace: true
release_namespace: "{{ ceph_csi_cephfs_namespace | default('ceph-csi-cephfs') }}"
release_name: "{{ ceph_csi_cephfs_name | default('ceph-csi-cephfs') }}"
chart_ref: "{{ ceph_csi_cephfs_chart_ref }}"
chart_version: "{{ ceph_csi_cephfs_version | default(omit) }}"
release_values: "{{ ceph_csi_cephfs_combined_values | from_yaml | default(omit) }}"
#wait: true