[ceph-provisioner] Add support to connect to rook-ceph cluster

This is to add support for rook-ceph in provisioner chart so that
if any clients want to connect can  make use of it .

Change-Id: I26c28fac3fa0f5d0b0e71a288217b37a5ca8fb13
This commit is contained in:
Chinasubbareddy Mallavarapu 2021-09-29 20:36:23 +00:00
parent 46c8218fbf
commit 6e1f2b4087
5 changed files with 17 additions and 2 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph Provisioner
name: ceph-provisioners
version: 0.1.14
version: 0.1.15
home: https://github.com/ceph/ceph
...

View File

@ -21,6 +21,12 @@ CEPH_RBD_KEY=$(kubectl get secret ${PVC_CEPH_RBD_STORAGECLASS_ADMIN_SECRET_NAME}
--namespace=${PVC_CEPH_RBD_STORAGECLASS_DEPLOYED_NAMESPACE} \
-o json )
if [[ ${CONNECT_TO_ROOK_CEPH_CLUSTER} == "true" ]] ; then
CEPH_CLUSTER_KEY=$(echo "${CEPH_RBD_KEY}" | jq -r '.data["ceph-secret"]')
else
CEPH_CLUSTER_KEY=$(echo "${CEPH_RBD_KEY}" | jq -r '.data.key')
fi
ceph_activate_namespace() {
kube_namespace=$1
secret_type=$2
@ -41,4 +47,4 @@ EOF
} | kubectl apply --namespace ${kube_namespace} -f -
}
ceph_activate_namespace ${DEPLOYMENT_NAMESPACE} "kubernetes.io/rbd" ${PVC_CEPH_RBD_STORAGECLASS_USER_SECRET_NAME} "$(echo ${CEPH_RBD_KEY} | jq -r '.data.key')"
ceph_activate_namespace ${DEPLOYMENT_NAMESPACE} "kubernetes.io/rbd" ${PVC_CEPH_RBD_STORAGECLASS_USER_SECRET_NAME} "${CEPH_CLUSTER_KEY}"

View File

@ -115,6 +115,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if eq .Values.ext_ceph_cluster.rook_ceph.connect true }}
- name: CONNECT_TO_ROOK_CEPH_CLUSTER
value: "true"
{{- end }}
{{- if eq .Values.storageclass.csi_rbd.provision_storage_class true }}
- name: PVC_CEPH_RBD_STORAGECLASS_USER_SECRET_NAME
value: {{ .Values.storageclass.csi_rbd.parameters.userSecretName }}

View File

@ -302,6 +302,10 @@ conf:
ms_bind_port_min: 6800
ms_bind_port_max: 7100
ext_ceph_cluster:
rook_ceph:
connect: false
dependencies:
dynamic:
common:

View File

@ -14,4 +14,5 @@ ceph-provisioners:
- 0.1.12 Add ceph mon v2 port for ceph csi provisioner
- 0.1.13 Fix ceph-provisioner rbd-healer error
- 0.1.14 Helm 3 - Fix Job labels
- 0.1.15 Add support to connect to rook-ceph cluster
...