Skip to content

Commit

Permalink
terminationGracePeriodSeconds for the gordo-server (#1185)
Browse files Browse the repository at this point in the history
* terminationGracePeriodSeconds for the gordo-server

* terminationGracePeriodSeconds on POD level

* Remove  terminationGracePeriodSeconds: 1
  • Loading branch information
koropets authored Sep 30, 2021
1 parent a702829 commit 1d3dcb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gordo/cli/workflow_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ def workflow_cli(gordo_ctx):
envvar=f"{PREFIX}_RESOURCE_LABELS",
default="",
)
@click.option(
"--server-termination-grace-period",
help="terminationGracePeriodSeconds for the gordo server",
envvar=f"{PREFIX}_SERVER_TERMINATION_GRACE_PERIOD",
type=int,
default=60,
)
@click.pass_context
def workflow_generator_cli(gordo_ctx, **ctx):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ spec:
{% endfor %}{% endif %}
spec:
priorityClassName: server-priority
terminationGracePeriodSeconds: {{ server_termination_grace_period|default(60, true) }}
containers:
- image: "{{ docker_registry }}/{{ docker_repository }}/{{ server_image }}:{{gordo_version}}"{% if image_pull_policy %}
imagePullPolicy: "{{image_pull_policy}}"{% endif %}
Expand Down Expand Up @@ -1145,7 +1146,6 @@ spec:
memory: "{{ prometheus_metrics_server_resources['limits']['memory'] }}M"
cpu: "{{ prometheus_metrics_server_resources['limits']['cpu'] }}m"
{% endif %}
terminationGracePeriodSeconds: 1
volumes:
- name: gstor
persistentVolumeClaim:
Expand Down

0 comments on commit 1d3dcb5

Please sign in to comment.