snowdrop-zen / quarkus

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

Issue when using Kubernetes + MicroProfile Metrics #164

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 4 years ago

Describe the bug I created an application using three extensions:

When trying to deploy it on a Kubernetes cluster, it returns this error: unable to decode "target/kubernetes/kubernetes.yml": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found 8, error found in #10 byte of ...|io/port":8080,"prome|..., bigger context ...|metheus.io/path":"/metrics","prometheus.io/port":8080,"prometheus.io/scrape":"true"},"labels":{"app.|... unable to decode "target/kubernetes/kubernetes.yml": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found 8, error found in #10 byte of ...|io/port":8080,"prome|..., bigger context ...|metheus.io/path":"/metrics","prometheus.io/port":8080,"prometheus.io/scrape":"true"},"labels":{"app.|... unable to decode "target/kubernetes/kubernetes.yml": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found 8, error found in #10 byte of ...|io/port":8080,"prome|..., bigger context ...|metheus.io/path":"/metrics","prometheus.io/port":8080,"prometheus.io/scrape":"true"},"labels":{"app.|...

Expected behavior It should deploy the Kubernetes objects described in the kubernetes.yml

Actual behavior It returns the error described above.

To Reproduce Steps to reproduce the behavior:

  1. Create the application with the extensions:
    • quarkus-kubernetes
    • quarkus-container-image-jib
    • quarkus-smallrye-metrics
  2. Package the application mvn clean package -DskipTests -Dquarkus.container-image.push=true
  3. Try to deploy it: kubectl apply -f target/kubernetes/kubernetes.yml

Configuration

quarkus.container-image.registry=docker.io
quarkus.container-image.group=[your-repo]
quarkus.container-image.name=code-with-quarkus
quarkus.container-image.tag=1.0-SNAPSHOT
quarkus.kubernetes.service-type=load-balancer

Environment (please complete the following information):

Additional context There are two options that are working fine:

  1. Using the json file instead of yml file: kubectl apply -f target/kubernetes/kubernetes.json

  2. Deploying from the packaging step directly: mvn clean package -DskipTests -Dquarkus.kubernetes.deploy=true


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


$upstream:11134$