compose2kube
compose2kube copied to clipboard
Prevent errors when converting volumes starting ./
If we have a volume defined like this in our docker-compose,
volumes:
- ./cache:/var/cache/nginx
The name .cache is generated for the volume which failes the k8s name specification.
Error from server: error when creating "output/nginx-rc.yml":
ReplicationController "nginx" is invalid:
[spec.template.spec.volumes[0].name: Invalid value: ".cache": must match
the regex [a-z0-9]([-a-z0-9]*[a-z0-9])? (e.g. 'my-name' or '123-abc'),
spec.template.spec.containers[0].volumeMounts[0].name: Not found:
".cache"]