Skip to content

Commit

Permalink
feat(refinery): Set ShutdownDelay based on terminationGracePeriodSeco…
Browse files Browse the repository at this point in the history
…nds (#382)

## Which problem is this PR solving?

Refinery 2.8 attempts to drain data to remaining peers on shutdown, and
has a configurable ShutdownDelay field where it tries to process
remaining work while shutting down. In k8s we need this config option to
be inline with terminationGracePeriodSeconds to ensure k8s doesn't kill
pods early.

it's the same change as #360 
## Short description of the changes
- added terminationGracePeriodSeconds configuration option in
values.yaml
- set ShutdownDelay to be terminationGracePeriodSeconds - 5 seconds by
default. Users can override this value in their values.yaml
- publish a `-hnyinternal` tag for the change


## How to verify that this has the expected result
Test localling using kind
  • Loading branch information
VinozzZ authored Sep 3, 2024
1 parent 6e6d366 commit d47bca0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/refinery/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: refinery
description: Chart to deploy Honeycomb Refinery
type: application
version: 2.11.1
appVersion: 2.7.1
version: 2.11.2-hnyinternal.0
appVersion: 2.8.0-dev.0
keywords:
- refinery
- honeycomb
Expand Down
1 change: 1 addition & 0 deletions charts/refinery/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/refinery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config:
Host: '{{include "refinery.redis.fullname" .}}:6379'

Collection:
ShutdownDelay: '{{ sub .Values.terminationGracePeriodSeconds 5 }}s'
# AvailableMemory is the amount of system memory available to the Refinery process.
AvailableMemory: '{{ .Values.resources.limits.memory }}'
MaxMemoryPercentage: 75
Expand Down Expand Up @@ -319,6 +320,8 @@ tolerations: []

affinity: {}

terminationGracePeriodSeconds: 35

# PodDisruptionBudget:
#
# Limit the number of concurrent disruptions that your application experiences, allowing for higher availability while
Expand Down

0 comments on commit d47bca0

Please sign in to comment.