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

Output List kind object when using stdout #94

Merged
merged 1 commit into from
Aug 11, 2016

Conversation

surajssd
Copy link
Member

@surajssd surajssd commented Aug 9, 2016

Now user gets a List kind object when putting eveything on stdout or in a single file.

Fixes #73

@surajssd
Copy link
Member Author

@ngtuna rebased on the current master and now working to make charts output workable

@surajssd
Copy link
Member Author

There are currently two issues with the chart creation, first it

  • creates the converted files in json in the directory you are calling kompose from
  • then creates helm directory structure in the directory where docker-compose file resides

osDC := initDeploymentConfig(name, service, opt.replicas) // OpenShift DeploymentConfigs

var controller runtime.Object
// only one controller will be created per service so using switch
Copy link
Member

@janetkuo janetkuo Aug 10, 2016

Choose a reason for hiding this comment

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

Multiple controllers can be created at once as long as --stdout or --out isn't specified

Copy link
Member Author

Choose a reason for hiding this comment

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

I am confused here, why would we have multiple controllers when --stdout or --out is not given?

Copy link
Contributor

@ngtuna ngtuna Aug 11, 2016

Choose a reason for hiding this comment

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

That's strategy: we give user option to generate multiple controllers at the same time like this kompose convert --ds --rc. However when he uses --stdout or --out flag, the common case will be using it in a pipeline, only default primitives (deployment and service) are created.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh now I get it, thanks for the clarification 👍 will update it and make changes.

file = print(t.Name, strings.ToLower(t.Kind), data, opt.toStdout, opt.generateYaml, f)
case *extensions.Deployment:
file = print(t.Name, strings.ToLower(t.Kind), data, opt.toStdout, opt.generateYaml, f)
case *extensions.ReplicaSet:
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't support ReplicaSet anymore

Now user gets a `List` kind object when putting eveything on
stdout or in a single file.

Fixes kubernetes#73
@surajssd
Copy link
Member Author

For the thing about having services first I have created a function https://github.com/skippbox/kompose/pull/94/files#diff-41d801ef80f1858d5e8e9695667e4dafR1302 called from Up https://github.com/skippbox/kompose/pull/94/files#diff-41d801ef80f1858d5e8e9695667e4dafR1281

@ngtuna ngtuna added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2016
@ngtuna ngtuna merged commit 406ba65 into kubernetes:master Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. review needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants