Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Probe Scheme to Be Customized #2527

Merged
merged 3 commits into from
Jul 27, 2021

Conversation

Kyle-Cooley
Copy link
Contributor

Addresses #2513. This change allows the scheme used for the liveness and readiness probes to be overridden to HTTPS when needed. The approach taken was minimalistic.

Verified using this groovy script saved to /tmp/helloworld.groovy

from('timer:tick?period=3000')
  .setBody().constant('Hello world from Camel K')
  .to('log:info')

and an integration deployed with the following commands

openssl req -x509 -newkey rsa:4096 -keyout /tmp/integration-key.pem -out /tmp/integration-cert.pem -days 365 -nodes

kubectl create secret tls my-tls-secret --cert=/tmp/integration-cert.pem --key=/tmp/integration-key.pem

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 \
  /tmp/helloworld.groovy \
  --trait container.port=8443 \
  --trait container.probes-enabled=true \
  --trait container.liveness-scheme=HTTPS \
  --trait container.readiness-scheme=HTTPS

Release Note

Allow the scheme used for the liveness and readiness probes to be overridden

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@squakez
Copy link
Contributor

squakez commented Jul 26, 2021

@Kyle-Cooley do you think you can include that simple example under trait/container example directory (it has to be created)?

Copy link
Member

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please run make generate-doc to reflect the changes into the documentation?

@Kyle-Cooley
Copy link
Contributor Author

I've made those changes. Let me know if there is anything else.

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks a lot!

@astefanutti astefanutti merged commit b2ebaa1 into apache:main Jul 27, 2021
@Kyle-Cooley Kyle-Cooley deleted the https-health-checks branch July 27, 2021 14:50
@nicolaferraro nicolaferraro mentioned this pull request Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants