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

Kompose replicas option not working with v3 deploy? #801

Closed
ashetty1 opened this issue Aug 30, 2017 · 4 comments
Closed

Kompose replicas option not working with v3 deploy? #801

ashetty1 opened this issue Aug 30, 2017 · 4 comments

Comments

@ashetty1
Copy link
Contributor

ashetty1 commented Aug 30, 2017

It looks like the kompose replica option isn't working with v3 compose file including deploy label:

$ ./kompose version
1.0.0 (5f89e1a)

$ cat script/test/fixtures/v3/docker-compose-deploy-mode.yaml
version: "3"

services:
  foo:
    deploy:
      mode: global
      replicas: 6
    image: redis

$ ./kompose up --provider=openshift --emptyvols --replicas 2 -f script/test/fixtures/v3/docker-compose-deploy-mode.yaml
WARN Global mode not yet supported, containers will only be replicated once throughout the cluster. DaemonSet support will be added in the future. 
INFO We are going to create OpenShift DeploymentConfigs, Services for your Dockerized application. 
If you need different kind of resources, use the 'kompose convert' and 'oc create -f' commands instead. 
 
INFO Deploying application in "myproject" namespace 
INFO Successfully created Service: foo            
INFO Successfully created DeploymentConfig: foo   
INFO Successfully created ImageStream: foo        

Your application has been deployed to OpenShift. You can run 'oc get dc,svc,is' for details.

$ oc get pods
NAME          READY     STATUS    RESTARTS   AGE
foo-1-jrqdc   1/1       Running   0          10m

@cdrage
Copy link
Member

cdrage commented Aug 30, 2017

@ashetty1

That is normal. Look at the WARN output:

WARN Global mode not yet supported, containers will only be replicated once throughout the cluster. DaemonSet support will be added in the future. 

mode: global has been set which limits each container to 1.

See: https://docs.docker.com/compose/compose-file/#mode

@cdrage cdrage closed this as completed Aug 30, 2017
@cdrage
Copy link
Member

cdrage commented Aug 30, 2017

remove mode: global if you wish to use replicas: 6

@ashetty1
Copy link
Contributor Author

ashetty1 commented Aug 30, 2017

@cdrage I get that, but does it overrule kompose up --replicas 6 too?

@cdrage
Copy link
Member

cdrage commented Aug 30, 2017

@ashetty1 Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants