Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nexus3): Updated pro functionality #854

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions charts/nexus3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

## [v4.38.0] - 2024-01-04

### Added

- Added `highAvailability.enabled` & `highAvailability.replicas` values to enable configuring high availability when running _Nexus3_ as a `StatefulSet`.
- Added `license.enabled`, `license.secret` & `license.key` to configure the licence.
- Added `license.enabled`, `license.secret` & `license.key` to configure the _Nexus3_ pro licence.
- Added `highAvailability.enabled` & `highAvailability.replicas` values to enable configuring [high availability](https://help.sonatype.com/repomanager3/planning-your-implementation/resiliency-and-high-availability/high-availability-deployment-options/option-1---manual-high-availability-deployment) when running _Nexus3_ as a `StatefulSet` with a pro licence.
- Added `storeProperties` value to configure a _PostgreSQl_ data store for _Nexus3_ with a pro licence.

## [v4.37.0] - 2023-12-06

Expand Down
14 changes: 7 additions & 7 deletions charts/nexus3/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nexus3
description: Helm chart for Sonatype Nexus 3 OSS.
type: application
version: 4.37.0
version: 4.38.0
appVersion: 3.63.0
home: https://www.sonatype.com/nexus-repository-oss
icon: https://help.sonatype.com/docs/files/331022/34537964/3/1564671303641/NexusRepo_Icon.png
Expand All @@ -23,9 +23,9 @@ maintainers:
annotations:
artifacthub.io/alternativeName: nexus
artifacthub.io/changes: |
- kind: changed
description: "Updated the _Nexus3_ OCI image to [v3.63.0](https://github.com/sonatype/nexus-public/releases/tag/release-3.63.0-01)."
- kind: changed
description: "Support embedding of env vars for JVM by permitting `INSTALL4J_ADD_VM_PARAMS` to be defined after all other env vars."
- kind: changed
description: "Lifecycle script `configure.sh` prefixes log errors with `ERROR:` and echos the same string to `$TERMINATION_LOG`."
- kind: added
description: "Added `license.enabled`, `license.secret` & `license.key` to configure the _Nexus3_ pro licence."
- kind: added
description: "Added `highAvailability.enabled` & `highAvailability.replicas` values to enable configuring [high availability](https://help.sonatype.com/repomanager3/planning-your-implementation/resiliency-and-high-availability/high-availability-deployment-options/option-1---manual-high-availability-deployment) when running _Nexus3_ as a `StatefulSet` with a pro licence."
- kind: added
description: "Added `storeProperties` value to configure a _PostgreSQl_ data store for _Nexus3_ with a pro licence."
235 changes: 118 additions & 117 deletions charts/nexus3/README.md

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions charts/nexus3/templates/configmap-properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ metadata:
{{- include "nexus3.labels" . | nindent 4 }}
data:
nexus.properties: |
{{- if .Values.license.enabled }}
nexus.licenseFile=/nexus-data/etc/nexus.license
{{- end }}
{{- if and (not .Values.deployment) .Values.highAvailability.enabled }}
{{- if .Values.license.enabled }}
nexus.licenseFile=/var/opt/sonatype/nexus.license
{{- end }}
{{- if and (not .Values.deployment) .Values.highAvailability.enabled }}
nexus.datastore.clustered.enabled=true
{{- end }}
{{- range .Values.properties }}
{{- end }}
{{- range .Values.properties }}
{{ . }}
{{- end }}
{{- end }}

nexus-store.properties: |
{{- range .Values.storeProperties }}
{{ . }}
{{- end }}
19 changes: 17 additions & 2 deletions charts/nexus3/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ spec:
{{- end }}
- name: INSTALL4J_ADD_VM_PARAMS
{{- if .Values.caCerts.enabled }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=/nexus-data/javaprefs -Djavax.net.ssl.trustStore=/nexus-data/keystores/cacerts %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs -Djavax.net.ssl.trustStore=${NEXUS_DATA}/keystores/cacerts %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
{{- else }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=/nexus-data/javaprefs %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
{{- end }}
{{- if and .Values.config.enabled (or .Values.rootPassword.secret .Values.config.rootPassword.secret) }}
lifecycle:
Expand Down Expand Up @@ -150,6 +150,16 @@ spec:
name: {{ include "nexus3.fullname" . }}-properties
subPath: nexus.properties
readOnly: true
- mountPath: /nexus-data/etc/fabric/nexus-store.properties
name: {{ include "nexus3.fullname" . }}-properties
subPath: nexus-store.properties
readOnly: true
{{- if .Values.license.enabled }}
- mountPath: /var/opt/sonatype/nexus.license
name: license
subPath: {{ .Values.license.key }}
readOnly: true
{{- end }}
{{- if .Values.plugins }}
- mountPath: /opt/sonatype/nexus/deploy
name: nexus-deploy
Expand Down Expand Up @@ -185,6 +195,11 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.license.enabled }}
- name: license
secret:
secretName: {{ .Values.license.secret }}
{{- end }}
{{- if .Values.caCerts.enabled }}
- name: nexus3-cas
secret:
Expand Down
12 changes: 8 additions & 4 deletions charts/nexus3/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ spec:
env:
- name: INSTALL4J_ADD_VM_PARAMS
{{- if .Values.caCerts.enabled }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=/nexus-data/javaprefs -Djavax.net.ssl.trustStore=/nexus-data/keystores/cacerts %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs -Djavax.net.ssl.trustStore=${NEXUS_DATA}/keystores/cacerts %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
{{- else }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=/nexus-data/javaprefs %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
value: {{ printf "-Xms%s -Xmx%s %s -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs %s" .Values.envVars.jvmMinHeapSize .Values.envVars.jvmMaxHeapSize .Values.envVars.jvmAdditionalMemoryOptions .Values.envVars.jvmAdditionalOptions | quote }}
{{- end }}
{{- if or .Values.rootPassword.secret .Values.config.rootPassword.secret }}
- name: NEXUS_SECURITY_INITIAL_PASSWORD
Expand Down Expand Up @@ -153,8 +153,12 @@ spec:
name: {{ include "nexus3.fullname" . }}-properties
subPath: nexus.properties
readOnly: true
{{- if .Values.license.enabled}}
- mountPath: /nexus-data/etc/nexus.license
- mountPath: /nexus-data/etc/fabric/nexus-store.properties
name: {{ include "nexus3.fullname" . }}-properties
subPath: nexus-store.properties
readOnly: true
{{- if .Values.license.enabled }}
- mountPath: /var/opt/sonatype/nexus.license
name: license
subPath: {{ .Values.license.key }}
readOnly: true
Expand Down
4 changes: 3 additions & 1 deletion charts/nexus3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ deployment: true
# Be aware that you need to fulfill a few prerequisites for a HA deployment. Please check sonatype documentation!
highAvailability:
enabled: false
replicas: 2
replicas: 3

podLabels: {}
podAnnotations: {}
Expand Down Expand Up @@ -163,6 +163,8 @@ properties:
- nexus.scripts.allowCreation=true
# - nexus.golang.hosted=true

storeProperties: []

plugins: []
# - name: nexus-repository-composer
# url: https://repo1.maven.org/maven2/org/sonatype/nexus/plugins/nexus-repository-composer/0.0.29/nexus-repository-composer-0.0.29-bundle.kar
Expand Down