Skip to content

Commit

Permalink
Merge pull request #33965 from geoand/#33944
Browse files Browse the repository at this point in the history
Don't include startup probe for KNative manifests
  • Loading branch information
geoand committed Jun 13, 2023
2 parents 2b4a24f + 460df0d commit 33d742b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
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
17 changes: 17 additions & 0 deletions integration-tests/kubernetes/quarkus-standard-way/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kubernetes</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
Expand Down Expand Up @@ -233,6 +237,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,7 @@ public void assertGeneratedResources() throws IOException {
assertNotNull(p.getHttpGet());
assertNull(p.getHttpGet().getPort());
});
assertThat(c.getStartupProbe()).isNotNull().satisfies(p -> {
assertThat(p.getInitialDelaySeconds()).isEqualTo(5);
assertProbePath(p, "/q/health/started");

assertNotNull(p.getHttpGet());
assertNull(p.getHttpGet().getPort());
});
assertThat(c.getStartupProbe()).isNull();
});
});
});
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 33d742b

Please sign in to comment.