-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add CMD command to Kubefile #1964
Conversation
564e7bb
to
82f64b1
Compare
Codecov ReportBase: 17.47% // Head: 17.45% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1964 +/- ##
==========================================
- Coverage 17.47% 17.45% -0.02%
==========================================
Files 103 103
Lines 9169 9187 +18
==========================================
+ Hits 1602 1604 +2
- Misses 7355 7370 +15
- Partials 212 213 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
cmd/sealer/cmd/image/build.go
Outdated
@@ -74,6 +74,8 @@ func NewBuildCmd() *cobra.Command { | |||
Args: cobra.MaximumNArgs(1), | |||
Example: exampleNewBuildCmd, | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
logrus.Warn("CMD is about to be deprecated.") |
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.
add this warning message at instruction process stage
build/kubefile/command/command.go
Outdated
@@ -22,6 +22,7 @@ const ( | |||
App = "app" | |||
Launch = "launch" | |||
Cmds = "cmds" | |||
Cmd = "cmd" |
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.
we could add description to cmd
default: | ||
return fmt.Errorf("failed to recognize cmd: %s", cmd) | ||
} | ||
} | ||
|
||
func (kp *KubefileParser) processCmd(node *Node, result *KubefileResult) error { |
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.
here may could be simple, or could we just use processCmds?
cmdCnt++ | ||
} | ||
|
||
if cmdCnt >= 1 && launchCnt == 1 { |
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.
could we do parameter judgment in command.Cmd case
ff86435
to
2f2d02c
Compare
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.
LGTM
3db1446
to
3ba8c2b
Compare
Describe what this PR does / why we need it
Temporary use of the CMD command.
ex:
Kubefile:
FROM docker.io/sealerio/kubernetes:v1.22.15
CMD kubectl get ns
CMD echo "AAAAAAA"
CMDS ["kubectl get node","kubectl get po -A"]
Does this pull request fix one issue?
Describe how you did it
Describe how to verify it
Special notes for reviews