[ceph-provisioner] Add check for empty ceph endpoint

This is to add check to find out empty ceph mon endpoint while
generating ceph etc configmap for clients.

Change-Id: I6579a268c5f4bc458120dda66667988e5a529ee9
This commit is contained in:
Chinasubbareddy Mallavarapu 2021-07-27 18:57:35 +00:00 committed by chinasubbareddy mallavarapu
parent adab36be22
commit bf5f545c1c
3 changed files with 8 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.8
version: 0.1.10
home: https://github.com/ceph/ceph
...

View File

@ -23,7 +23,12 @@ ENDPOINT=$(kubectl get endpoints ceph-mon-discovery -n ${PVC_CEPH_RBD_STORAGECLA
-v msgr2_port=${MON_PORT_V2} \
'/"ip"/{print "["version":"$4":"port"/"0","msgr_version":"$4":"msgr2_port"/"0"]"}' | paste -sd',')
echo $ENDPOINT
if [ -z "$ENDPOINT" ]; then
echo "Ceph Mon endpoint is empty"
exit 1
else
echo $ENDPOINT
fi
kubectl get cm ${CEPH_CONF_ETC} -n ${DEPLOYMENT_NAMESPACE} -o yaml | \
sed "s#mon_host.*#mon_host = ${ENDPOINT}#g" | \

View File

@ -9,4 +9,5 @@ ceph-provisioners:
- 0.1.6 Update ceph_mon config as per new ceph clients
- 0.1.7 Use full image ref for docker official images
- 0.1.8 Enable Ceph CSI Provisioner to Stand Alone
- 0.1.10 Add check for empty ceph endpoint
...