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

Error with volume name with generated deployment file #584

Closed
codecraf8 opened this issue May 2, 2017 · 4 comments
Closed

Error with volume name with generated deployment file #584

codecraf8 opened this issue May 2, 2017 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P1

Comments

@codecraf8
Copy link

Following is my compose file

web:
  image: flask_web      
  command: python app.py
  ports:
   - "5000:5000"
  volumes:
   - .:/code
  links:
   - redis
redis:
  image: redis

It works well. Now I want to create deployment and services for this compose file.
As mentioned in docs kompose -f docker-compose.yml convert
It generates 5 files

INFO file "redis-service.yaml" created
INFO file "web-service.yaml" created
INFO file "redis-deployment.yaml" created
INFO file "web-deployment.yaml" created
INFO file ".-persistentvolumeclaim.yaml" created

When trying to run the deployment, kubectl create -f web-deployment.yaml I get an error

The Deployment "web" is invalid:
* spec.template.spec.volumes[0].name: Invalid value: ".": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
* spec.template.spec.containers[0].volumeMounts[0].name: Not found: "."

Whats gone wrong? How to rectify? Redis works fine, issues with web.

Files

Web Deployment - https://gist.github.com/codecraf8/5d41c752658ac6c2ec348befa3b89356
Web Service - https://gist.github.com/codecraf8/4cf6d4a34b71d74a0856e4c2b0dde795
.-persistentvolumeclaim.yaml -
https://gist.github.com/codecraf8/87c2809f8e49b318ce1cdbc5d590c4cd

@kadel kadel added kind/bug Categorizes issue or PR as related to a bug. priority/P1 labels May 2, 2017
@surajssd
Copy link
Member

surajssd commented May 3, 2017

function isPath needs an additional check which checks for dot . i.e. if the string is ., because it is also valid path as in current directory.

@codecraf8
Copy link
Author

Could I request any ETA on this?

@surajssd
Copy link
Member

surajssd commented May 5, 2017

@surajnarwade @procrypt wanna take a stab at this one?

@procrypt
Copy link
Contributor

procrypt commented May 5, 2017

I'll take this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P1
Projects
None yet
Development

No branches or pull requests

4 participants