Skip to content

feat: update cardano-node to use socat as PID1 - #342

Merged
verbotenj merged 1 commit into
mainfrom
feat/cardano-node
Mar 3, 2026
Merged

feat: update cardano-node to use socat as PID1#342
verbotenj merged 1 commit into
mainfrom
feat/cardano-node

Conversation

@verbotenj

@verbotenj verbotenj commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Run socat as PID 1 in the cardano-node sidecar to improve signal handling and clean shutdowns. Bump chart to 0.8.2.

  • Refactors
    • Set socat as the container entrypoint with args (no sh -c or env).
    • Listen on .Values.service.ports.socatNtc.targetPort and proxy to /ipc/node.socket.
    • Simplified checksum annotation templating.

Written for commit e71372e. Summary will update on new commits.

Summary by CodeRabbit

  • Chores

    • Bumped chart version to 0.8.2.
  • Refactor

    • Cleaned up Kubernetes deployment templates for clearer conditional annotations.
    • Simplified container command execution to use direct exec form and explicit port configuration for more predictable runtime behavior.

@verbotenj
verbotenj requested review from a team as code owners March 3, 2026 01:12
@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91d95c9 and e71372e.

📒 Files selected for processing (2)
  • charts/cardano-node/Chart.yaml
  • charts/cardano-node/templates/statefulset.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/cardano-node/templates/statefulset.yaml

📝 Walkthrough

Walkthrough

Chart version in charts/cardano-node/Chart.yaml is bumped from 0.8.1 to 0.8.2. In charts/cardano-node/templates/statefulset.yaml, checksum annotations for blockProducer and topology are reformatted (conditionals remain gated by .Values.blockProducer.enabled and .Values.topology.enabled). The cardano-node container and socat-ntc sidecar commands were changed from shell-wrapped sh -c invocations to direct exec forms calling the socat binary with explicit args, sourcing the port from .Values.service.ports.socatNtc.targetPort.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: update cardano-node to use socat as PID1' accurately captures the main change: running socat as PID 1 in the cardano-node sidecar for improved signal handling.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/cardano-node

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
charts/cardano-node/templates/statefulset.yaml (1)

217-224: Good change for PID1, but PORT env var is now unused.

The refactor to direct exec form correctly makes socat PID1 for proper signal handling. However, the PORT environment variable (lines 222-224) is no longer used since the port is now templated directly in the args. Consider removing this dead code.

🧹 Proposed cleanup
         args:
         - "TCP-LISTEN:{{ .Values.service.ports.socatNtc.targetPort }},fork"
         - "UNIX-CLIENT:/ipc/node.socket,ignoreeof"
-        env:
-        - name: PORT
-          value: "{{ .Values.service.ports.socatNtc.targetPort }}"
         ports:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/cardano-node/templates/statefulset.yaml` around lines 217 - 224,
Remove the now-unused environment variable by deleting the env block that sets
PORT (env name: PORT) in the socat container spec, since the port is directly
templated in the args for the socat command; also scan for any remaining
references to PORT in the same template (e.g., container env usage or
liveness/readiness probes) and remove or update them if present to avoid
unused/dead config.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@charts/cardano-node/templates/statefulset.yaml`:
- Around line 217-224: Remove the now-unused environment variable by deleting
the env block that sets PORT (env name: PORT) in the socat container spec, since
the port is directly templated in the args for the socat command; also scan for
any remaining references to PORT in the same template (e.g., container env usage
or liveness/readiness probes) and remove or update them if present to avoid
unused/dead config.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7998d12 and 91d95c9.

📒 Files selected for processing (2)
  • charts/cardano-node/Chart.yaml
  • charts/cardano-node/templates/statefulset.yaml

Signed-off-by: Ales Verbic <verbotenj@blinklabs.io>
@verbotenj
verbotenj force-pushed the feat/cardano-node branch from 91d95c9 to e71372e Compare March 3, 2026 01:17
@verbotenj
verbotenj merged commit 32ccb40 into main Mar 3, 2026
6 checks passed
@verbotenj
verbotenj deleted the feat/cardano-node branch March 3, 2026 11:46
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.

2 participants