Skip to content

Commit

Permalink
Merge pull request #63 from EricTendian/termination-grace-period
Browse files Browse the repository at this point in the history
Allowing terminationGracePeriodSeconds to be set for gcloud-sqlproxy
  • Loading branch information
rimusz authored Oct 25, 2019
2 parents 303bf3a + 657a67d commit 9804325
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/gcloud-sqlproxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ maintainers:
name: gcloud-sqlproxy
sources:
- https://github.com/rimusz/charts
version: 0.18.0
version: 0.19.0
1 change: 1 addition & 0 deletions stable/gcloud-sqlproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The following table lists the configurable parameters of the `gcloud-sqlproxy` c
| `autoscaling.maxReplicas` | Autoscaler maximum pod replica count | `3` |
| `autoscaling.targetCPUUtilizationPercentage` | Scaling target for CPU Utilization Percentage | `50` |
| `autoscaling.targetMemoryUtilizationPercentage` | Scaling target for Memory Utilization Percentage | `50` |
| `terminationGracePeriodSeconds` | # of seconds to wait before pod killed | `30` (Kubernetes default) |
| `nodeSelector` | Node Selector | |
| `podDisruptionBudget` | Pod disruption budget | `maxUnavailable: 1` if `replicasCount` > 1, does not create the PDB otherwise |
| `service.type` | Kubernetes LoadBalancer type | `ClusterIP` |
Expand Down
1 change: 1 addition & 0 deletions stable/gcloud-sqlproxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ spec:
{{ end -}}
- name: cloudsql
emptyDir: {}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
affinity:
Expand Down
8 changes: 7 additions & 1 deletion stable/gcloud-sqlproxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ autoscaling:
# targetCPUUtilizationPercentage: 50
# targetMemoryUtilizationPercentage: 50

## Number of seconds to wait before deleting the pod
## This must be greater than or equal to the time specified with the term_timeout arg, if you have set it
terminationGracePeriodSeconds: 30

## Node selector
nodeSelector: {}

Expand All @@ -112,7 +116,7 @@ tolerations: []
affinity: {}

## Lifecycle hooks
## This can be helpful for gracefully terminating the proxy, when used in combination with the -term_timeout=10s extra arg
## These can be helpful for custom graceful termination logic
## NOTE: Your Docker image must have a shell for the preStop command to work, the default Docker image does not have one
lifecycleHooks: {}
# preStop:
Expand All @@ -124,4 +128,6 @@ podDisruptionBudget: |
maxUnavailable: 1
## Additional container arguments
## Uncomment the term_timeout line for the proxy to wait your chosen time before terminating connections
extraArgs: {}
# term_timeout: 30s

0 comments on commit 9804325

Please sign in to comment.