Skip to content

Commit

Permalink
Changed download URLs for dc_util
Browse files Browse the repository at this point in the history
  • Loading branch information
WalBeh committed Nov 28, 2024
1 parent f2809e9 commit e9545b4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
10 changes: 5 additions & 5 deletions crate/operator/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ def get_statefulset_containers(
"/bin/sh",
"-c",
"curl -sLO "
"https://raw.githubusercontent.com/crate/crate-operator/master/dc_util && " # noqa
"https://github.com/crate/crate-operator/releases/download/dc_util_v1.0.0/dc_util-linux-amd64 && " # noqa
"curl -sLO "
"https://raw.githubusercontent.com/crate/crate-operator/master/dc_util && " # noqa
"sha256sum -c dc_util.sha256 && "
"chmod u+x ./dc_util && \n"
"./dc_util -min-availability PRIMARIES "
"https://github.com/crate/crate-operator/releases/download/dc_util_v1.0.0/dc_util-linux-amd64.sha256 && " # noqa
"sha256sum -c dc_util-linux-amd64.sha256 && "
"chmod u+x ./dc_util-linux-amd64 && \n"
"./dc_util-linux-amd64 -min-availability PRIMARIES "
f"-timeout {DECOMMISSION_TIMEOUT}",
]
)
Expand Down
5 changes: 4 additions & 1 deletion tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,10 @@ def test_get_cluster_resource_limits(node_spec, expected_limits_cpu):

@pytest.mark.asyncio
async def test_download_dc_util():
url = "https://raw.githubusercontent.com/crate/crate-operator/master/dc_util"
url = (
"https://github.com/crate/crate-operator/releases/download/dc_util_v1.0.0/"
"dc_util-linux-amd64"
)
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
assert response.status == 200, f"Expected status 200, got {response.status}"
12 changes: 6 additions & 6 deletions utils/dc_util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ to the ServiceAccount:
This needs to be created/setup manually, or by the crate-operator.
When the decommission is sent to the cluster the command almost immediately returns. Nevertheless
cratedb started the decommissioning in the background andwe need to wait until cratedb
cratedb started the decommissioning in the background and we need to wait until cratedb
exit's.
After that control is _returned_ to`kubelet` which continues by sending SIGTERM.
`Termination Grace Period` needs to be set longer than the decomission timeout, as
Expand All @@ -50,11 +50,11 @@ to the cratedb containers configuration:
- /bin/sh
- -c
- |
curl -sLO https://raw.githubusercontent.com/crate/crate-operator/master/dc_util && \
curl -sLO https://raw.githubusercontent.com/crate/crate-operator/master/dc_util.sha256 && \
sha256sum -c dc_util.sha256 && \
chmod u+x ./dc_util && \
./dc_util -min-availability PRIMARIES
curl -sLO https://github.com/crate/crate-operator/releases/download/dc_util_v1.0.0/dc_util-linux-amd64 && \
curl -sLO https://github.com/crate/crate-operator/releases/download/dc_util_v1.0.0/dc_util-linux-amd64.sha256 && \
sha256sum -c dc_util-linux-amd64.sha256 && \
chmod u+x ./dc_util-linux-amd64 && \
./dc_util-linux-amd64 -min-availability PRIMARIES
terminationGracePeriodSeconds: 7230
Expand Down

0 comments on commit e9545b4

Please sign in to comment.