-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
1.28.1
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 = System.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.
- links to