Skip to content

Commit

Permalink
Don't include startup probe for KNative manifests
Browse files Browse the repository at this point in the history
Fixes #33944
  • Loading branch information
geoand committed Jun 12, 2023
1 parent 35e0f9c commit 94a2e70
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static io.dekorate.kubernetes.decorator.AddServiceResourceDecorator.distinct;
import static io.quarkus.kubernetes.deployment.Constants.DEFAULT_HTTP_PORT;
import static io.quarkus.kubernetes.deployment.Constants.HTTP_PORT;
import static io.quarkus.kubernetes.deployment.Constants.KNATIVE;
import static io.quarkus.kubernetes.deployment.Constants.QUARKUS_ANNOTATIONS_BUILD_TIMESTAMP;
import static io.quarkus.kubernetes.deployment.Constants.QUARKUS_ANNOTATIONS_COMMIT_ID;
import static io.quarkus.kubernetes.deployment.Constants.QUARKUS_ANNOTATIONS_VCS_URL;
Expand Down Expand Up @@ -1012,7 +1013,9 @@ private static List<DecoratorBuildItem> createProbeDecorators(String name, Strin
List<DecoratorBuildItem> result = new ArrayList<>();
createLivenessProbe(name, target, livenessProbe, livenessPath).ifPresent(d -> result.add(d));
createReadinessProbe(name, target, readinessProbe, readinessPath).ifPresent(d -> result.add(d));
createStartupProbe(name, target, startupProbe, startupPath).ifPresent(d -> result.add(d));
if (!KNATIVE.equals(target)) { // see https://github.com/quarkusio/quarkus/issues/33944
createStartupProbe(name, target, startupProbe, startupPath).ifPresent(d -> result.add(d));
}
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-jib</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void assertGeneratedResources() throws IOException {
assertNotNull(p.getHttpGet());
assertNull(p.getHttpGet().getPort());
});
assertThat(c.getStartupProbe()).isNull();
});
});
});
Expand Down

0 comments on commit 94a2e70

Please sign in to comment.