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

Possible to disable service links #1191

Merged
merged 1 commit into from
Sep 10, 2024
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
4 changes: 4 additions & 0 deletions charts/jenkins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ 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.

## 5.5.15

Add support for `controller.enableServiceLinks` to disable service links in the controller pod.

## 5.5.14

Update `jenkins/jenkins` to version `2.462.2-jdk17`
Expand Down
2 changes: 1 addition & 1 deletion charts/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: jenkins
type: application
home: https://www.jenkins.io/
version: 5.5.14
version: 5.5.15
appVersion: 2.462.2
description: >
Jenkins - Build great things at any scale! As the leading open source automation server, Jenkins provides over 1800 plugins to support building, deploying and automating any project.
Expand Down
549 changes: 275 additions & 274 deletions charts/jenkins/VALUES.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ spec:
{{- if .Values.controller.shareProcessNamespace }}
shareProcessNamespace: true
{{- end }}
{{- if not .Values.controller.enableServiceLinks }}
enableServiceLinks: false
{{- end }}
{{- if .Values.controller.usePodSecurityContext }}
securityContext:
{{- if kindIs "map" .Values.controller.podSecurityContextOverride }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ default values:
name: sc-config-volume
- mountPath: /var/jenkins_home
name: jenkins-home
enableServiceLinks: false
initContainers:
- env:
- name: POD_NAME
Expand Down Expand Up @@ -350,6 +351,7 @@ test scheme for config-reload:
name: sc-config-volume
- mountPath: /var/jenkins_home
name: jenkins-home
enableServiceLinks: false
initContainers:
- env:
- name: POD_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,23 @@ tests:
asserts:
- isNull:
path: spec.template.spec.shareProcessNamespace
- it: test false enableServiceLinks
template: jenkins-controller-statefulset.yaml
set:
controller:
enableServiceLinks: false
asserts:
- equal:
path: spec.template.spec.enableServiceLinks
value: false
- it: test true enableServiceLinks
template: jenkins-controller-statefulset.yaml
set:
controller:
enableServiceLinks: true
asserts:
- isNull:
path: spec.template.spec.enableServiceLinks
- it: test disableSecretMount
template: jenkins-controller-statefulset.yaml
set:
Expand Down
6 changes: 6 additions & 0 deletions charts/jenkins/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ controller:
# Share process namespace to allow sidecar containers to interact with processes in other containers in the same pod
shareProcessNamespace: false

# Service links might cause issue if running in a namespace with a large amount of services
# that might cause a slow startup when plugins are copied from ref to volume
# Set to true to keep previous behavior
# See https://github.com/kubernetes/kubernetes/issues/121787
enableServiceLinks: false

# Overrides the init container default values
# -- Resources allocation (Requests and Limits) for Init Container
initContainerResources: {}
Expand Down