-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 configuring port of http probes #30566
Conversation
cc @cescoffier |
I'll defer to @Sgitario who has been doing a lot of work in this area |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I should be able to change the port when the management interface is used by producing my own decorator.
This comment has been minimized.
This comment has been minimized.
This is something you can do already, without this pull request. The pull request is more about exposing control to the user via configuration properties. From your comment I feel that you prefer to control it from an extension. This can be done by registering your own decorator, but probe port handling differs in same platforms (e.g. knative) and we wouldn't want to expose that to the management bits. So, it should be cleaner if we had a different built it, that would just allow as select the probe port name. Let me add it. |
In my context, at build time, I know if the management interface is enabled or not. If yes, then the health checks (and others) are not exposed on the main HTTP server (using the My idea was to update the extension exposing routes to the management interface and passing the port name as you did for |
This comment has been minimized.
This comment has been minimized.
* @return a decorator for configures the port of the http action of the probe. | ||
*/ | ||
public static DecoratorBuildItem createProbeHttpPortDecorator(String name, String target, ProbeConfig probeConfig, | ||
Optional<KubernetesProbePortNameBuildItem> portName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's awesome! I just have to emit that build item if the management interface is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with the changes, but I have a suggestion that I think it's cleaner. Let me know what you think about.
...kubernetes/spi/src/main/java/io/quarkus/kubernetes/spi/KubernetesProbePortNameBuildItem.java
Outdated
Show resolved
Hide resolved
ea65e52
to
81c1991
Compare
This comment has been minimized.
This comment has been minimized.
...loyment/src/main/java/io/quarkus/kubernetes/deployment/ChangeDeploymentTriggerDecorator.java
Outdated
Show resolved
Hide resolved
...loyment/src/main/java/io/quarkus/kubernetes/deployment/ChangeDeploymentTriggerDecorator.java
Outdated
Show resolved
Hide resolved
...ubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ProbeConfig.java
Outdated
Show resolved
Hide resolved
...ubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ProbeConfig.java
Outdated
Show resolved
Hide resolved
...kubernetes/spi/src/main/java/io/quarkus/kubernetes/spi/KubernetesProbePortNameBuildItem.java
Outdated
Show resolved
Hide resolved
...ubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/ProbeConfig.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
@iocanel I guess, the failures are related. WDYT? |
They must be. I'll have a look later today |
3a8600f
to
c284571
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should address the issue in ChangeDeploymentTriggerDecorator and RemoveDeploymentTriggerDecorator in a separated pull request since it's nothing to do with allowing configuring ports of HTTP probes.
Let's address this unrelated issue in #30566
This comment has been minimized.
This comment has been minimized.
I don't really mind which is the PR that deals with it. It can be #30768 too. One thing that is not clear to me is how are you able to reproduce the issue in #30768? I've only been able to reproduce the issue in this PR. |
That's a good question. It seems not possible to always reproduce this issue using Quarkus CI, but it is in:
|
@iocanel Any ETA on this one? |
We'll have a dekorate release that will unblock this one later today! |
c284571
to
16226b7
Compare
@cescoffier: just bumped the PR. Hopefully it will pass now. |
🎊 PR Preview bfe2ae9 has been successfully built and deployed to https://quarkus-io-pr-main-30566-preview.surge.sh/version/main/guides/ |
af8c5cc
to
6c786f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I approved it too soon without realising that #30566 (review) was not addressed yet.
This comment has been minimized.
This comment has been minimized.
You didn't approve the PR too soon. I did drop the commit completely, but I think that I accidentially pulled it back. |
The change in RemoveDeploymentTriggerDecorator.java still remains. |
6c786f2
to
826e680
Compare
Co-authored-by: Clement Escoffier <clement.escoffier@gmail.com>
826e680
to
02f4345
Compare
It should be ok now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
Resolves: #30547