Skip to content

Apicurio-operator: continuously patching deployment object (app) #6366

Open
@kamolhasan

Description

@kamolhasan

Description

Installed the latest k8s operator for apicurio-registry following install/apicurio-registry-operator-3.0.9.yaml.

ApicurioRegistry3 CRO YAML
apiVersion: registry.apicur.io/v1
kind: ApicurioRegistry3
metadata:
  name: apicurio-registry
  namespace: default
  labels:
    helm.sh/chart: apicurio-registry-0.1.1
    app.kubernetes.io/name: apicurio-registry
    app.kubernetes.io/instance: release-name
    app.kubernetes.io/version: "3.0.9"
    app.kubernetes.io/managed-by: Helm
spec:
  app:
    replicas: 2
    features:
      resourceDeleteEnabled: true
    networkPolicy:
      enabled: false
    podDisruptionBudget:
      enabled: false
    storage:
      type: postgresql
      sql:
        dataSource:
          password:
            key: password
            name: apicurio-registry-datasource-creds
          url: jdbc:postgresql://postgres.default.svc:5432/mydatabase
          username: postgres
    podTemplateSpec:
      metadata:
      spec:
        containers:
          - name: apicurio-registry-app
            resources:
              limits:
                cpu: 500m
                memory: 1024Mi
              requests:
                cpu: 200m
                memory: 512Mi
            imagePullPolicy: IfNotPresent

  ui:
    env:
      - name: REGISTRY_API_URL
        value: http://localhost:8080/apis/registry/v3
    replicas: 2
    podTemplateSpec:
      metadata:
      spec:
        serviceAccountName: apicurio-registry-operator
        containers:
          - name: apicurio-registry-ui
            resources:
              limits:
                cpu: 500m
                memory: 512Mi
              requests:
                cpu: 200m
                memory: 256Mi
            securityContext:
              capabilities:
                drop:
                - ALL
              runAsNonRoot: true
            imagePullPolicy: IfNotPresent
    networkPolicy:
      enabled: false
    podDisruptionBudget:
      enabled: false

Once I create the ApicurioRegistry3 object, the operator creates the both app and ui deployment object. But the operator fall into a loop of continuously patching the deployment object of app.

apicurio-registry-app-deployment deployment object
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "2"
    javaoperatorsdk.io/previous: ec2762bc-3d66-4866-9384-818d23e7f6de,923411
  creationTimestamp: "2025-06-25T09:36:16Z"
  generation: 689810
  labels:
    app: apicurio-registry
    app.kubernetes.io/component: app
    app.kubernetes.io/instance: apicurio-registry
    app.kubernetes.io/managed-by: apicurio-registry-operator
    app.kubernetes.io/name: apicurio-registry
    app.kubernetes.io/part-of: apicurio-registry
    app.kubernetes.io/version: 3.0.9
  name: apicurio-registry-app-deployment
  namespace: default
  ownerReferences:
  - apiVersion: registry.apicur.io/v1
    kind: ApicurioRegistry3
    name: apicurio-registry
    uid: e2789c9f-88be-4392-965a-9a3bd60014ff
  resourceVersion: "923412"
  uid: b7e6ff9b-b175-49af-b11c-20e8ab23acdd
spec:
  progressDeadlineSeconds: 600
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: apicurio-registry
      app.kubernetes.io/component: app
      app.kubernetes.io/instance: apicurio-registry
      app.kubernetes.io/name: apicurio-registry
      app.kubernetes.io/part-of: apicurio-registry
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: apicurio-registry
        app.kubernetes.io/component: app
        app.kubernetes.io/instance: apicurio-registry
        app.kubernetes.io/managed-by: apicurio-registry-operator
        app.kubernetes.io/name: apicurio-registry
        app.kubernetes.io/part-of: apicurio-registry
        app.kubernetes.io/version: 3.0.9
    spec:
      containers:
      - env:
        - name: QUARKUS_PROFILE
          value: prod
        - name: QUARKUS_HTTP_ACCESS_LOG_ENABLED
          value: "true"
        - name: APICURIO_REST_DELETION_ARTIFACT-VERSION_ENABLED
          value: "true"
        - name: APICURIO_REST_DELETION_ARTIFACT_ENABLED
          value: "true"
        - name: APICURIO_REST_DELETION_GROUP_ENABLED
          value: "true"
        - name: QUARKUS_HTTP_CORS_ORIGINS
          value: '*'
        - name: QUARKUS_HTTP_INSECURE_REQUESTS
          value: enabled
        - name: APICURIO_STORAGE_KIND
          value: sql
        - name: APICURIO_STORAGE_SQL_KIND
          value: postgresql
        - name: APICURIO_DATASOURCE_URL
          value: jdbc:postgresql://postgres.default.svc:5432/mydatabase
        - name: APICURIO_DATASOURCE_USERNAME
          value: postgres
        - name: APICURIO_DATASOURCE_PASSWORD
          valueFrom:
            secretKeyRef:
              key: password
              name: apicurio-registry-datasource-creds
        image: quay.io/apicurio/apicurio-registry:3.0.9
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /health/live
            port: 8080
            scheme: HTTP
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: apicurio-registry-app
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /health/ready
            port: 8080
            scheme: HTTP
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: 500m
            memory: 1Gi
          requests:
            cpu: 200m
            memory: 512Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  availableReplicas: 2
  conditions:
  - lastTransitionTime: "2025-06-25T09:36:46Z"
    lastUpdateTime: "2025-06-25T09:36:46Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2025-06-25T09:36:16Z"
    lastUpdateTime: "2025-06-25T10:12:58Z"
    message: ReplicaSet "apicurio-registry-app-deployment-fc47f4764" has successfully
      progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 688906
  readyReplicas: 2
  replicas: 2
  updatedReplicas: 2

From there, it can be seen that the generation is continuously increasing:

apiVersion: apps/v1
kind: Deployment
metadata:
  generation: 689810
  resourceVersion: "923412"  
... ... ...
status:
  observedGeneration: 688906

I maybe missing something, how to resolve the issue?

Environment

Running k8s in local kind cluster:

$ kubectl version
Client Version: v1.31.1
Kustomize Version: v5.4.2
Server Version: v1.31.0

Steps to Reproduce

  1. Install the operator install/apicurio-registry-operator-3.0.9.yaml.
  2. Apply the ApicurioRegistry3 CRO
  3. Monitor operator pod's log

Expected vs Actual Behaviour

Expectation is, the operator should not keep updating the App deployment, like it doesn't update the UI deployment.

Logs

https://pastebin.com/KkJPWdXA

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions