Skip to content

Commit

Permalink
Added an init container for grand central
Browse files Browse the repository at this point in the history
... that explicitly waits for the associated CrateDB to be started.
  • Loading branch information
SStorm committed Feb 23, 2024
1 parent 0a9de56 commit 717c9bc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ Changelog
Unreleased
----------

* Added an init container for grand central, that explicitly waits for the associated
CrateDB to be started.

* Changed the image pull policy for Grand Central to ``IfNotPresent``, there's no reason
to always pull.


2.36.0 (2024-02-21)
-------------------

Expand All @@ -14,6 +21,7 @@ Unreleased

* Fixed a bug that subhandlers were erroneously considered to be timed out.


2.35.0 (2024-02-15)
-------------------

Expand Down
11 changes: 10 additions & 1 deletion crate/operator/grand_central.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,20 @@ def get_grand_central_deployment(
name=f"{GRAND_CENTRAL_RESOURCE_PREFIX}-{name}",
),
spec=V1PodSpec(
init_containers=[
V1Container(
env=env,
image=spec["grandCentral"]["backendImage"],
image_pull_policy="IfNotPresent",
name="wait-for-crate",
command=["./wait-for-cratedb.py"],
)
],
containers=[
V1Container(
env=env,
image=spec["grandCentral"]["backendImage"],
image_pull_policy="Always",
image_pull_policy="IfNotPresent",
name=f"{GRAND_CENTRAL_RESOURCE_PREFIX}-api",
ports=[
V1ContainerPort(
Expand Down

0 comments on commit 717c9bc

Please sign in to comment.