Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for initContainers #254

Closed
wants to merge 2 commits into from
Closed

Add support for initContainers #254

wants to merge 2 commits into from

Conversation

ClementGautier
Copy link

Hello there,

As mentioned in #229 , the support for initContainers as podAnnotation is no longer an option for k8s >=1.8 so I gave a follow up to this pull request by using the latest version of kubernetes-client so we can use withInitContainers on the pod builder.

I'm definitely not a Java developer so I hope I'm not doing too many mistakes in this pull request.

@ClementGautier ClementGautier changed the title Add support for initContainers [WIP] Add support for initContainers Nov 22, 2017
@ClementGautier ClementGautier changed the title [WIP] Add support for initContainers Add support for initContainers Nov 22, 2017
@ClementGautier
Copy link
Author

@carlossg : I've rebased, run the tests suite locally and the CI seems good too. What's the next step ?

@ClementGautier
Copy link
Author

Oh, nevermind, the 2nd ci broke. ( by the way it's very confusing to have both ci.jenkins.io and jenkins.gke.csanchez.org sharing the same github status name )

Any clue on the failures ? when I run that locally using docker it works fine

@carlossg
Copy link
Contributor

@ClementGautier
Copy link
Author

Sorry if I insist but how can I reproduce this ? Locally if I run

docker run -v $(pwd):/app -w /app -it maven:3.5.0-jdk-8-alpine bash
bash-4.3# mvn -B clean install -Dmaven.test.skip=true -Dfindbugs.fork=false
bash-4.3# mvn -B test -DconnectorHost=0.0.0.0

Everything runs fine... is it related to the maven cache layer (means I don't pull the same dependencies than your jenkins instance ?). (Sorry again if I ask stupid questions, it's like my first java related pull request ever).

@carlossg
Copy link
Contributor

you need minikube running and check that there are no tests "skipped"

@ClementGautier
Copy link
Author

Ok, thanks for the hint, I will try to setup that

@ClementGautier
Copy link
Author

As this will become useless when #275 will be done and given the fact that I will not have time to complete this PR (we don't need it at work as we don't make use of init-containers for our builds) I'll close it.

@ClementGautier ClementGautier deleted the initcontainers branch February 14, 2018 11:55
@ilakhtenkov
Copy link

Could this be reopened? Because in case of definition of init containers and inheritence one template from another Init containers from child template are getting lost.

@dg424
Copy link

dg424 commented Aug 5, 2021

Can we reopen this feature request ? Where on this page - https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - does it say Init Containers are deprecated as 1.18 ?

@ClementGautier
Copy link
Author

@dg424 not 1.18 but 1.8 (yup that's old stuff) and it was not init containers per say but the ability to declare init containers through annotations (once upon a time, before init container became stable in 1.6, you needed to defined them inline in the pod.beta.kubernetes.io/init-containers annotation, here is an example). This pull request basically was here to bring the native support for the new way of defining init-containers.

I don't have the time to work on that but be welcomed to pick up the code were I left it (or better, start from scratch because this is 4 years old so the code might have changed a lot since). As a workaround I suggest using the yaml syntax that, of course, supports everything (it must be such a pain to maintain the compatibility between the dsl and native syntax that I'm surprised it hasn't been dropped yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants