-
Notifications
You must be signed in to change notification settings - Fork 772
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
Abstract out api.pod spec #434
Conversation
ad7bd5c
to
d738b34
Compare
PodSpec is also used in OpenShift transformer. It would be great to use podspec function also there. |
@@ -104,6 +104,19 @@ func (k *Kubernetes) CheckUnsupportedKey(komposeObject *kobject.KomposeObject, u | |||
return keysFound | |||
} | |||
|
|||
// podspec creates the pod specification | |||
func (k *Kubernetes) podspec(name string, service kobject.ServiceConfig) api.PodSpec { |
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.
should be podSpec (Go name conventions)
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.
and even better might be initPodSpec similar to other init functions ;-)
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.
@kadel We can't use pod := api.PodSpec{
Containers: []api.Container{
{
Name: name,
Image: service.Image,
},
},
} PodSpec in pod := api.PodSpec{
Containers: []api.Container{
{
Name: name,
Image: " ",
},
},
} |
42de5d7
to
f7e5e62
Compare
I think that if we are abstracting podSpec in one place it would be also great to have everywhere else. If you change your func (k *Kubernetes) InitPodSpec(name string, image string) api.PodSpec {
... |
72f4964
to
4a97cc1
Compare
@@ -104,6 +104,19 @@ func (k *Kubernetes) CheckUnsupportedKey(komposeObject *kobject.KomposeObject, u | |||
return keysFound | |||
} | |||
|
|||
// "InitPodSpec creates the pod specification" |
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.
remove "
and it will be ok ;-)
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.
@kadel tests are passing locally when I run make test
, no idea what is going wrong in Travis.
4a97cc1
to
082e235
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
LGTM |
Fixes: #348
cc: @containscafeine @kadel @cdrage @surajssd