Skip to content
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

Adding --controller flag in up & down #868

Merged
merged 1 commit into from
Nov 30, 2017

Conversation

surajnarwade
Copy link
Contributor

To make kompose up & kompose convert equal in feature, This PR will
add --controller flag for kompose up as well as kompose down
so that user experience will be the same for up & convert
Resolves #798

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 14, 2017
@surajnarwade surajnarwade changed the title Adding --controller flag in up & down [WIP]Adding --controller flag in up & down Nov 14, 2017
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 14, 2017
@cdrage
Copy link
Member

cdrage commented Nov 14, 2017

@surajnarwade Need tests 👍

@surajnarwade
Copy link
Contributor Author

@cdrage since this feature is regarding kompose up and kompose down, there will be integration tests.
cc @ashetty1

@@ -797,6 +797,21 @@ func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.Con
return err
}
log.Infof("Successfully created Deployment: %s", t.Name)

case *extensions.DaemonSet:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not too sure why this code is being added? Can you describe this at least within the commit description?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I will mention

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdrage , updated commit message

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update GitHub description too...

To make `kompose up` & `kompose convert` equal in feature, This PR will
add `--controller` flag for `kompose up` as well as `kompose down`
so that user experience will be the same for `up` & `convert`
Resolves kubernetes#798

since we are adding `--controller` to `up` and `down`, So respective code to deploy and undeploy also being added for `daemonset` and `replicationcontroller`

Added tests for `--controller`
@surajnarwade
Copy link
Contributor Author

@cdrage , review needed :)

@surajnarwade surajnarwade changed the title [WIP]Adding --controller flag in up & down Adding --controller flag in up & down Nov 28, 2017
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2017
@@ -103,6 +103,19 @@ test_k8s() {
sleep 2 # Sleep for k8s to catch up to deployment
echo -e "\n${RED}kompose down -f $f ${NC}\n"
./kompose down -f $f
echo -e "\nTesting controller=daemonset key\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should find an alternative way to write these integration tests (perhaps in a separate function? and only running the httpd.yaml test?) or even a separate file...

It's a bit messy at the moment and we really need to refactor everything (using e2e_test.go similar to our other project we're working on.

Do you mind opening an issue explaining that we should refactor our integration tests to use a Go file / make this better? As well as add a comment (and spacing above this line) with a # TODO: need to reorganize / refactor
Otherwise, this LGTM (for now).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding issue as well.
Ready to merge ?

@cdrage
Copy link
Member

cdrage commented Nov 30, 2017

LGTM! Let's merge!

@cdrage cdrage merged commit 995dff6 into kubernetes:master Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants