Hi Roberto,
you can find the list of constant used here:
https://github.com/apache/camel-k/blob/main/pkg/apis/camel/v1/integration_types.go#L120-L132

Cheers,
Pasquale.

On Fri, Jan 21, 2022 at 12:27 PM Roberto Camelk <
betonetotbo.cam...@gmail.com> wrote:

> What are the values of integration status phases?
>
> In the API documentation this field is a "string", so anything is
> possible ehehehe...
>
> Here is an sample about the output of the "get integration" that am I
> using to map this "status.phase" to a enumeration inside my
> application:
>
> kubectl get integration micro-profile-metrics2 -o yaml
>
> apiVersion: camel.apache.org/v1
> kind: Integration
> metadata:
>   creationTimestamp: "2021-12-22T14:31:27Z"
>   generation: 1
>   name: micro-profile-metrics2
>   namespace: default
>   resourceVersion: "361241"
>   uid: 89de44cc-0b85-48ae-9198-b88287e89805
> spec:
>   dependencies:
>   - camel:cron
>   - camel:microprofile-metrics
>   sources:
>   - content: "//camel-k: dependency=camel-cron\n//camel-k:
> dependency=camel-quarkus-microprofile-metrics\n\nimport
>       org.apache.camel.builder.RouteBuilder;\n\npublic class
> MicroProfileMetrics2
>       extends RouteBuilder {\n\n    @Override\n    public void
> configure() throws
>       Exception
>
> {\n\tfrom(\"cron:tab?schedule=0/15+*+*+*+*+?\")\n\t\t.routeId(\"metrics\")\n\t\t.log(\"Starting
>       MicroProfile
>
> Metrics\")\n\t\t.delay(simple(\"${random(1000,5000)}\"))\n\t\t.choice()\n\t\t\t.when().simple(\"${random(1,10)}
>       < 2\")\n\t\t\t\t.throwException(new
>
> RuntimeException(\"Perdeu\"))\n\t\t\t.otherwise()\n\t\t\t\t.log(\"MicroProfile
>       Metrics sample done!\");\n    }\n\n}\n"
>     name: MicroProfileMetrics2.java
>   traits:
>     logging:
>       configuration:
>         level: TRACE
>     prometheus:
>       configuration:
>         enabled: true
> status:
>   capabilities:
>   - cron
>   conditions:
>   - firstTruthyTime: "2021-12-22T14:31:27Z"
>     lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: default/camel-k
>     reason: IntegrationPlatformAvailable
>     status: "True"
>     type: IntegrationPlatformAvailable
>   - firstTruthyTime: "2021-12-22T14:31:27Z"
>     lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: kit-c710tlu2oq5s73f67ccg
>     reason: IntegrationKitAvailable
>     status: "True"
>     type: IntegrationKitAvailable
>   - lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: fallback strategy selected
>     reason: CronJobNotAvailableReason
>     status: "False"
>     type: CronJobAvailable
>   - firstTruthyTime: "2021-12-22T14:31:27Z"
>     lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: deployment name is micro-profile-metrics2
>     reason: DeploymentAvailable
>     status: "True"
>     type: DeploymentAvailable
>   - lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: no http service required
>     reason: ServiceNotAvailable
>     status: "False"
>     type: ServiceAvailable
>   - firstTruthyTime: "2021-12-22T14:31:27Z"
>     lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: PodMonitor (micro-profile-metrics2) -> integration(8080)
>     reason: PrometheusAvailable
>     status: "True"
>     type: PrometheusAvailable
>   - lastTransitionTime: "2021-12-22T14:31:27Z"
>     lastUpdateTime: "2021-12-22T14:31:27Z"
>     message: no host or service defined
>     reason: IngressNotAvailable
>     status: "False"
>     type: ExposureAvailable
>   - firstTruthyTime: "2021-12-22T14:31:28Z"
>     lastTransitionTime: "2021-12-22T14:31:28Z"
>     lastUpdateTime: "2021-12-22T14:31:28Z"
>     message: 1/1 ready replicas
>     reason: DeploymentReady
>     status: "True"
>     type: Ready
>   dependencies:
>   - camel:cron
>   - camel:microprofile-metrics
>   - camel:quartz
>   - mvn:org.apache.camel.k:camel-k-cron
>   - mvn:org.apache.camel.k:camel-k-runtime
>   - mvn:org.apache.camel.quarkus:camel-quarkus-java-joor-dsl
>   - mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-metrics
>   digest: vqPpgTWXUuCKWFNdM39TznX4w1urMOF4PIhzrvSCe594
>   image:
> docker.io/betonetotbo/camel-k-kit-c710tlu2oq5s73f67ccg@sha256:a3fa2469bc9a5dbf8edfeb9dba693c9d43a6da2e75cf1046cd270833f84fe870
>   integrationKit:
>     name: kit-c710tlu2oq5s73f67ccg
>     namespace: default
>   lastInitTimestamp: "2021-12-22T14:31:27Z"
>   phase: Running
>   platform: camel-k
>   profile: Kubernetes
>   replicas: 1
>   runtimeProvider: quarkus
>   runtimeVersion: 1.10.0
>   selector: camel.apache.org/integration=micro-profile-metrics2
>   version: 1.7.0
>

Reply via email to