Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #224 from ajoux-accor/nexus/terminationgraceperiod…
Browse files Browse the repository at this point in the history
…seconds

Add custom terminationgraceperiodseconds
  • Loading branch information
rjkernick authored Jun 10, 2021
2 parents 3d62d67 + 530b589 commit 625c1dd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/sonatype-nexus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: sonatype-nexus
version: 5.1.2
version: 5.2.0
appVersion: 3.27.0
description: Sonatype Nexus is an open source repository manager
keywords:
Expand Down
6 changes: 6 additions & 0 deletions charts/sonatype-nexus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ The following table lists the configurable parameters of the Nexus chart and the
| `nexus.hostAliases` | Aliases for IPs in /etc/hosts | [] |
| `nexus.context` | Non-root path to run Nexus at | `nil` |
| `nexus.chownNexusData` | Set false to not execute chown to the mounted nexus-data directory at startup | `true` |
| `nexus.terminationGracePeriodSeconds` | Let Nexus terminate gracefully [More informations here](#graceful-shutdown-with-terminationGracePeriodSeconds). | `nil` |
| `nexusProxy.enabled` | Enable nexus proxy | `true` |
| `nexusProxy.svcName` | Nexus proxy service name | `nil` |
| `nexusProxy.targetPort` | Container Port for Nexus proxy | `8080` |
Expand Down Expand Up @@ -323,6 +324,11 @@ You might need to scale the deployment to zero and back up to pick up the change
kubectl scale --replicas=0 statefulset.apps/sonatype-nexus
kubectl scale --replicas=1 statefulset.apps/sonatype-nexus

### Graceful shutdown with terminationGracePeriodSeconds
Customizing terminationGracePeriodSeconds maybe helpful to prevent Orientdb corruption during stop/start actions(eg : upgrade).
**WARNING** : It has no effect with the [default image of this chart](https://quay.io/repository/travelaudience/docker-nexus?tag=latest&tab=tags) because of this [issue](https://github.com/travelaudience/docker-nexus/issues/56)
However it can be useful when you switch to the official image [here](https://hub.docker.com/r/sonatype/nexus3/tags?page=1&ordering=last_updated)


## After Installing the Chart

Expand Down
3 changes: 3 additions & 0 deletions charts/sonatype-nexus/templates/deployment-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ spec:
{{- if .Values.deployment.additionalVolumes }}
{{ toYaml .Values.deployment.additionalVolumes | indent 8 }}
{{- end }}
{{- if .Values.nexus.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.nexus.terminationGracePeriodSeconds }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/sonatype-nexus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ nexus:
# When using nexus it is important that all the files in the data directory have the proper owner configured. Therefore this
# value defaults to true to apply chown -R nexus:nexus to the mounted directory at every startup of the container.
chownNexusData: true
# terminationGracePeriodSeconds : 30
# Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.
# WARNING : It has no effect with quay.io/travelaudience/docker-nexus which is using Runsvdir (https://github.com/travelaudience/docker-nexus/issues/56)
# However it can be useful when you switch to the official image (https://hub.docker.com/r/sonatype/nexus3/tags?page=1&ordering=last_updated)

route:
enabled: false
Expand Down

0 comments on commit 625c1dd

Please sign in to comment.