-
Notifications
You must be signed in to change notification settings - Fork 202
When initContainers defined on deployment, readinessProbe must not be generated #1283
Comments
Looks like this is a generic case of #1178 not just spring-boot. If anyone give me code hint, I can submit a PR |
@rhuss : Could you please provide some code pointers related to this? In my opinion, ResourceMojo and InitContainerHandler might be good places to look at. |
@rareddy @rohanKanojia actually the entry point is probably Lines 34 to 56 in d359ddd
Here every container in the list is instrumented with a health check, also for init containers. Not sure whether it can be detected within this visitor what kind of container it is. Also, I guess that health checks for side-car container might not make sense, too. @nicolaferraro any idea how we could be more selective before adding readiness/liveness probes ? |
Yes, the type is the same, so all containers are enriched, no matter their kind. Maybe we should visit at |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
I think This issue can be fixed via #1202 , but need to update that |
Any updates or temporary alternate direction here ? |
@wadeholler : We're going to prioritize this, there is a PR already; just needs some refactoring |
@rareddy : I think this issue is fixed. Could you please confirm on |
Its still not fixed in 4.1 |
@djotanov : Umm, I just checked on one of the samples(spring-boot) using the fragment in src/main/fabric8. I couldn't reproduce the error:
Could you please share a sample project which reproduces this error? |
Sorry this feature actually works, I've hit another issue with 4.1: |
Hmm, I want to get this in too. That issue's author has done good research and I was expecting a PR from him. Let me try to find some time this weekend to send a PR for this :-) |
Description
if the template deployment.yml file in the fabric8 directory defines the initContainers the build process generates the liveness and readiness probes in generated openshift.yml and kubernetes.yml files which according to Kubernetes document here is not valid
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
Currently the deployment fails with error like
Failed to create DeploymentConfig from openshift.yml. io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://192.168.42.122:8443/apis/apps.openshift.io/v1/namespaces/myproject/deploymentconfigs. Message: DeploymentConfig "booster-crud-spring-boot" is invalid: [spec.template.spec.initContainers[0].livenessProbe: Invalid value: core.Probe{Handler:core.Handler{Exec:(*core.ExecAction)(nil),
Info
mvn -v
) : 3.5.0If it's a bug, how to reproduce :
The text was updated successfully, but these errors were encountered: