Skip to content

Commit

Permalink
fix(quarkusio#8659): knative probe ports are removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Jul 18, 2020
1 parent 06905ef commit fb8e2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

public class ApplyHttpGetActionPortDecorator extends ApplicationContainerDecorator<HTTPGetActionFluent<?>> {

private final int port;
private final String port;

public ApplyHttpGetActionPortDecorator(int port) {
public ApplyHttpGetActionPortDecorator(String port) {
super(ANY, ANY); //We need to apply this to all deployments and all containers.
this.port = port;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,10 @@ private void doHandleProbes(String name, String target, Map<String, Integer> por
handleLivenessProbe(name, target, livenessProbe, kubernetesHealthLivenessPathBuildItem, session);
handleReadinessProbe(name, target, readinessProbe, kubernetesHealthReadinessPathBuildItem,
session);
session.resources().decorate(target,
new ApplyHttpGetActionPortDecorator(ports.getOrDefault(HTTP_PORT, DEFAULT_HTTP_PORT)));

//For knative we want the port to be null
String port = KNATIVE.equals(target) ? null : String.valueOf(ports.getOrDefault(HTTP_PORT, DEFAULT_HTTP_PORT));
session.resources().decorate(target, new ApplyHttpGetActionPortDecorator(port));
}

private void handleLivenessProbe(String name, String target, ProbeConfig livenessProbe,
Expand Down

0 comments on commit fb8e2a5

Please sign in to comment.