skaffold init is not supporting helm config files

11/27/2019

I am trying to generate skaffold config for docker-compose.yml file using the following command,

skaffold init --compose-file docker-compose.yml --verbosity='info'

This fails with "Invalid k8s yaml" error. Please find below the error log.

time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/Chart.yaml: decoding kubernetes yaml: Object 'Kind' is missing in 'apiVersion: v1\nappVersion: 0.0.84\ndescription: A Helm chart for Kubernetes\nname: user-interface\nversion: 0.0.84\n'"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/config-map.yaml: decoding kubernetes yaml: couldn't get version/kind; json parse error: invalid character '{' looking for beginning of object key string"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/deployment.yaml: decoding kubernetes yaml: couldn't get version/kind; json parse error: invalid character '{' looking for beginning of object key string"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/ingress.yaml: decoding kubernetes yaml: couldn't get version/kind; json parse error: invalid character '{' looking for beginning of object key string"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/ksvc.yaml: decoding kubernetes yaml: couldn't get version/kind; json parse error: invalid character '{' looking for beginning of object key string"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/service.yaml: decoding kubernetes yaml: yaml: line 11: could not find expected ':'"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/volume.yaml: decoding kubernetes yaml: couldn't get version/kind; json parse error: invalid character '{' looking for beginning of object key string"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/templates/volumeclaim.yaml: decoding kubernetes yaml: couldn't get version/kind; json parse error: invalid character '{' looking for beginning of object key string"
time="2019-11-26T08:57:19Z" level=info msg="invalid k8s yaml charts/user-interface/values.yaml: decoding kubernetes yaml: Object 'Kind' is missing in '# Default values for helm.

I guess that skaffold is not able to support helm config files and interpret them as normal kubernetes config files.

Is there any option to mention the deploy type (like helm) in the skaffold init command?

I came across the similar issue which has been already resolved. https://github.com/GoogleContainerTools/skaffold/issues/1726

Please help me to resolve this issue and let me know if I am doing anything wrong.

-- Bhavani Prasad
docker-compose
kubernetes-helm
openshift
skaffold

0 Answers