Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for customizing kubernetes jnlpregistry #889

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions charts/jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0.
The changelog until v1.5.7 was auto-generated based on git commits.
Those entries include a reference to the git commit to be able to get more details.

## 4.4.1

Added `.Values.agent.jnlpregistry` to allow agents to be configured with private registry.

## 4.4.0

Add config keys for liveness probes on agent containers.


## 4.3.30

Update Jenkins version in controller test matching LTS version
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: jenkins
home: https://jenkins.io/
version: 4.4.0
version: 4.4.1
appVersion: 2.401.2
description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.
sources:
Expand Down
23 changes: 12 additions & 11 deletions charts/jenkins/VALUES_SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,19 @@ The following tables list the configurable parameters of the Jenkins chart and t

### Jenkins Agent(s)

| Parameter | Description | Default |
| -------------------------- | ----------------------------------------------- | ---------------------- |
| `agent.enabled` | Enable Kubernetes plugin jnlp-agent podTemplate | `true` |
| `agent.namespace` | Namespace in which the Kubernetes agents should be launched | Not set |
| `agent.containerCap` | Maximum number of agent | 10 |
| `agent.defaultsProviderTemplate` | The name of the pod template to use for providing default values | Not set |
| `agent.jenkinsUrl` | Overrides the Kubernetes Jenkins URL | Not set |
| `agent.jenkinsTunnel` | Overrides the Kubernetes Jenkins tunnel | Not set |
| Parameter | Description | Default |
| -------------------------- |------------------------------------------------------------------------------------------| ---------------------- |
| `agent.enabled` | Enable Kubernetes plugin jnlp-agent podTemplate | `true` |
| `agent.namespace` | Namespace in which the Kubernetes agents should be launched | Not set |
| `agent.containerCap` | Maximum number of agent | 10 |
| `agent.defaultsProviderTemplate` | The name of the pod template to use for providing default values | Not set |
| `agent.jenkinsUrl` | Overrides the Kubernetes Jenkins URL | Not set |
| `agent.jenkinsTunnel` | Overrides the Kubernetes Jenkins tunnel | Not set |
| `agent.kubernetesConnectTimeout` | The connection timeout in seconds for connections to Kubernetes API. Minimum value is 5. | 5 |
| `agent.kubernetesReadTimeout` | The read timeout in seconds for connections to Kubernetes API. Minimum value is 15. | 15 |
| `agent.maxRequestsPerHostStr` | The maximum concurrent connections to Kubernetes API | 32 |
| `agent.podLabels` | Custom Pod labels (an object with `label-key: label-value` pairs) | Not set |
| `agent.kubernetesReadTimeout` | The read timeout in seconds for connections to Kubernetes API. Minimum value is 15. | 15 |
| `agent.maxRequestsPerHostStr` | The maximum concurrent connections to Kubernetes API | 32 |
| `agent.podLabels` | Custom Pod labels (an object with `label-key: label-value` pairs) | Not set |
| `agent.jnlpregistry` | Custom docker registry used for to get agent jnlp image | Not set |

#### Pod Configuration

Expand Down
3 changes: 3 additions & 0 deletions charts/jenkins/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ jenkins:
clouds:
- kubernetes:
containerCapStr: "{{ .Values.agent.containerCap }}"
{{- if .Values.agent.jnlpregistry }}
jnlpregistry: "{{ .Values.agent.jnlpregistry }}"
{{- end }}
defaultsProviderTemplate: "{{ .Values.agent.defaultsProviderTemplate }}"
connectTimeout: "{{ .Values.agent.kubernetesConnectTimeout }}"
readTimeout: "{{ .Values.agent.kubernetesReadTimeout }}"
Expand Down
52 changes: 27 additions & 25 deletions charts/jenkins/unittests/jcasc-config-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -175,7 +175,7 @@ tests:
templates:
- name: "default"
namespace: "jenkins-agents"
id: 8b8df43c268753e48e277890486ed74e800d5f6dcc489abc85ce1ea605bcaa5d
id: 922254a78538f78cd39cffd771258043706e3c12f22090a61c38d30e138db55f
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -320,6 +320,7 @@ tests:
agent:
namespace: default
containerCap: 22
jnlpregistry: private.registry.com
defaultsProviderTemplate: my-defaults
kubernetesConnectTimeout: 11
kubernetesReadTimeout: 12
Expand Down Expand Up @@ -458,6 +459,7 @@ tests:
clouds:
- kubernetes:
containerCapStr: "22"
jnlpregistry: "private.registry.com"
defaultsProviderTemplate: "my-defaults"
connectTimeout: "11"
readTimeout: "12"
Expand All @@ -476,7 +478,7 @@ tests:
annotations:
- key: ci.jenkins-agent/test
value: "custom"
id: 42dd0a98c214ef66714186a0c2bd4cec7c611896ac009e359493e9b6cef90dd6
id: 0026a7d26962cd3fb00022cf71631f62de3cfb86ce9cdc907ef7427421ca2b5f
containers:
- name: "sideContainer"
alwaysPullImage: true
Expand Down Expand Up @@ -615,7 +617,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 5442946c9cad85b1ffbbd4a09e63a22f5fbf7d994f45d11787cc70ff333a2935
id: 4df569e5493facd66dbe50210ebcb8f60d11681b2d3dc4ab554f79e314e7f8d0
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -719,7 +721,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 7cc2eb6fd45cd8033db1623036887676956fbf8daead7b81bafa2aa4b06217d2
id: 671ee9545204c523873aa224dfdda6c29190159c13c19d7813c3a4fd9d4a3646
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -821,7 +823,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 1a66d4f24ea4489de459bbd7e48861935b53b535fffa73ff9f2030b604354577
id: 8d5593e6a439fb30486e38901284a8a1c3c0ca19c1f65a760d6d1c6fe29bca9d
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -925,7 +927,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: e597176b31bc8915dce05636dc64559d42abddbbb5d2bd262eed6121d000769a
id: 4853c60af89b8a2e31677c14ad427a89ea5e079352dbcd1f3e95e0fa97275d18
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1030,7 +1032,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 4c7f0a25242636f1e607ae67c0920c069b79168095bd0c3f268b80f515f952ce
id: 9802281306f437aae98a8597f93103312a82c1162f5d43e223cc540cee6df659
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1134,7 +1136,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 99a5c4195d5040158b8384897e8951716486866452f4bad9bdabb18c77c782fc
id: 4adc2da4d2378bb125d9a47129ef0ed953051f326f9819667aac8da40c43d853
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1305,7 +1307,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1406,7 +1408,7 @@ tests:
templates:
- name: "default"
namespace: "NAMESPACE"
id: b9ab5c3cae0f7acee9cf5e63b5fb59503d9b4e1c5067ec62ef78a3b10d36ccba
id: 5f9b9b55c58a0159e2b571ddfb6efabc60cff836b3ada69198bb41739c45c2e0
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1503,7 +1505,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1602,7 +1604,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1689,7 +1691,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1783,7 +1785,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1874,7 +1876,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -1966,7 +1968,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 186af490213a10864c33d2a6bcb2b132f0c72e60330fc48a8d4203aa7722854a
id: a6e410bbc54d23e84ac3f58bd1608da0e09b1ef712ce19292fc4c1ee6c8add69
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2057,7 +2059,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 36c25a6935291ebd36ecc3877907cecd7bd16631b31763f13aa44667012a4da3
id: 781b2a4b9b59beaf9639bda26bd27d9b356cf07ad5fa185e2755eab7c4fc225e
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2178,7 +2180,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 36c25a6935291ebd36ecc3877907cecd7bd16631b31763f13aa44667012a4da3
id: 781b2a4b9b59beaf9639bda26bd27d9b356cf07ad5fa185e2755eab7c4fc225e
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2343,7 +2345,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 36c25a6935291ebd36ecc3877907cecd7bd16631b31763f13aa44667012a4da3
id: 781b2a4b9b59beaf9639bda26bd27d9b356cf07ad5fa185e2755eab7c4fc225e
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2480,7 +2482,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 864f14998e878bee3ba30a87f53cbfc1c3b92c4092c20d54919ce2d6b63ae39c
id: 12e767f83d50b6f41d80a1ddec9db8bacd106cd3d08cec05da9ce5c1bea41fb2
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2584,7 +2586,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: e901f161fc0d795a6c4943dd76cf691876e6476f081458fea24a8ee16396fede
id: b3940f10bfbf55e56d1a68c6d5ffe459e1bd62afe75c427e2281de8527857e05
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2689,7 +2691,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 2a58847f5c0531dc1ca1391947c668452b349a4c540dcbc0156de96b95061346
id: 39d6ceda20a6309ca271f5fb440ef48060811197216ec057b81f29a6874057c3
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2792,7 +2794,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: 15149d9f36a1c54f86fca20c7411eaeb6b7d840737a6ce880d0944bb530a7e0a
id: a2e8e4e4ee677bb2aa22de8189e8c64c98f3eb28729734f2b2e9972c01d9cb68
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down Expand Up @@ -2908,7 +2910,7 @@ tests:
templates:
- name: "default"
namespace: "default"
id: ce5b46b52251430b1971f41ee09fb9403f414ef78768e7bb458b92d6b769bf6e
id: 918616a26f37ee6710ffe487d6303ae8dd62760fc84ab34c8e2e889d9c010058
containers:
- name: "jnlp"
alwaysPullImage: false
Expand Down
2 changes: 2 additions & 0 deletions charts/jenkins/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ agent:
kubernetesReadTimeout: 15
maxRequestsPerHostStr: "32"
namespace:
# private registry for agent image
jnlpregistry:
timja marked this conversation as resolved.
Show resolved Hide resolved
image: "jenkins/inbound-agent"
tag: "3107.v665000b_51092-15"
workingDir: "/home/jenkins/agent"
Expand Down