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

New behavior of kompose up #86

Merged
merged 5 commits into from
Aug 9, 2016
Merged

New behavior of kompose up #86

merged 5 commits into from
Aug 9, 2016

Conversation

ngtuna
Copy link
Contributor

@ngtuna ngtuna commented Aug 4, 2016

Fix #40

/cc @janetkuo

// logrus.Debugf("%s\n", rcCreated)
// }
//}
logrus.Infof("We are going to create deployment controller and service for your dockerized application. \n" +
Copy link
Member

@janetkuo janetkuo Aug 5, 2016

Choose a reason for hiding this comment

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

Change all "Deployment controller" to "Deployment" or "Kubernetes Deployment" (when we say deployment controller we usually mean the thing that's responsible for creating/syncing Deployments, part of kube controller manager).

@janetkuo
Copy link
Member

janetkuo commented Aug 5, 2016

How do we handle the case that the converted k8s object is invalid (missing required fields)? Users would enter a weird state that their dockerized / kubernized apps are created partially.

$ kompose up -f docker-voting.yml 
We are going to create deployment controller and service for your dockerized application. 
If you need more kind of controllers, consider to use kompose convert and kubectl. 

WARN[0000] Unsupported key networks - ignoring          
WARN[0000] Unsupported key build - ignoring             
WARN[0000] [worker] Service cannot be created because of missing port. 
WARN[0000] [db] Service cannot be created because of missing port. 
Service result has been created.
Service vote has been created.
FATA[0000] Failed to unmarshal worker to service object: unexpected end of JSON input

Something to think about. We may fix it in a follow-up PR.

factory := cmdutil.NewFactory(nil)
clientConfig, err := factory.ClientConfig()
if err != nil {
logrus.Fatalf("Failed to get Kubernetes client config: %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

"Failed to get Kubernetes client config" --> "Failed to get config for accessing the Kubernetes server"

@ngtuna
Copy link
Contributor Author

ngtuna commented Aug 6, 2016

Thanks @janetkuo . I added a commit 82495e8 based on your comments. The last comment of handling invalid converted k8s object will be fixed in a follow-up PR.

@@ -1265,10 +1284,12 @@ func Up(c *cli.Context) {
if err != nil {
logrus.Fatalf("Failed to create deployment controller %s: ", k, err)
} else {
fmt.Println("Deployment controller " + k + " has been created.")
fmt.Printf("Deployment controller %q has been created.\n", k)
Copy link
Member

Choose a reason for hiding this comment

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

Deployment controller --> Deployment

@ngtuna
Copy link
Contributor Author

ngtuna commented Aug 9, 2016

Thanks @janetkuo. I fixed it with an 'amended' commit.

@ngtuna ngtuna merged commit 3da3fb5 into kubernetes:master Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants