Skip to content

Commit

Permalink
Fix unsupported string formatting code in K8s
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Wolf <[email protected]>
  • Loading branch information
NotTheEvilOne committed Sep 10, 2024
1 parent 6e95bfa commit dde5d60
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rookify/modules/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,39 @@ def mds_placement_label(self) -> str:
return (
str(self._rook_config["cluster"]["mds_placement_label"])
if "mds_placement_label" in self._rook_config["cluster"]
else f"placement-{self._rook_config["cluster"]["name"]}-mds"
else "placement-{0}-mds".format(self._rook_config["cluster"]["name"])
)

@property
def mon_placement_label(self) -> str:
return (
str(self._rook_config["cluster"]["mon_placement_label"])
if "mon_placement_label" in self._rook_config["cluster"]
else f"placement-{self._rook_config["cluster"]["name"]}-mon"
else "placement-{0}-mon".format(self._rook_config["cluster"]["name"])
)

@property
def mgr_placement_label(self) -> str:
return (
str(self._rook_config["cluster"]["mgr_placement_label"])
if "mgr_placement_label" in self._rook_config["cluster"]
else f"placement-{self._rook_config["cluster"]["name"]}-mgr"
else "placement-{0}-mgr".format(self._rook_config["cluster"]["name"])
)

@property
def osd_placement_label(self) -> str:
return (
str(self._rook_config["cluster"]["osd_placement_label"])
if "osd_placement_label" in self._rook_config["cluster"]
else f"placement-{self._rook_config["cluster"]["name"]}-osd"
else "placement-{0}-osd".format(self._rook_config["cluster"]["name"])
)

@property
def rgw_placement_label(self) -> str:
return (
str(self._rook_config["cluster"]["rgw_placement_label"])
if "rgw_placement_label" in self._rook_config["cluster"]
else f"placement-{self._rook_config["cluster"]["name"]}-rgw"
else "placement-{0}-rgw".format(self._rook_config["cluster"]["name"])
)

def check_nodes_for_initial_label_state(self, label: str) -> None:
Expand Down

0 comments on commit dde5d60

Please sign in to comment.