-
Notifications
You must be signed in to change notification settings - Fork 8
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
VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs #84
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #84 +/- ##
==========================================
+ Coverage 68.86% 69.27% +0.4%
==========================================
Files 32 32
Lines 1243 1266 +23
==========================================
+ Hits 856 877 +21
- Misses 330 331 +1
- Partials 57 58 +1
Continue to review full report at Codecov.
|
5c964e9
to
4ee5ab0
Compare
src/pod/pod.go
Outdated
@@ -72,13 +78,20 @@ func CreatePod(sp *serviceprovider.Container, pod *entity.Pod) error { | |||
|
|||
var containers []corev1.Container | |||
for _, container := range pod.Containers { | |||
if !checkName(container.Name) { |
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.
I think we can check the name in the CheckPodParameter
function.
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.
update
src/server/handler_pod.go
Outdated
@@ -41,7 +41,7 @@ func createPod(ctx *web.Context) { | |||
} | |||
|
|||
if err := pod.CreatePod(sp, &p); err != nil { | |||
response.InternalServerError(req.Request, resp.ResponseWriter, err) | |||
response.BadRequest(req.Request, resp.ResponseWriter, err) |
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.
Keep the InternalServerError, we will check the parameter in the above function pod.CheckPodParameter
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.
fix
1499f15
to
8d36b66
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
VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs Former-commit-id: 3fd24e7f162769ee586c1fe5c6bea656567c797a [formerly 88f7285] Former-commit-id: 840cc65e463b19bde9fc1472ce9914b97bea1a9d
VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs
No description provided.