Skip to content

Commit

Permalink
support configurable termination grace period
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirianni committed Nov 20, 2024
1 parent 98d67b7 commit 3155a54
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/bindplane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: bindplane
description: BindPlane OP is an observability pipeline.
type: application
# The chart's version
version: 1.20.9
version: 1.20.10
# The BindPlane OP tagged release. If the user does not
# set the `image.tag` values option, this version is used.
appVersion: 1.82.0
Expand Down
8 changes: 7 additions & 1 deletion charts/bindplane/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bindplane

![Version: 1.20.9](https://img.shields.io/badge/Version-1.20.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.82.0](https://img.shields.io/badge/AppVersion-1.82.0-informational?style=flat-square)
![Version: 1.20.10](https://img.shields.io/badge/Version-1.20.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.82.0](https://img.shields.io/badge/AppVersion-1.82.0-informational?style=flat-square)

BindPlane OP is an observability pipeline.

Expand Down Expand Up @@ -160,6 +160,12 @@ BindPlane OP is an observability pipeline.
| resources.requests.cpu | string | `"1000m"` | CPU request. |
| resources.requests.memory | string | `"1000Mi"` | Memory request. |
| service.annotations | object | `{}` | Custom annotations which will be added to the service object. Useful for specifying things such as `cloud.google.com/backend-config`. |
| terminationGracePeriodSeconds | object | `{"bindplane":60,"jobs":60,"nats":60,"prometheus":60,"transform_agent":60}` | Configure the terminationGracePeriodSeconds for BindPlane, BindPlane NATS, BindPlane Jobs, and BindPlane Prometheus pods. |
| terminationGracePeriodSeconds.bindplane | int | `60` | This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane deployment pods. |
| terminationGracePeriodSeconds.jobs | int | `60` | This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane Jobs pod. |
| terminationGracePeriodSeconds.nats | int | `60` | This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane NATS statefulset or deployment pods, if NATS is enabled. |
| terminationGracePeriodSeconds.prometheus | int | `60` | This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane Prometheus pod. |
| terminationGracePeriodSeconds.transform_agent | int | `60` | This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane transform agent pod. |
| tolerations | object | `{}` | The Pod's tolerations |
| topologySpreadConstraints.bindplane | list | `[]` | spec.template.spec.topologySpreadConstraints on the BindPlane deployment pods. |
| topologySpreadConstraints.jobs | list | `[]` | This is for configuring spec.template.spec.topologySpreadConstraints on the BindPlane Jobs pod. |
Expand Down
2 changes: 1 addition & 1 deletion charts/bindplane/templates/bindplane-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ spec:
preStop:
exec:
command: ["sh", "-c", "sleep 5",]
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.jobs }}
volumes:
{{- if eq .Values.eventbus.type "pubsub" }}
{{- if .Values.eventbus.pubsub.credentials.secret }}
Expand Down
2 changes: 1 addition & 1 deletion charts/bindplane/templates/bindplane-nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ spec:
preStop:
exec:
command: ["sh", "-c", "sleep 5",]
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.nats }}
volumes:
- name: data
emptyDir: {}
Expand Down
2 changes: 1 addition & 1 deletion charts/bindplane/templates/bindplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ spec:
name: {{ include "bindplane.fullname" . }}-prometheus-data
{{- end }}
{{- end }}
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.bindplane }}
volumes:
{{- if eq .Values.eventbus.type "pubsub" }}
{{- if .Values.eventbus.pubsub.credentials.secret }}
Expand Down
1 change: 1 addition & 0 deletions charts/bindplane/templates/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ spec:
- mountPath: /etc/prometheus/web.yml
subPath: web.yml
name: config
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.prometheus }}
volumes:
- name: config
configMap:
Expand Down
2 changes: 1 addition & 1 deletion charts/bindplane/templates/transform-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds.transform_agent }}
14 changes: 14 additions & 0 deletions charts/bindplane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,20 @@ priorityClassName:
# -- This is for configuring spec.template.spec.priorityClassName on the BindPlane transform agent pod.
transform_agent: ""

# -- Configure the terminationGracePeriodSeconds for BindPlane, BindPlane NATS, BindPlane Jobs, and BindPlane Prometheus pods.
terminationGracePeriodSeconds:
# -- This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane deployment pods.
bindplane: 60
# -- This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane NATS statefulset or deployment
# pods, if NATS is enabled.
nats: 60
# -- This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane Jobs pod.
jobs: 60
# -- This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane Prometheus pod.
prometheus: 60
# -- This is for configuring spec.template.spec.terminationGracePeriodSeconds on the BindPlane transform agent pod.
transform_agent: 60

# -- Configure the nodeSelector for BindPlane, BindPlane NATS, BindPlane Jobs, and BindPlane Prometheus pods.
nodeSelector:
# -- This is for configuring spec.template.spec.nodeSelector on the BindPlane deployment pod when using the bbolt backend.
Expand Down

0 comments on commit 3155a54

Please sign in to comment.