apache / camel-k

Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
https://camel.apache.org/camel-k
Apache License 2.0
859 stars 344 forks source link

Integration status reporing as Not Ready even when it is #5707

Closed lsergio closed 1 month ago

lsergio commented 1 month ago

What happened?

An integration status is reporting False in the Ready condition even after the integration is successfully running.

Steps to reproduce

Create an Integration with the following code:

apiVersion: camel.apache.org/v1
kind: Integration
metadata:
  name: deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381
spec:  
  sources:
  - name: main.yaml
    content: |-
      - from:
          uri: rest:get:/demo
          steps:
          - setBody:
              constant: "It worked"
  traits:
    knative-service:
      minScale: 1
    camel:
      runtimeVersion: 3.8.1

After the application is up and running, check its status and search for the Ready condition to find:

  - lastTransitionTime: "2024-07-24T17:51:24Z"
    lastUpdateTime: "2024-07-24T17:51:25Z"
    message: Configuration "deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381" is waiting
      for a Revision to become ready.
    reason: RevisionMissing
    status: "False"
    type: Ready

As the Revision is supposedly not ready, I checked the Knative Service and Revision status:


k get ksvc deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381 -oyaml
...
status:
  address:
    url: http://deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381.sensedia.svc.cluster.local
  conditions:
  - lastTransitionTime: "2024-07-24T17:51:35Z"
    status: "True"
    type: ConfigurationsReady
  - lastTransitionTime: "2024-07-24T17:51:36Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2024-07-24T17:51:36Z"
    status: "True"
    type: RoutesReady
  latestCreatedRevisionName: deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001
  latestReadyRevisionName: deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001
  observedGeneration: 1
  traffic:
  - latestRevision: true
    percent: 100
    revisionName: deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001
  url: http://deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381.sensedia.sensedia.sensedia-eng.com

k get revision deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001 -oyaml

status:
  actualReplicas: 1
  conditions:
  - lastTransitionTime: "2024-07-24T17:51:35Z"
    severity: Info
    status: "True"
    type: Active
  - lastTransitionTime: "2024-07-24T17:51:35Z"
    status: "True"
    type: ContainerHealthy
  - lastTransitionTime: "2024-07-24T17:51:35Z"
    status: "True"
    type: Ready
  - lastTransitionTime: "2024-07-24T17:51:25Z"
    status: "True"
    type: ResourcesAvailable
  containerStatuses:
  - imageDigest: gcr.io/registry-ipaas-testing/camel-k-kit-cqgj5hb8firc739poi6g@sha256:345debc59d50af512e6db834b1fee1e60358e5e9ae171c72234757c811daec67
    name: integration
  desiredReplicas: 1
  observedGeneration: 1

k get revision deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001       
NAME                                                    CONFIG NAME                                       GENERATION   READY   REASON   ACTUAL REPLICAS   DESIRED REPLICAS
deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001   deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381   1            True             1                 1

 k get configuration deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381 -oyaml

...
status:
  conditions:
  - lastTransitionTime: "2024-07-24T17:51:35Z"
    status: "True"
    type: Ready
  latestCreatedRevisionName: deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001
  latestReadyRevisionName: deploy-fc949ea7-e5ea-4d59-8fed-83471b9350e0-381-00001
  observedGeneration: 1

...

As we can see, the revision is ready, but the Integration reports as being not ready.

### Relevant log output

_No response_

### Camel K version

2.3.3
lsergio commented 1 month ago

After deleting and recreating the operator pod, the integration moved to Ready = true. And now it is working as expected even for new integrations. I will close this and reopen with more details if it happens again.