diff --git a/charts/sonatype-nexus/Chart.yaml b/charts/sonatype-nexus/Chart.yaml index e7c86e0..6d793e0 100644 --- a/charts/sonatype-nexus/Chart.yaml +++ b/charts/sonatype-nexus/Chart.yaml @@ -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: diff --git a/charts/sonatype-nexus/README.md b/charts/sonatype-nexus/README.md index bda59be..f2f6e04 100644 --- a/charts/sonatype-nexus/README.md +++ b/charts/sonatype-nexus/README.md @@ -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` | @@ -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 diff --git a/charts/sonatype-nexus/templates/deployment-statefulset.yaml b/charts/sonatype-nexus/templates/deployment-statefulset.yaml index 51bee83..3662d9a 100644 --- a/charts/sonatype-nexus/templates/deployment-statefulset.yaml +++ b/charts/sonatype-nexus/templates/deployment-statefulset.yaml @@ -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 }} diff --git a/charts/sonatype-nexus/values.yaml b/charts/sonatype-nexus/values.yaml index 1b785f6..3951e0d 100644 --- a/charts/sonatype-nexus/values.yaml +++ b/charts/sonatype-nexus/values.yaml @@ -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