snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Property quarkus.container-image.tag with numbers generates a breaking minikube.yml file #167

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 4 years ago

Describe the bug

When you set the property quarkus.container-image.tag to a numberical value and then you generate a minikube.yml with the Minikube extension, the file cannot be applied by kubectl (while the JSON file works). Set letters instead of numbers, it works.

Expected behavior

When generating the manifest files with numbers, the minikube.json file can be applied by kubectl, so I expect the YAML file to be to (or both don't).

Actual behavior

Set the property quarkus.container-image.tag=123. Now generate the minikube.yml with a mvn package and the Minikube extension. When you execute the kubectl apply command you get:

$ kubectl apply -f target/kubernetes/minikube.yml

unable to decode "target/kubernetes/minikube.yml": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or n, but found 1, error found in #10 byte of ...|version":123},"name"|..., bigger context ...|:"code-with-quarkus","app.kubernetes.io/version":123},"name":"code-with-quarkus"}}|...
unable to decode "target/kubernetes/minikube.yml": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or n, but found 1, error found in #10 byte of ...|version":123},"name"|..., bigger context ...|:"code-with-quarkus","app.kubernetes.io/version":123},"name":"code-with-quarkus"},"spec":{"ports":[{|...
unable to decode "target/kubernetes/minikube.yml": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or n, but found 1, error found in #10 byte of ...|version":123},"name"|..., bigger context ...|:"code-with-quarkus","app.kubernetes.io/version":123},"name":"code-with-quarkus"},"spec":{"replicas"|...

If you execute the same command but on the JSON file, it works:

$ kubectl apply -f target/kubernetes/minikube.json

serviceaccount/code-with-quarkus created
service/code-with-quarkus created
deployment.apps/code-with-quarkus created

Now, if you set the property to letters quarkus.container-image.tag=abc and regenerate the YAML manifest and apply it, it works (the JSON file too):

$ kubectl apply -f target/kubernetes/minikube.yml

serviceaccount/code-with-quarkus created
service/code-with-quarkus created
deployment.apps/code-with-quarkus created

To Reproduce Steps to reproduce the behavior:

  1. Generate a Quarkus application from scratch with the Minikube extension
  2. Add the property quarkus.container-image.tag and set the value to 123
  3. Generate the manifest files with mvn clean package
  4. Execute kubectl apply -f target/kubernetes/kubernetes.yml it breaks

Configuration

quarkus.container-image.tag=123

Environment (please complete the following information):


https://github.com/quarkusio/quarkus/issues/11823


$upstream:11823$