Search code examples
kubernetesquarkus

How to remove default Quarkus-generated annotations?


Quarkus generates such annotations by default:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    app.quarkus.io/commit-id: 88216f576f4a6f58862be6a6ef993036420e1eda
    app.quarkus.io/build-timestamp: 2022-07-18 - 18:28:39 +0000
    prometheus.io/scrape: "true"
    prometheus.io/path: /q/metrics
    prometheus.io/port: "8080"
    prometheus.io/scheme: http

Some annotations are useless because it makes K8s configuration very volatile and not commitable to Git (app.quarkus.io/build-timestamp etc). Some are simply invalid - Prometheus annotations at the Deployment level are junk.

This forces me to decline the manifest generation feature at all but it is very useful, especially for Operator development.

How to filter those auto-generated annotations or disable such generation altogether?


Solution

  • Now, it is possible to add quarkus.kubernetes.idempotent=true to disable both build-timestamp and commit-id annotations.