-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
play kube: set entrypoint when interpreting Command #8808
Conversation
test/e2e/play_kube_test.go
Outdated
inspect = podmanTest.Podman([]string{"inspect", getCtrNameInPod(pod), "--format", "'{{ .Config.Cmd }}'"}) | ||
inspect.WaitWithDefaultTimeout() | ||
Expect(inspect.ExitCode()).To(Equal(0)) | ||
Expect(inspect.OutputToString()).To(ContainSubstring(`hello`)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expect(inspect.OutputToString()).To(ContainSubstring(`hello`)) | |
Expect(inspect.OutputToString()).To(Equal(`[hello]`)) |
Maybe this is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Equal doesn't work because there are some odd characters from the output. I did change it to contain the [] though
otherwise LGTM |
/approve |
pkg/specgen/generate/kube/kube.go
Outdated
imageData, err := newImage.Inspect(ctx) | ||
if err != nil { | ||
return nil, err | ||
} | ||
s.WorkDir = "/" | ||
// We will use "Docker field name" internally here to avoid confusion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker field name?
Why do we have the "Docker" adgective here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the language used in the k8s docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just cause they use bad language does not mean we have to. :^)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
74c90f7
to
c1f2521
Compare
We now set Entrypoint when interpeting the image Entrypoint (or yaml.Command) and Command when interpreting image Cmd (or yaml.Args) This change is kind of breaking because now checking Config.Cmd won't return the full command, but only the {cmd,args}. Adapt the tests to this change as well Signed-off-by: Peter Hunt <[email protected]>
c1f2521
to
4e7cd20
Compare
@haircommander: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Changes LGTM |
We now set Entrypoint when interpeting the image Entrypoint (or yaml.Command)
and Command when interpreting image Cmd (or yaml.Args)
This change is kind of breaking because now checking Config.Cmd won't return
the full command, but only the {cmd,args}.
Adapt the tests to this change as well
addresses comment: #8807 (comment)
Note, this contains a breaking change, as now you need to check both Entrypoint and Command for the full container command
carries #8807