-
Notifications
You must be signed in to change notification settings - Fork 771
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
Add label 'kompose.controller.type' set service convert controller type #1001
Add label 'kompose.controller.type' set service convert controller type #1001
Conversation
45ac711
to
806b05d
Compare
I fully support this. However, a few more things need to be added:
This will close a bunch of issues. Specifically, the one regarding #698 ! |
9d41e06
to
2d9bd6d
Compare
Thanks for your review.
This pr support that ,user can use |
2d9bd6d
to
de5b565
Compare
@cdrage any update? |
Hey @xianlubird I'll find some time this week / early next week to do another review 👍 Maybe @hangyan could do one on this PR and #994 (comment) ? |
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 don't think you're implementing statefulset at all? You're only adding the new label type. Bit confused what you're trying to accomplish here.
@@ -301,6 +301,7 @@ The currently supported options are: | |||
| kompose.service.expose | true / hostname | | |||
| kompose.service.expose.tls-secret | secret name | | |||
| kompose.volume.size | kubernetes supported volume size | | |||
| kompose.controller.type | deployment / daemonset / replicationcontroller | |
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.
aren't you missing statefulset?
docs/user-guide.md
Outdated
kompose.controller.type: daemonset | ||
``` | ||
|
||
Service `web` will be converted to `Deployment` as default, service `db` will be converted to `StatefulSet` because of `kompose.controller.type` label. |
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.
this is totally wrong... if you specify kompose.controller.type daemonset, this should be converted to daemonset... if you supply statefulset, this should be converted to statefulset..
const ( | ||
DeploymentController = "deployment" | ||
DaemonSetController = "daemonset" | ||
ReplicationController = "replicationcontroller" |
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.
add statefulset
@cdrage Yes, I make a mistake for So in your opinion, I should implement many thanks. |
Hey @xianlubird For now, just implement the label, but please correct that daemonset will be converted to daemonset. We should raise another PR in the future for adding statefulset (see issue: #698 ) |
de5b565
to
4764041
Compare
@cdrage |
@xianlubird Please add OpenShift test files |
4764041
to
a4efdd6
Compare
@hangyan Already add OpenShift test case, thanks. |
/lgtm |
A standard wordpress compose like this
For service
db
, we'd better convert it toStatefulSet
. But if we run commandkompose convert -f
, all of them are converted toDeployment
. We have to split them into two compose file.So we'd better support a label which can control what type you want to convert.After that, a compose like this
So service web convert to
Deployment
, service db convert toStatefulSet
, it's very useful.What's your opinion, @cdrage @hangyan