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

Adding StartupProbe for long upgrade intervals #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Empty file added Chart.yaml
Empty file.
2 changes: 1 addition & 1 deletion charts/nexus-iq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: nexus-iq-server

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 161.0.0
version: 161.0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not require any update (unless you want to publish the chart manually to artifacthub immediately). The next planned release (162) will update this line and publish the chart automatically to artifacthub.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As 162 is already released, have to perform the changes to new version now.
Would need a new chart version, like 162.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.161.0
Expand Down
7 changes: 7 additions & 0 deletions charts/nexus-iq/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ spec:
- name: admin
containerPort: {{ .Values.iq.adminPort }}
protocol: TCP
startupProbe:
httpGet:
path: /ping
port: admin
{{- if .Values.iq.startupProbe }}
{{- toYaml .Values.iq.startupProbe | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /ping
Expand Down
7 changes: 7 additions & 0 deletions charts/nexus-iq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ iq:
# - name: JAVA_OPTS
# value: "-Djavax.net.ssl.keyStoreType=jks -Djavax.net.ssl.keyStore=/etc/secret-volume/keystore.jks -Djavax.net.ssl.keyStorePassword=$(KEYSTORE_PASSWORD) -Djavax.net.ssl.trustStoreType=jks -Djavax.net.ssl.trustStore=/etc/secret-volume/truststore.jks -Djavax.net.ssl.trustStorePassword=$(TRUSTSTORE_PASSWORD) -Djava.util.prefs.userRoot=${SONATYPE_WORK}/javaprefs"

# Configures the Startup probe for IQ pod to handle long upgrade startups
startupProbe:
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 900
Comment on lines +60 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, how was this value determined? As it is the worst case it could wait about 900 * 10 seconds, which comes to about 2 and half hours.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.5 hours was taken as a guess number, which should cover 80% of the upgrade scenarios.
When following Sonatype's recommendation of using external database for our products, this time should handle 95% of cases.

When large H2 DB's are in use, during upgrades, schema changes takes long time, at times days.

timeoutSeconds: 1
successThreshold: 1
# Configures the liveness probe for IQ pod
livenessProbe:
initialDelaySeconds: 10
Expand Down
755 changes: 331 additions & 424 deletions docs/index.yaml

Large diffs are not rendered by default.

Binary file added docs/nexus-iq-server-161.0.1.tgz
Binary file not shown.
Empty file added values.yaml
Empty file.