From 93c256d153a1629aac0a373a323f9e4336ed290e Mon Sep 17 00:00:00 2001 From: Walter Behmann Date: Fri, 11 Oct 2024 17:47:02 +0200 Subject: [PATCH] Rename decommission_util --- crate/operator/create.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crate/operator/create.py b/crate/operator/create.py index 48721acd..17507612 100644 --- a/crate/operator/create.py +++ b/crate/operator/create.py @@ -387,10 +387,11 @@ def get_statefulset_containers( command=[ "/bin/sh", "-c", - "curl -O" - "https://cdn.crate.io/downloads/tmp/decommission_util && " # noqa - "chmod u+x ./decommission_util && " - "./decommission_util -min-availability PRIMARIES " + "ARCH=$(uname -m) && " + "curl -O " + "https://cdn.crate.io/downloads/dc_util_$ARCH && " # noqa + "chmod u+x ./dc_util_$ARCH && \n" + "./dc_util_$ARCH -min-availability PRIMARIES " f"-timeout {DECOMMISSION_TIMEOUT}", ] ) @@ -947,7 +948,7 @@ async def create_statefulset( body=pdb, ) """ - A ClusterRole is required to allow the POD to access the + A Role is required to allow the POD to access the number of replicas in the StatefulSet. This is required for the pre-stop lifecycle hook to work correctly and detect a scale to 0. """ @@ -979,7 +980,7 @@ async def create_statefulset( ), role_ref=V1RoleRef( api_group="rbac.authorization.k8s.io", - kind="ClusterRole", + kind="Role", name=f"crate-{name}", ), subjects=[