From 9f8a5376f9dde7e5e328e026e49ca4817b5f92f7 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Fri, 18 Apr 2025 11:05:51 +0200 Subject: [PATCH] feat(skipPlugins): add skipPlugins to helm chart --- chart/jenkins-operator/README.md | 1 + chart/jenkins-operator/crds/jenkins-crd.yaml | 5 +++++ chart/jenkins-operator/templates/jenkins.yaml | 1 + chart/jenkins-operator/values.yaml | 5 +++++ config/crd/bases/jenkins.io_jenkins.yaml | 7 ++++--- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/chart/jenkins-operator/README.md b/chart/jenkins-operator/README.md index 58b2026b..528228a0 100644 --- a/chart/jenkins-operator/README.md +++ b/chart/jenkins-operator/README.md @@ -91,6 +91,7 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes | jenkins.seedJobAgentImage | string | `""` | | | jenkins.seedJobs | list | `[]` | | | jenkins.serviceAccount.annotations | object | `{}` | | +| jenkins.skipPlugins | bool | `false` | | | jenkins.terminationGracePeriodSeconds | int | `30` | | | jenkins.tolerations | list | `[]` | | | jenkins.validateSecurityWarnings | bool | `false` | | diff --git a/chart/jenkins-operator/crds/jenkins-crd.yaml b/chart/jenkins-operator/crds/jenkins-crd.yaml index 2caa71d2..e30bc42a 100644 --- a/chart/jenkins-operator/crds/jenkins-crd.yaml +++ b/chart/jenkins-operator/crds/jenkins-crd.yaml @@ -1330,6 +1330,11 @@ spec: type: string type: object type: object + skipPlugins: + description: 'Allow to skip installation of both BasePlugins and + Plugins. Requires using a custom image which includes the + BasePlugins. Defaults to false.' + type: boolean terminationGracePeriodSeconds: description: 'Optional duration in seconds the pod needs to terminate gracefully.' type: integer diff --git a/chart/jenkins-operator/templates/jenkins.yaml b/chart/jenkins-operator/templates/jenkins.yaml index 0906891f..82372b71 100644 --- a/chart/jenkins-operator/templates/jenkins.yaml +++ b/chart/jenkins-operator/templates/jenkins.yaml @@ -115,6 +115,7 @@ spec: {{- with .Values.jenkins.hostAliases }} hostAliases: {{ toYaml . | nindent 4 }} {{- end }} + skipPlugins: {{ .Values.jenkins.skipPlugins }} {{- if .Values.jenkins.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.jenkins.terminationGracePeriodSeconds }} {{- end }} diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index e820b0af..47453c67 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -145,6 +145,11 @@ jenkins: # SeedJobAgentImage defines the image that will be used by the seed job agent. If not defined jenkins/inbound-agent:3248.v65ecb_254c298-6 will be used. seedJobAgentImage: "" + # skipPlugins allows to skip installation of both BasePlugins and Plugins. + # Requires using a custom image which includes the BasePlugins. + # Defaults to false. + skipPlugins: false + # Resource limit/request for Jenkins # See https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ for details resources: diff --git a/config/crd/bases/jenkins.io_jenkins.yaml b/config/crd/bases/jenkins.io_jenkins.yaml index 1fcd1c48..db9a117c 100644 --- a/config/crd/bases/jenkins.io_jenkins.yaml +++ b/config/crd/bases/jenkins.io_jenkins.yaml @@ -152,9 +152,6 @@ spec: Master represents Jenkins master pod properties and Jenkins plugins. Every single change here requires a pod restart. properties: - skipPlugins: - description: Allow to skip installation of both BasePlugins and Plugins. Requires using a custom image which includes the BasePlugins. Defaults to false. - type: boolean annotations: additionalProperties: type: string @@ -1677,6 +1674,10 @@ spec: type: string type: object type: object + skipPlugins: + description: Allow to skip installation of both BasePlugins and Plugins. Requires using a custom + image which includes the BasePlugins. Defaults to false. + type: boolean terminationGracePeriodSeconds: description: |- The grace period is the duration in seconds after the processes running in the pod are sent