snowdrop-zen / quarkus

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

Generated Kubernetes Manifests have incorrect value types #204

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 4 years ago

Describe the bug Generated Kubernetes.yml generates an incorrect type (int instead of string) for prometheus.io/port annotation. Generated Kubernetes.json generates an incorrect type (string instead of int) for livenessProbe.httpGet.port and readinessProbe.httpGet.port.

Expected behavior Correct types generated for annotations and ports

Actual behavior NOTE ./gradlew clean quarkusBuild -Dquarkus.kubernetes.deploy=true deploys the manifest correctly.

./gradlew quarkusBuild with Kubernetes, metrics, and healthcheck extensions generates incorrect types as specified above in the generated manifest files

trying to apply with kubectl generates the following errors

kubernetes.yml

unable to decode "build/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 "build/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 "build/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 "build/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.|...

kubernetes.json

* spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: "8080": must contain at least one letter or number (a-z, 0-9)
* spec.template.spec.containers[0].readinessProbe.httpGet.port: Invalid value: "8080": must contain at least one letter or number (a-z, 0-9)

To Reproduce Steps to reproduce the behavior:

  1. Add the kubernetes, metrics, and healthcheck extensions
  2. Add a healthcheck
  3. run quarkusBuild

Configuration

# Add your application.properties here, if applicable.
quarkus.kubernetes.readiness-probe.initial-delay=5s
quarkus.kubernetes.readiness-probe.period=30s
quarkus.kubernetes.liveness-probe.initial-delay=5s
quarkus.kubernetes.liveness-probe.period=30s

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

Additional context The kubernetes.yml file is affected in 1.6.1.Final however kubernetes.json is fine in 1.6.1.Final


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


$upstream:11431$