Skip to content

Integration with SandD - #17

Open
kerthcet wants to merge 3 commits into
InftyAI:mainfrom
kerthcet:feat/support-exec
Open

Integration with SandD#17
kerthcet wants to merge 3 commits into
InftyAI:mainfrom
kerthcet:feat/support-exec

Conversation

@kerthcet

Copy link
Copy Markdown
Member

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

Does this PR introduce a user-facing change?


kerthcet added 2 commits July 31, 2026 17:08
Signed-off-by: kerthcet <kerthcet@gmail.com>
Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI review requested due to automatic review settings July 31, 2026 19:59

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 31, 2026
Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI review requested due to automatic review settings August 1, 2026 10:51

Copilot AI 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.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Suppressed comments (3)

pkg/provider/aws/translate.go:86

  • When SandD is enabled, the shim ultimately runs exec "$@", but runArgs is built from spec.Command then spec.Args. If spec.Command is empty (a valid Kubernetes case where the image ENTRYPOINT should run), $@ starts with the first arg from spec.Args (or is empty), which will fail and break workloads. Consider only enabling the shim when an explicit Command is present; otherwise fall back to the normal Docker ENTRYPOINT/CMD mapping to preserve Kubernetes semantics.
	var runArgs []string
	if spec.Sandd.Enabled() {
		runArgs = writeSanddEntrypoint(&b, spec)
	} else {
		// No shim: map Command/Args straight onto Docker's --entrypoint/CMD as before.

pkg/provider/provider.go:340

  • SanddConfig.Enabled() only checks AuthKey, but the struct doc states ControlServer and ServerURL are required when AuthKey is set. As written, a partially configured SandD setup will be treated as enabled and attempt injection with empty values. Either validate elsewhere or make Enabled() reflect the documented requirements.
// Enabled reports whether the SandD daemon should be injected. A missing AuthKey
// means the operator did not opt in, so an adapter emits its plain bootstrap.
func (s SanddConfig) Enabled() bool { return s.AuthKey != "" }

cmd/main.go:364

  • SandD env configuration is read from process env, but there is no validation/logging if SANDD_TUNNEL_AUTHKEY is set while SANDD_TUNNEL_SERVER or SANDD_SERVER_URL are missing. With the current fail-open shim this can silently disable the access channel (or attempt to start it with empty values) while still launching workloads. Add a guard that logs the missing required vars (without logging the auth key) and disables SandD injection when incomplete.
	sanddCfg := provider.SanddConfig{
		AuthKey:       os.Getenv("SANDD_TUNNEL_AUTHKEY"),
		ControlServer: os.Getenv("SANDD_TUNNEL_SERVER"),
		ServerURL:     os.Getenv("SANDD_SERVER_URL"),
	}

Comment on lines +105 to +110
// sanddBinaryURL is the statically-linked (musl) SandD daemon release asset. Being
// static, this one binary runs in any container image regardless of its libc, so the
// shim can fetch it into an arbitrary user image at boot. It is pinned to the same
// asset name install.sh resolves; amd64 matches the x86_64 GPU instance types.
const sanddBinaryURL = "https://github.com/InftyAI/SandD/releases/latest/download/sandd-linux-amd64"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants