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

Different liveness probe for workers vs control pod #120

Open
knuurr opened this issue Oct 24, 2024 · 1 comment
Open

Different liveness probe for workers vs control pod #120

knuurr opened this issue Oct 24, 2024 · 1 comment

Comments

@knuurr
Copy link

knuurr commented Oct 24, 2024

We are testing a very specific liveness probe for control n8n node, because due to our workload it happens that control pod hangs, and any workflows won't run until this pod is manually restarted by someone from our crew. unfortunately /healthz endpoint doesn't catch this very specific scenario in our situation.

# Test liveness probe workaround for n8n hanging
livenessProbe:
  exec:
    command:
    - /bin/sh
    - -c
    - | 
      wget -q --post-data='{ "type": "test" }' --spider http://n8n.namespace.svc.cluster.local/webhook/event
  initialDelaySeconds: 30  # Wait 30 seconds before starting the first probe
  periodSeconds: 60        # Run the liveness probe every full minute (60 seconds)
  timeoutSeconds: 5        # Fail if the command doesn't return within 5 seconds
  failureThreshold: 4      # After 3 failures, the pod will be restarted
  successThreshold: 1      # One success is enough to declare the pod healthy

However setting this in values.yaml sets it up also for worker nodes, which we don't need now.

Is there any possibility to set different liveness probes for control only, and different (so default) for workers, using this helm chart template?

@Vad1mo
Copy link
Member

Vad1mo commented Oct 24, 2024

hmm, I would say you have to do it in the post-processing, like helm hooks maybe there are other options.
i would not want to add something extra just for your specific use case.

Happy to accept a general purpose solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants