Skip to content

Commit

Permalink
[simple-app] Drop the preStop default from 30s to 10s (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
diranged authored Sep 11, 2021
1 parent 1f21bbe commit 76e031a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/simple-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: simple-app
description: Default Microservice Helm Chart
type: application
version: 0.13.7
version: 0.13.8
appVersion: latest
maintainers:
- name: diranged
Expand Down
4 changes: 2 additions & 2 deletions charts/simple-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default Microservice Helm Chart

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

[deployments]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down Expand Up @@ -108,7 +108,7 @@ This feature is turned on by default if you set `Values.istio.enabled=true` and
| podLabels | object | `{}` | (`Map`) List of Labels to be added to the PodSpec |
| podSecurityContext | object | `{}` | |
| ports | list | `[{"containerPort":80,"name":"http","protocol":"TCP"},{"containerPort":443,"name":"https","protocol":"TCP"}]` | A list of Port objects that are exposed by the service. These ports are applied to the main container, or the proxySidecar container (if enabled). The port list is also used to generate Network Policies that allow ingress into the pods. |
| preStopCommand | list | `["/bin/sleep","30"]` | Before a pod gets terminated, Kubernetes sends a SIGTERM signal to every container and waits for period of time (30s by default) for all containers to exit gracefully. If your app doesn't handle the SIGTERM signal or if it doesn't exit within the grace period, Kubernetes will kill the container and any inflight requests that your app is processing will fail. https://docs.flagger.app/tutorials/zero-downtime-deployments#graceful-shutdown |
| preStopCommand | list | `["/bin/sleep","10"]` | Before a pod gets terminated, Kubernetes sends a SIGTERM signal to every container and waits for period of time (10s by default) for all containers to exit gracefully. If your app doesn't handle the SIGTERM signal or if it doesn't exit within the grace period, Kubernetes will kill the container and any inflight requests that your app is processing will fail. Make sure you set this to SHORTER than the terminationGracePeriod (30s default) setting. https://docs.flagger.app/tutorials/zero-downtime-deployments#graceful-shutdown |
| progressDeadlineSeconds | string | `nil` | https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds |
| proxySidecar.enabled | bool | `false` | (Boolean) Enables injecting a pre-defined reverse proxy sidecar container into the Pod containers list. |
| proxySidecar.env | list | `[]` | Environment Variables for the primary container. These are all run through the tpl function (the key name and value), so you can dynamically name resources as you need. |
Expand Down
8 changes: 6 additions & 2 deletions charts/simple-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,18 @@ progressDeadlineSeconds: null
deploymentStrategy: {}

# -- Before a pod gets terminated, Kubernetes sends a SIGTERM signal to every
# container and waits for period of time (30s by default) for all containers to
# container and waits for period of time (10s by default) for all containers to
# exit gracefully. If your app doesn't handle the SIGTERM signal or if it
# doesn't exit within the grace period, Kubernetes will kill the container and
# any inflight requests that your app is processing will fail.
#
# Make sure you set this to SHORTER than the terminationGracePeriod (30s
# default) setting.
#
# https://docs.flagger.app/tutorials/zero-downtime-deployments#graceful-shutdown
preStopCommand:
- /bin/sleep
- '30'
- '10'

securityContext: {}
# capabilities:
Expand Down

0 comments on commit 76e031a

Please sign in to comment.