8000
Skip to content

feat(helm): add liveness probes to match readiness probes (#445) - #7826

Open
LuckTerence wants to merge 1 commit into
Infisical:mainfrom
LuckTerence:feat/helm-liveness-probes
Open

feat(helm): add liveness probes to match readiness probes (#445)#7826
LuckTerence wants to merge 1 commit into
Infisical:mainfrom
LuckTerence:feat/helm-liveness-probes

Conversation

@LuckTerence
Copy link
Copy Markdown

Closes #445

The issue predates the chart restructure, so this applies the same intent to the current charts: workloads that only had a readinessProbe now get a matching livenessProbe, so stuck pods get restarted by kubelet instead of just being taken out of rotation.

Changes

  • helm-charts/infisical-standalone-postgres/templates/infisical.yaml: add livenessProbe (httpGet /api/status:8080, initialDelay 30s / period 20s) next to the existing readiness probe β€” this chart serves the combined front/back workload
  • helm-charts/infisical-nkp/templates/redis.yaml: add livenessProbe (tcpSocket on the redis port, initialDelay 15s / period 20s)

The infisical-nkp backend deployment already had both probes; its values (30s/20s for liveness) were used as the reference pattern.

Verification

  • helm lint passes on both charts (0 failed)
  • helm template on infisical-nkp renders the new redis liveness probe correctly
  • Full helm template on the standalone chart could not be run locally only because Docker Hub rate-limited the bitnami subchart download (429); the added block is static YAML mirroring the adjacent readiness probe

@infisical-cla-app
Copy link
Copy Markdown

πŸ“ Contributor License Agreement required

Before this PR can merge, every contributor must sign the Infisical CLA.
Signing is quick: sign in with GitHub, review the CLA, and accept.

πŸ‘‰ Sign the CLA

Still needs to sign:

Once everyone has signed, the check updates automatically β€” no need to close and reopen the PR.

@greptile-apps
greptile-apps Bot commented Aug 26, 2026
Copy link
Copy Markdown
Contributor

Greptile Summary

Adds liveness probes to the standalone Infisical application and NKP bundled Redis workloads so Kubernetes can restart unhealthy containers.

  • Adds an HTTP liveness probe targeting /api/status to the standalone application.
  • Adds a TCP liveness probe targeting the Redis port to the NKP Valkey container.

Confidence Score: 4/5

The PostgreSQL-dependent application liveness check should be replaced with a process-only health check before merging to avoid restart loops during database outages.

The new standalone liveness probe calls an endpoint that performs a PostgreSQL-backed configuration lookup, so an external database failure can cause kubelet to restart an otherwise healthy application process.

Files Needing Attention: helm-charts/infisical-standalone-postgres/templates/infisical.yaml

Important Files Changed

Filename Overview
helm-charts/infisical-standalone-postgres/templates/infisical.yaml Adds a liveness probe that can restart healthy application processes when PostgreSQL is unavailable because /api/status queries database-backed configuration.
helm-charts/infisical-nkp/templates/redis.yaml Adds a conventional TCP liveness probe for the bundled Redis-compatible service without an established blocking defect.

Reviews (1): Last reviewed commit: "feat(helm): add liveness probes to match..." | Re-trigger Greptile

Comment on lines +69 to +74
livenessProbe:
httpGet:
path: /api/status
port: 8080
initialDelaySeconds: 30
periodSeconds: 20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Dependency-driven restart loop

When PostgreSQL is unavailable or slow, /api/status fails because it performs a database-backed configuration lookup, so this liveness probe repeatedly restarts an otherwise recoverable Infisical process and delays recovery.

Knowledge Base Used: Kubernetes Helm packaging

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cffc339990

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

8000
Comment on lines +73 to +74
initialDelaySeconds: 30
periodSeconds: 20
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Delay liveness until startup migrations can finish

In the standalone chart, the container does not start serving /api/status until after startup migrations complete: backend/src/main.ts calls runMigrations() before server.listen, and the migration startup lock can wait up to 5 minutes in backend/src/auto-start-migrations.ts. With this new liveness probe starting after 30s and running every 20s, an upgrade or first boot with long migrations, or the default two replicas where one pod waits on the lock, can be restarted by kubelet before it ever binds port 8080, causing CrashLoopBackOff instead of letting migrations finish; use a startupProbe or make the liveness window cover the migration/lock wait.

Useful? React with πŸ‘Β / πŸ‘Ž.

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

Successfully merging this pull request may close these issues.

Add liveness probe (front/back)

1 participant

0