Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60574

Allow override of JENKINS_DIRECT_CONNECTION in Jenkins k8s plugin

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • kubernetes-plugin
    • None

      After introduction of direct connection option in kubernetes plugin and remoting it's now possible to avoid http(s) requests to jenkins host.

      But if you want to connect agents which are tunneled, it's not possible to utilize direct connection because kubernetes plugin uses Jenkins host and port reported by TCP agent listener.

      https://github.com/jenkinsci/kubernetes-plugin/blob/33737fe0c96615e33b78205fe6e71aaffca2df49/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateBuilder.java#L345

       

      Currently there are no way to modify JENKINS_DIRECT_CONNECTION in the container using podTemplate because PodTemplateBuilder overrides any environment variables.

       

      Proposal

      Introduce one more property "Direct connection endpoint" in the cloud configuration under Direct Connection settings and allow to set it to be set to host:port string.

      If this direct connection endpoint was not set, use default values from TcpSlaveAgentListener like its done now.

            Unassigned Unassigned
            keeper Konstantin Satunin
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: