Skip to content

Commit

Permalink
ceph: Provide 'ceph-rgw' Storage class only if 'rgw_endpoint' exists
Browse files Browse the repository at this point in the history
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
  • Loading branch information
aruniiird committed Jul 30, 2020
1 parent 4e9d1a1 commit e047834
Showing 1 changed file with 10 additions and 7 deletions.
Expand Up @@ -473,13 +473,6 @@ def gen_json_out(self):
"pool": self.out_map['RBD_POOL_NAME']
}
},
{
"name": "ceph-rgw",
"kind": "StorageClass",
"data": {
"endpoint": self.out_map['RGW_ENDPOINT']
}
},
{
"name": "monitoring-endpoint",
"kind": "CephCluster",
Expand All @@ -500,6 +493,16 @@ def gen_json_out(self):
"pool": self.out_map['CEPHFS_POOL_NAME']
}
})
# if 'RGW_ENDPOINT' exists, then only add 'ceph-rgw' StorageClass
if self.out_map['RGW_ENDPOINT']:
json_out.append(
{
"name": "ceph-rgw",
"kind": "StorageClass",
"data": {
"endpoint": self.out_map['RGW_ENDPOINT']
}
})
return json.dumps(json_out)+LINESEP

def main(self):
Expand Down

0 comments on commit e047834

Please sign in to comment.