Skip to content

Commit bd049ed

Browse files
committed
mgr/cephadm: adding the SSL cert as a dependency for rgw service
this way when the user changes the SSL certificate in the spec and performs an 'orch apply' cephadm will detect the change and reconfigure the rgw service automatically Fixes: https://tracker.ceph.com/issues/69863 Signed-off-by: Redouane Kachach <[email protected]>
1 parent fd42b87 commit bd049ed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/pybind/mgr/cephadm/services/cephadmservice.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,21 @@ class RgwService(CephService):
996996
def allow_colo(self) -> bool:
997997
return True
998998

999+
@classmethod
1000+
def get_dependencies(cls, mgr: "CephadmOrchestrator",
1001+
spec: Optional[ServiceSpec] = None,
1002+
daemon_type: Optional[str] = None) -> List[str]:
1003+
1004+
deps = []
1005+
rgw_spec = cast(RGWSpec, spec)
1006+
ssl_cert = getattr(rgw_spec, 'rgw_frontend_ssl_certificate', None)
1007+
if ssl_cert:
1008+
if isinstance(ssl_cert, list):
1009+
ssl_cert = '\n'.join(ssl_cert)
1010+
deps.append(f'ssl-cert:{str(utils.md5_hash(ssl_cert))}')
1011+
1012+
return sorted(deps)
1013+
9991014
def set_realm_zg_zone(self, spec: RGWSpec) -> None:
10001015
assert self.TYPE == spec.service_type
10011016

0 commit comments

Comments
 (0)