gansheer opened a new issue, #3877:
URL: https://github.com/apache/camel-k/issues/3877

   ## Environment
   
   **Version of camel k client used** : main (commit 
ffaa3e5b8df63c0167c59615308700ca6171ac44)
   **Kuberneted** : minikube 1.27.1
   
   ## Description
   
   I am refactoring the camel-k-example for the **Container** trait while 
adding the **Health** trait example. 
   
   The previous example using the **Container** trait worked with the probe 
scheme HTTPS, but I can't make it work with the **Health** trait.
   
   I used the following command (for the details on the certificate generation 
see the branch in progress 
https://github.com/gansheer/camel-k-examples/blob/generic-example-health-trait-clean/generic-examples/traits/health/README.md#probes-with-https-scheme)
 for my example
   ```
   ./kamel run \
     --property 
quarkus.http.ssl.certificate.file=/etc/camel/conf.d/_secrets/my-tls-secret/tls.crt
 \
     --property 
quarkus.http.ssl.certificate.key-file=/etc/camel/conf.d/_secrets/my-tls-secret/tls.key
 \
     --config secret:my-tls-secret \
     --name health \
     --trait health.enabled=true \
     --trait health.liveness-probe-enabled=true \
     --trait health.liveness-scheme=HTTPS \
     --trait health.readiness-probe-enabled=true \
     --trait health.readiness-scheme=HTTPS \
     HttpsHealthChecks.java
   ```
   
   The pod can't get to the READY status because the health probes don't use 
the https port : 
   
   1. Liveness spec
   
   ```sh
   kubectl get pods --selector="camel.apache.org/integration"="health" -o 
jsonpath='{.items[*].spec.containers[*].livenessProbe}'
   ```
   
   ```json
     
{"failureThreshold":3,"httpGet":{"path":"/q/health/live","port":8080,"scheme":"HTTPS"},"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}
   ```
   
   2. Readiness spec
   ```sh
   kubectl get pods --selector="camel.apache.org/integration"="health" -o 
jsonpath='{.items[*].spec.containers[*].readinessProbe}'
   ```
   
   ```json
   
{"failureThreshold":3,"httpGet":{"path":"/q/health/ready","port":8080,"scheme":"HTTPS"},"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}
   ```
   
   3. Pod state
   
   ```sh
   kubectl describe pod health-846cd5b5bd-tg9vx
   ```
   
   ```
   
   ...
       Liveness:       http-get https://:8080/q/health/live delay=0s timeout=1s 
period=10s #success=1 #failure=3
       Readiness:      http-get https://:8080/q/health/ready delay=0s 
timeout=1s period=10s #success=1 #failure=3
   
   ...
   
     Normal   Created    70s (x2 over 100s)  kubelet            Created 
container integration
     Normal   Started    70s (x2 over 100s)  kubelet            Started 
container integration
     Warning  Unhealthy  69s (x4 over 99s)   kubelet            Readiness probe 
failed: Get "https://172.17.0.6:8080/q/health/ready": dial tcp 172.17.0.6:8080: 
connect: connection refused
     Warning  Unhealthy  41s (x8 over 90s)   kubelet            Readiness probe 
failed: Get "https://172.17.0.6:8080/q/health/ready": http: server gave HTTP 
response to HTTPS client
     Warning  Unhealthy  41s (x6 over 90s)   kubelet            Liveness probe 
failed: Get "https://172.17.0.6:8080/q/health/live": http: server gave HTTP 
response to HTTPS client
   
   ...
   ```
   
   I Tried using the container trait `--trait container.port=8443` and/or the 
quarkus configurations  `--property quarkus.http.ssl-port=8443` `--property 
quarkus.http.insecure-requests=disabled`. Nothing worked, I could not change 
the probes spec `httpGet.port` used.
   
   Is there something I am missing or another way to do that ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to