[JIRA] (JENKINS-61931) Unable to use JNLP sidecar container without internet

5 views
Skip to first unread message

man@praqma.net (JIRA)

unread,
Apr 16, 2020, 9:40:02 AM4/16/20
to jenkinsc...@googlegroups.com
Mads Nielsen created an issue
 
Jenkins / Bug JENKINS-61931
Unable to use JNLP sidecar container without internet
Issue Type: Bug Bug
Assignee: Unassigned
Components: kubernetes-plugin
Created: 2020-04-16 13:39
Priority: Minor Minor
Reporter: Mads Nielsen

Short background:

If the container name is not "jnlp" the plugin will automatically insert a JNLP container, that pulls from docker hub. Naturally this does not work within a corporate network without internet connection.

If a private registry proxy is used it currently not possible to tell the Kubernetes plugin to use a different registry. 

Currently there are two REALLY bad workarounds:

  • Start Jenkins with a property: org.csanchez.jenkins.plugins.kubernetes.PodTemplateBuilder.defaultImage (BAD: requires us to maintain image version using this property)
  • Configure docker to use private docker registry by default. This is a big change, and not recommended. 

Suggestion: What about the option to prefix the default image with a custom docker registry? This could be an advanced UI option that when left alone does not change the behavior.

For instance: 

@VisibleForTesting
static final String DEFAULT_JNLP_IMAGE = System99            .getProperty(PodTemplateStepExecution.class.getName() + ".defaultImage", "jenkins/jnlp-slave:4.0.1-1");

What if we using like a UI option could prefix the fallback "jenkins/jnlp-slave:4.0.1-1" to "$registry/jenkins/jnlp-slave:4.0.1-1". That way, the plugin would maintain the version to be used, but be able to fetch from another registry.

 

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

man@praqma.net (JIRA)

unread,
Apr 16, 2020, 9:41:05 AM4/16/20
to jenkinsc...@googlegroups.com
Mads Nielsen updated an issue
Change By: Mads Nielsen
Short background:

If the container name is not "jnlp" the plugin will automatically insert a JNLP container, that pulls from docker hub. Naturally this does not work within a corporate network without internet connection.

If a private registry proxy is used it currently not possible to tell the Kubernetes plugin to use a different registry. 

Currently there are two REALLY bad workarounds:
* Start Jenkins with a property: org.csanchez.jenkins.plugins.kubernetes.PodTemplateBuilder.defaultImage (BAD: requires us to maintain image version using this property)
* Configure docker to use private docker registry by default. This is a big change, and not recommended. 


Suggestion: What about the option to prefix the default image with a custom docker registry? This could be an advanced UI option that when left alone does not change the behavior.

For instance: 
{code:java}
@VisibleForTesting
static final String DEFAULT_JNLP_IMAGE =
System99 System             .getProperty(PodTemplateStepExecution.class.getName() + ".defaultImage", "jenkins/jnlp-slave:4.0.1-1");
{code}

What if we using like a UI option could prefix the fallback "jenkins/jnlp-slave:4.0.1-1" to "$registry/jenkins/jnlp-slave:4.0.1-1". That way, the plugin would maintain the version to be used, but be able to fetch from another registry.

 

 

 

 
Reply all
Reply to author
Forward
0 new messages