I have set up liveness and readiness probes for an application, e.g.:
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
...
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
What I would like to do is whenever the probe is invoked by Kubernetes, its result is sent to an endpoint passing some additional information suchs as pod name, Docker image used, value from a secret, etc.
PROBE INVOKED -> RESULT COLLECTED -> INVOKE ENDPOINT (http://xxx - payload {"probe": "liveness", "result": "OK", "image" : "app:1.0.0", "key" : "VALUE_EXTRACTED_FROM_A_SECRET", ...}
Could you indicate a way to achieve this?