Skip to content

Commit

Permalink
Providing a way to customize initialDelaySeconds for livenessProbe an…
Browse files Browse the repository at this point in the history
…d readinessProbe
  • Loading branch information
koropets committed Jan 24, 2022
1 parent a2ed558 commit 52f0b35
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions gordo/cli/workflow_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,20 @@ def workflow_cli(gordo_ctx):
type=int,
default=50,
)
@click.option(
"--gordo-server-readiness-initial-delay",
help="initialDelaySeconds for gordo-server's readinessProbe",
envvar=f"{PREFIX}_GORDO_SERVER_READINESS_INITIAL_DELAY",
type=int,
default=20,
)
@click.option(
"--gordo-server-liveness-initial-delay",
help="initialDelaySeconds for gordo-server's livenessProbe",
envvar=f"{PREFIX}_GORDO_SERVER_LIVENESS_INITIAL_DELAY",
type=int,
default=5,
)
@click.pass_context
def workflow_generator_cli(gordo_ctx, **ctx):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1084,13 +1084,13 @@ spec:
httpGet:
path: /healthcheck
port: http-api
initialDelaySeconds: 600 # We give it a lot of time to load the model and start up
initialDelaySeconds: {{ gordo_server_liveness_initial_delay|default(5, true) }}
timeoutSeconds: {{ gordo_server_probe_timeout|default(5, true) }}
readinessProbe:
httpGet:
path: /healthcheck
port: http-api
initialDelaySeconds: 5
initialDelaySeconds: {{ gordo_server_readiness_initial_delay|default(20, true) }}
timeoutSeconds: {{ gordo_server_probe_timeout|default(5, true) }}
env:
- name: MODEL_COLLECTION_DIR
Expand Down

0 comments on commit 52f0b35

Please sign in to comment.