[JIRA] (JENKINS-47055) Jenkins kubernetes plugin - support freestyle jobs

5 views
Skip to first unread message

stempher@mail.ru (JIRA)

unread,
Apr 4, 2018, 5:42:02 AM4/4/18
to jenkinsc...@googlegroups.com
Harry Stempher commented on Improvement JENKINS-47055
 
Re: Jenkins kubernetes plugin - support freestyle jobs

Help me please. I use multi-container pods in freestyle jobs - the first container is jnlp, the second is mariadb. How to me to be connected from jnlp to mariadb?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mszpak@wp.pl (JIRA)

unread,
Jul 18, 2018, 3:41:02 PM7/18/18
to jenkinsc...@googlegroups.com

I got through the plugin source code to get know if an ability to execute a freestyle job in a container other than jnlp, even with predefined fixed name could be simply implemented. Here's my conclusion/findings.

The pipeline code (namely ContainerExecDecorator) uses Kubernates (client) to request given command execution directly inside a defined container. On the other hand, a non-pipeline part (KubernetesLauncher) launches with pod with a "standard" jnlp slave running within a container (usually jenkins/jnlp-slave) which register itself as a cloud node and takes a job to execute. As a result, arbitrary steps/commands cannot be executed in the other container as the reverse channel (Jenkins -> Slave/Kubernates) is through the jnlp which is provided by (and within) a jenkins/jnlp-slave container.

Nevertheless, I'm new to that code and I could miss or confuse something. In fact, I would like to be wrong as I need that feature for "legacy" freestyle jobs which uses weird upstream Docker containers. @csanchez, could comment if my thesis is right and that feature (precised in my first sentence) couldn't be simply implemented for freestyle jobs?

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

mszpak@wp.pl (JIRA)

unread,
Jul 18, 2018, 3:41:02 PM7/18/18
to jenkinsc...@googlegroups.com
I got through the plugin source code to get know if an ability to execute a freestyle job in a container other than jnlp, even with predefined fixed name could be simply implemented. Here's my conclusion/findings.

The pipeline code (namely ContainerExecDecorator) uses Kubernates (client) to request given command execution directly inside a defined container. On the other hand, a non-pipeline part (KubernetesLauncher) launches with pod with a "standard" jnlp slave running within a container (usually jenkins/jnlp-slave) which register itself as a cloud node and takes a job to execute. As a result, arbitrary steps/commands cannot be executed in the other container as the reverse channel (Jenkins -> Slave/Kubernates) is through the jnlp which is provided by (and within) a jenkins/jnlp-slave container.

Nevertheless, I'm new to that code and I could miss or confuse something. In fact, I would like to be wrong as I need that feature for "legacy" freestyle jobs which uses weird upstream Docker containers.


[~csanchez], could comment if my thesis is right and that feature (precised in my first sentence) couldn't be simply implemented for freestyle jobs?

mszpak@wp.pl (JIRA)

unread,
Jul 18, 2018, 3:41:03 PM7/18/18
to jenkinsc...@googlegroups.com
I got through the plugin source code to get know if an ability to execute a freestyle job in a container other than jnlp, even with predefined fixed name could be simply implemented. Here's my conclusion/findings.

The pipeline code (namely ContainerExecDecorator) uses Kubernates (client) to request given command execution directly inside a defined container. On the other hand, a non-pipeline part (KubernetesLauncher) launches with pod with a "standard" jnlp slave running within a container (usually jenkins/jnlp-slave) which register itself as a cloud node and takes a job to execute. As a result, arbitrary steps/commands cannot be executed in the other container as the reverse channel (Jenkins -> Slave/Kubernates) is through the jnlp which is provided by (and within) a jenkins/jnlp-slave container.

Nevertheless, I'm new to that code and I could miss or confuse something. In fact, I would like to be wrong as I need that feature for "legacy" freestyle jobs which uses weird upstream Docker containers. @ [~ csanchez ] , could comment if my thesis is right and that feature (precised in my first sentence) couldn't be simply implemented for freestyle jobs?

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Jul 19, 2018, 3:35:02 AM7/19/18
to jenkinsc...@googlegroups.com

You can not execute commands in a different container using freestlye jobs.
You can launch multi container agents (pods) and connect from jnlp container to other containers using the network, ie. connect to a database in a different container using localhost and its port

jglick@cloudbees.com (JIRA)

unread,
Jun 12, 2019, 3:34:05 PM6/12/19
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
 
Jenkins / Improvement JENKINS-47055
Change By: Jesse Glick
Labels: kuberenetes-plugin
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

tavin.cole@gmail.com (JIRA)

unread,
Apr 20, 2020, 10:22:04 AM4/20/20
to jenkinsc...@googlegroups.com
Tavin Cole commented on Improvement JENKINS-47055
 
Re: Jenkins kubernetes plugin - support freestyle jobs

Is there another issue to track container selection for freestyle jobs?

Is it technically impossible?

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages