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

Allow specifying replica count for service #19

Closed
tnozicka opened this issue Feb 21, 2017 · 2 comments
Closed

Allow specifying replica count for service #19

tnozicka opened this issue Feb 21, 2017 · 2 comments

Comments

@tnozicka
Copy link
Contributor

tnozicka commented Feb 21, 2017

OpenCompose user should be allowed to specify number of replicas for the service to be able to scale it.

Proposal: Add an optional field named replicas into ServiceSpec. It defaults to value 1 and it should map into generated deployment under DeploymentSpec.replicas

@surajssd
Copy link
Contributor

I would like to work on it :)

@kadel
Copy link
Member

kadel commented Mar 10, 2017

Proposal: Add an optional field named replicas into ServiceSpec. It defaults to value 1 and it should map into generated deployment under DeploymentSpec.replicas

This might be a little bit more trickier. I don't think we should default to 1.
If replicas is not set in OpenCompose file, than it should be also unset in generated PodSpec.

Replica count might be different on the server from what is specified in OpenCompose file.
If you default to replicas: 1 it will always overwrite replica number when doing kubectl apply.
In some cases this might cause problems (for example when using AutoScaler)

I think replicas in OpenCompose should directly map to PodSpec. If it is unset, than it shouldn't be set in PodSpec. If it is explicitly set to 0 than also in PodSpec should be 0.

surajssd added a commit to surajssd/opencompose that referenced this issue Apr 6, 2017
A user can now provide the number of replicas of the
service that are needed, using a field called `replicas`
in opencompose `service` section.

This is an optional field, if nothing is provided then
the no default value is assumed.

Fixes redhat-developer#19
@kadel kadel closed this as completed in #66 Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants