Describe the bug
When io.quarkus:quarkus-smallrye-health dependency is in the classpath and an init container added to the application.properties file, it generates liveness and readiness probes for the init container which is wrong as per https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#differences-from-regular-containers and generated kubernetes.[yml|json] cannot be applied.
Expected behavior
There shouldn't be any probes defined for the init container
...
initContainers:
- command:
- sh
- -c
- echo The init container is running! && sleep 3600'
image: busybox:1.28
imagePullPolicy: IfNotPresent
name: migrate-db
serviceAccount: code-with-quarkus
...
Actual behavior
Readiness and liveness probes are defined for the init container
...
initContainers:
- command:
- sh
- -c
- echo The init container is running! && sleep 3600'
image: busybox:1.28
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: ""
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
name: migrate-db
readinessProbe:
failureThreshold: 3
httpGet:
path: ""
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
serviceAccount: code-with-quarkus
...
To Reproduce
Steps to reproduce the behavior:
./gradlew clean buildbuild/kubernetes/kubernetes.[yml|json]Configuration
# Add your application.properties here, if applicable.
quarkus.kubernetes.init-containers.migrate-db.image=busybox:1.28
quarkus.kubernetes.init-containers.migrate-db.command=sh,-c,echo The init container is running! && sleep 3600'
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a or ver: Darwin Emins-MacBook-Pro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64java -version: openjdk version "11.0.7" 2020-04-14mvnw --version or gradlew --version): Gradle 6.5Additional context
This issue does not appear on 1.8.3.Final version
/cc @geoand
cc @iocanel
Seems like a regression
Yeah, I'll have a look
cc @iocanel
Seems like a regression
Not a regression after all. I think that this has been around forever.
And I think its a decorate bug.
Most helpful comment
Yeah, I'll have a look