From b1b74f74c287b1d7efb86567d3296bddf17ca92a Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Mon, 20 Jan 2025 12:35:30 +0100 Subject: [PATCH] mgr/cephadm: fixing oauth_proxy pre_remove action Signed-off-by: Redouane Kachach --- src/pybind/mgr/cephadm/services/oauth2_proxy.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pybind/mgr/cephadm/services/oauth2_proxy.py b/src/pybind/mgr/cephadm/services/oauth2_proxy.py index 89ee720620acb..372383bdb6a81 100644 --- a/src/pybind/mgr/cephadm/services/oauth2_proxy.py +++ b/src/pybind/mgr/cephadm/services/oauth2_proxy.py @@ -88,3 +88,11 @@ class OAuth2ProxyService(CephadmService): } return daemon_config, [] + + def pre_remove(self, daemon: DaemonDescription) -> None: + """ + Called before mgmt-gateway daemon is removed. + """ + # delete cert/key entires for this mgmt-gateway daemon + self.mgr.cert_mgr.rm_cert('oauth2_proxy_cert') + self.mgr.cert_mgr.rm_key('oauth2_proxy_key') -- 2.39.5