Custom Probes Example#

In this example, we show how to change the probes on the main container in a chart. Especially with nappl, it can happen that it takes longer in larger projects, so you may want to adjust the startup delay times or switch entirely to your own or different health checks.

In practice, the probes provided by the vendor are often not suitable for production environments. nplus ships with tested alternatives, but depending on your setup, you may still need to adjust them.

You can override the probes as follows:

For example, in the instance chart:

nappl:
  probes:
    startupProbe:
    httpGet:
      path: /index.html
      port: application
    initialDelaySeconds: 60
    failureThreshold: 10
  livenessProbe:
    httpGet:
      path: /nscalealinst1/rest/configuration/sysinfo.json
      port: application
    initialDelaySeconds: 60
    timeoutSeconds: 3
    failureThreshold: 5
  readinessProbe:
    httpGet:
      path: /jmx/status
      port: application
    failureThreshold: 3

The example above overrides the shipped nplus probes with the original Ceyoniq probes, as they were (as of February 2026) in GitHub.

Files#

Download all files of this sample

build.sh#

#!/bin/bash
#
# This sample script builds the example as described. It is also used to build the test environment in our lab,
# so it should be well tested.
#

# Make sure it fails immediately, if anything goes wrong
set -e

# -- ENVironment variables:
# CHARTS: The path to the source code
# DEST: The path to the build destination
# SAMPLE: The directory of the sample
# NAME: The name of the sample, used as the .Release.Name
# KUBE_CONTEXT: The name of the kube context, used to build this sample depending on where you run it against. You might have different Environments such as lab, dev, qa, prod, demo, local, ...

# Check, if we have the source code available
if [ ! -d "$CHARTS" ]; then
    echo "ERROR Building $SAMPLE example: The Charts Sources folder is not set. Please make sure to run this script with the full Source Code available"
    exit 1
fi
if [ ! -d "$DEST" ]; then
    echo "ERROR Building $SAMPLE example: DEST folder not found."
    exit 1
fi
if [ ! -d "$CHARTS/instance" ]; then
    echo "ERROR Building $SAMPLE example: Chart Sources in $CHARTS/instance not found. Are you running this script as a subscriber?"
    exit 1
fi

# Set the Variables
SAMPLE="probes"
NAME="sample-$SAMPLE"

# Output what is happening
echo "Building $NAME"

# Create the manifest
mkdir -p $DEST/instance
helm template --debug \
     --values $SAMPLES/application/empty.yaml \
     --values $SAMPLES/environment/$KUBE_CONTEXT.yaml \
     --values $SAMPLES/resources/$KUBE_CONTEXT.yaml \
     --values $SAMPLES/$SAMPLE/values.yaml \
     $NAME $CHARTS/instance > $DEST/instance/$SAMPLE.yaml

values.yaml#

nappl:
  probes:
    startupProbe:
      httpGet:
        path: /index.html
        port: 8080
      initialDelaySeconds: 60
      failureThreshold: 10
    livenessProbe:
      httpGet:
        path: /nscalealinst1/rest/configuration/sysinfo.json
        port: 8080
      initialDelaySeconds: 60
      timeoutSeconds: 3
      failureThreshold: 5
    readinessProbe:
      httpGet:
        path: /jmx/status
        port: 8080
      failureThreshold: 3