Public Information
This commit is contained in:
37
samples/probes/README.md
Normal file
37
samples/probes/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# 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](https://github.com/ceyoniq/container/blob/main/kubernetes/kustomize/nscale/base/application-layer.yaml).
|
||||
45
samples/probes/build.sh
Executable file
45
samples/probes/build.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/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
|
||||
20
samples/probes/values.yaml
Normal file
20
samples/probes/values.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
Reference in New Issue
Block a user