-
Notifications
You must be signed in to change notification settings - Fork 244
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
Adds ability to pick version when deploying #565
Conversation
This relies on #558 being merged in, after this is merged in, I will add unit tests / continue working on this. This PR adds the option of specifying an image. To test, use: TODO:
|
de031b6
to
16a99f4
Compare
In this case,
user have to specify name as well |
We should also update examples in |
@cdrage I'm assuming that:
|
Yup, that is both correct. The bug that @surajnarwade encountered was me forgetting to default to the componentName (rather than the version). Both of your points are true regarding the versioning as well as latest being the default if the tag is omitted. |
7aefffd
to
71379d0
Compare
@kadel @surajnarwade @syamgk @mik-dass @ashetty1 With the exception of unit tests being written (WIP), this is ready for review. Feel free to test it out! |
71379d0
to
1dc051e
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.
Tested this locally. LGTM
9161916
to
0f7b1b1
Compare
Tests written, please review: @kadel @surajnarwade @ashetty1 (since more unit tests were added) @syamgk |
Tested with minishift and working for me |
pkg/catalog/catalog.go
Outdated
@@ -61,6 +61,32 @@ func Exists(client *occlient.Client, componentType string) (bool, error) { | |||
return false, nil | |||
} | |||
|
|||
// VersionExists checks if that version exists, returns true if the given version exists, false if not | |||
// TODO: Write a test |
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 guess this can be removed now ;-)
pkg/component/labels/labels.go
Outdated
@@ -10,6 +10,9 @@ const ComponentLabel = "app.kubernetes.io/component-name" | |||
// ComponentTypeLabel is kubernetes that identifies type of a component | |||
const ComponentTypeLabel = "app.kubernetes.io/component-type" | |||
|
|||
// ComponentTypeLabel is kubernetes that identifies type of a component |
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.
copy/paste?. should be ComponentTypeVersion
Plus it looks like that comment doesn't make sense.
pkg/occlient/occlient_test.go
Outdated
@@ -465,7 +465,7 @@ func TestAddLabelsToArgs(t *testing.T) { | |||
} | |||
} | |||
|
|||
func Test_parseImageName(t *testing.T) { | |||
func Test_ParseImageName(t *testing.T) { |
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 TestParseImageName
0f7b1b1
to
883a3ae
Compare
This adds the ability to pick both the image as well as the image version when deploying, for example, using `odo create nodejs:8 foobar`
883a3ae
to
38432c9
Compare
@kadel Updated! ready for another round of testing 👍 |
Next time, please just add new commits, instead of squashing all changes into one. It will make reviews much easier. |
This adds the ability to pick both the image as well as the image
version when deploying, for example, using
odo create nodejs:8 foobar