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

2020-04-16 Thread m...@praqma.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mads Nielsen updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61931  
 
 
  Unable to use JNLP sidecar container without internet   
 

  
 
 
 
 

 
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}@VisibleForTestingstatic 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.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira 

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

2020-04-16 Thread m...@praqma.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mads Nielsen created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61931  
 
 
  Unable to use JNLP sidecar container without internet   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Components: 
 kubernetes-plugin  
 
 
Created: 
 2020-04-16 13:39  
 
 
Priority: 
  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