Open Dohbedoh opened 5 months ago
/cc @geoand (kubernetes), @iocanel (kubernetes)
Thanks for reporting the issue.
What version of Quarkus is this? If it's not the latest, can you check if the issue occurs with it?
With Quarkus 3.11.1. I can test with the most recent version..
Tested with 3.12.0.CR1
. Same problems.
Thanks for checking
I also facing this issue 😢
Description
Per the documentation of init tasks https://quarkus.io/guides/init-tasks#controlling-the-generated-job:
However this does not seem to be the case.
Given the following config in
application.yaml
:When adding the following to the
src/main/kubernetes/kubernetes.yml
:The resulting job does not inherit the
securityContext
customization:When trying to bring the customization to the Job itself in
src/main/kubernetes/kubernetes.yml
:The resulting yaml misses the
spec.template.spec.container.[0].image
and thespec.template.spec.restartPolicy
:Implementation ideas
It does not seem possible to customize the
securityContext
of the generatedJob
. No configuration option for this. Not possible viasrc/main/kubernetes/kubernetes.yml
because of the missing attributes when doing so. Customization made to the deployment viasrc/main/kubernetes/kubernetes.yml
is not reflected to the job.This could probably be improved. The job spec should maybe be reflecting the deployment spec, after all customization. Spec such as the pod securityContext or container securityContext make sense at least.
Also when customized via
src/main/kubernetes/kubernetes.yml, the job generation should set the
spec.template.spec.container.[0].imageand the
spec.template.spec.restartPolicy` if not customized.. That maybe is a bug.