feat(app): implement K8sPod payload support in buildPodSpec#7340
Open
andreahlert wants to merge 1 commit into
Open
feat(app): implement K8sPod payload support in buildPodSpec#7340andreahlert wants to merge 1 commit into
andreahlert wants to merge 1 commit into
Conversation
Implements the Spec_Pod case in app/internal/k8s/app_client.go so that K8sPod app payloads are fully deserialized into corev1.PodSpec. - Uses flytestdlib/utils.UnmarshalStructToObj to convert the structpb.Struct pod spec into a corev1.PodSpec. - Validates that PodSpec is present before attempting unmarshal. - Defaults EnableServiceLinks to false when not specified by the user. - Adds unit tests covering container, pod, nil pod spec, invalid JSON, and no payload scenarios. Resolves flyteorg#7328 Signed-off-by: André Ahlert <andre@aex.partners>
pingsutw
reviewed
May 5, 2026
Member
pingsutw
left a comment
There was a problem hiding this comment.
Thanks for your contribution. Did you test it in the devbox? Try deploying an app with a podTemplate and see if it works
Author
Yes, I did :) Deployed a test with a pod_template adding busybox sidecar to the primary container. Both containers came up Running and the sidecar executed its custom command, so the K8sPod path looks good. Lmk if you wanted a different test scenario, but lgtm. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #7328
the
Spec_Podcase inbuildPodSpecwas just a stub throwing an error. wired it up to actually deserialize the k8s pod spec usingUnmarshalStructToObjfrom flytestdlib.pod spec already carries its own containers, resources, envs, ports — all that stuff comes through the deserialization. no manual field mapping needed.
EnableServiceLinksdefaults to false if not set, otherwise respects what the user defined.added tests for the happy path, nil spec, invalid json, and no payload.
go test ./app/internal/k8spasses — the pre-existingKserviceToStatusfailure is unrelated.