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

Unable to apply storage-provisioner.yaml due to yaml to JSON conversion error. #3956

Closed
Raajev opened this issue Mar 25, 2019 · 5 comments
Closed
Labels
addon/storage-provisioner Issues relating to storage provisioner addon kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@Raajev
Copy link

Raajev commented Mar 25, 2019

I tried to apply the storage-provisioner.yaml file but there is error related to YAML to JSON Conversion.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/minikube/master/deploy/addons/storage-provisioner/storage-provisioner.yaml serviceaccount/storage-provisioner unchanged clusterrolebinding.rbac.authorization.k8s.io/storage-provisioner unchanged error: error parsing https://raw.githubusercontent.com/kubernetes/minikube/master/deploy/addons/storage-provisioner/storage-provisioner.yaml: error converting YAML to JSON: yaml: line 13: did not find expected key

It seems issue is with the "Image" key:
image: {{default "gcr.io/k8s-minikube" .ImageRepository}}/storage-provisioner:v1.8.1

I was able to apply after changing the double quotes as below.
image: "{{default gcr.io/k8s-minikube .ImageRepository}}/storage-provisioner:v1.8.1"

But i am not sure if it will produce the same result. I am new to this so any help will be appreciated.
OS: Ubuntu 18.04.1

I was able apply by changing the image key as
image: "gcr.io/k8s-minikube/storage-provisioner:v1.8.1"

@tstromberg
Copy link
Contributor

Was this using the v0.35 release of minikube?

I suspect this may be related to #3714 - where we recently added templating for the ImageRepository change.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Mar 25, 2019

Maybe we should change the name of the files, to something like ".yaml.in" ?

https://github.com/kubernetes/minikube/pull/3714/files#diff-3f76927d4f10cf3ea76430a71c27d122

To show that it is not a YAML file anymore, but instead a template file for Go.

For most users, it should read: image: gcr.io/k8s-minikube/storage-provisioner:v1.8.1

@tstromberg
Copy link
Contributor

@afbjorklund - I'm not picky on the actual filename, but agree that it should no longer be .yaml since it requires template processing.

@laozc - any thoughts?

@Raajev
Copy link
Author

Raajev commented Mar 25, 2019

Maybe we should change the name of the files, to something like ".yaml.in" ?

https://github.com/kubernetes/minikube/pull/3714/files#diff-3f76927d4f10cf3ea76430a71c27d122

To show that it is not a YAML file anymore, but instead a template file for Go.

For most users, it should read: image: gcr.io/k8s-minikube/storage-provisioner:v1.8.1

@afbjorklund. It worked for me. Thanks !

@balopat balopat added addon/storage-provisioner Issues relating to storage provisioner addon kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed kind/bug Categorizes issue or PR as related to a bug. labels Apr 4, 2019
@tstromberg
Copy link
Contributor

In minikube v1.1, the files were renamed to .yaml.tmpl to avoid this confusion. Thanks for opening this bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon/storage-provisioner Issues relating to storage provisioner addon kind/documentation Categorizes issue or PR as related to documentation. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

4 participants