[bitnami/jenkins] Chart standardised (#9003)

* [bitnami/jenkins] Chart standardised

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Version bump

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Add diagnosticMode

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* [bitnami/jenkins] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Miguel Ruiz
2022-02-17 09:34:17 +01:00
committed by GitHub
parent 1ebd139a61
commit 64ab7adec4
10 changed files with 226 additions and 88 deletions

View File

@@ -8,7 +8,7 @@ dependencies:
tags:
- bitnami-common
version: 1.x.x
description: Jenkins is an open source Continuous Integration and Continuous Delivery (CI/CD) server designed to automate the building, testing, and deploying of any software project.
description: Jenkins is an open source Continuous Integration and Continuous Delivery (CI/CD) server designed to automate the building, testing, and deploying of any software project.
engine: gotpl
home: https://github.com/bitnami/charts/tree/master/bitnami/jenkins
icon: https://bitnami.com/assets/stacks/jenkins/img/jenkins-stack-220x234.png
@@ -26,4 +26,4 @@ name: jenkins
sources:
- https://github.com/bitnami/bitnami-docker-jenkins
- https://jenkins.io/
version: 8.2.0
version: 9.0.0

View File

@@ -64,15 +64,18 @@ The command removes all the Kubernetes components associated with the chart and
### Common parameters
| Name | Description | Value |
| ------------------- | -------------------------------------------------- | --------------- |
| `kubeVersion` | Override Kubernetes version | `""` |
| `nameOverride` | String to partially override common.names.fullname | `""` |
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| Name | Description | Value |
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
| `kubeVersion` | Override Kubernetes version | `""` |
| `nameOverride` | String to partially override common.names.fullname | `""` |
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
### Jenkins Image parameters
@@ -111,6 +114,8 @@ The command removes all the Kubernetes components associated with the chart and
| `updateStrategy.type` | Jenkins deployment strategy type | `RollingUpdate` |
| `serviceAccountName` | Jenkins pod service account name | `default` |
| `priorityClassName` | Jenkins pod priority class name | `""` |
| `schedulerName` | Name of the k8s scheduler (other than default) | `""` |
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` |
| `hostAliases` | Jenkins pod host aliases | `[]` |
| `extraVolumes` | Optionally specify extra list of additional volumes for Jenkins pods | `[]` |
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Jenkins container(s) | `[]` |
@@ -136,6 +141,12 @@ The command removes all the Kubernetes components associated with the chart and
| `containerSecurityContext.enabled` | Enabled Jenkins containers' Security Context | `true` |
| `containerSecurityContext.runAsUser` | Set Jenkins container's Security Context runAsUser | `1001` |
| `containerSecurityContext.runAsNonRoot` | Set Jenkins container's Security Context runAsNonRoot | `true` |
| `startupProbe.enabled` | Enable startupProbe | `false` |
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `180` |
| `startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `6` |
| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `livenessProbe.enabled` | Enable livenessProbe | `true` |
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `180` |
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
@@ -148,6 +159,7 @@ The command removes all the Kubernetes components associated with the chart and
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` |
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
@@ -157,8 +169,8 @@ The command removes all the Kubernetes components associated with the chart and
| Name | Description | Value |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `service.type` | Jenkins service type | `LoadBalancer` |
| `service.port` | Jenkins service HTTP port | `80` |
| `service.httpsPort` | Jenkins service HTTPS port | `443` |
| `service.ports.http` | Jenkins service HTTP port | `80` |
| `service.ports.https` | Jenkins service HTTPS port | `443` |
| `service.nodePorts.http` | Node port for HTTP | `""` |
| `service.nodePorts.https` | Node port for HTTPS | `""` |
| `service.clusterIP` | Jenkins service Cluster IP | `""` |
@@ -178,6 +190,7 @@ The command removes all the Kubernetes components associated with the chart and
| `ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
| `ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
| `ingress.secrets` | Custom TLS certificates as secrets | `[]` |
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
### Persistence Parameters
@@ -186,9 +199,11 @@ The command removes all the Kubernetes components associated with the chart and
| --------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------- |
| `persistence.enabled` | Enable persistence using Persistent Volume Claims | `true` |
| `persistence.storageClass` | Persistent Volume storage class | `""` |
| `persistence.existingClaim` | Use a existing PVC which must be created manually before bound | `""` |
| `persistence.annotations` | Additional custom annotations for the PVC | `{}` |
| `persistence.accessModes` | Persistent Volume access modes | `[]` |
| `persistence.size` | Persistent Volume size | `8Gi` |
| `persistence.selector` | Selector to match an existing Persistent Volume for Ingester's data PVC | `{}` |
| `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` |
| `volumePermissions.image.registry` | Bitnami Shell image registry | `docker.io` |
| `volumePermissions.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` |
@@ -202,32 +217,35 @@ The command removes all the Kubernetes components associated with the chart and
### Metrics Parameters
| Name | Description | Value |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------- |
| `metrics.enabled` | Start a sidecar prometheus exporter to expose Jenkins metrics | `false` |
| `metrics.image.registry` | Jenkins Exporter image registry | `docker.io` |
| `metrics.image.repository` | Jenkins Exporter image repository | `bitnami/jenkins-exporter` |
| `metrics.image.tag` | Jenkins Jenkins Exporter image tag (immutable tags are recommended) | `0.20171225.0-debian-10-r701` |
| `metrics.image.pullPolicy` | Jenkins Exporter image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Jenkins Exporter image pull secrets | `[]` |
| `metrics.containerSecurityContext.enabled` | Enabled Jenkins exporter containers' Security Context | `true` |
| `metrics.containerSecurityContext.runAsUser` | Set Jenkins exporter containers' Security Context runAsUser | `1001` |
| `metrics.resources.limits` | The resources limits for the Jenkins exporter container | `{}` |
| `metrics.resources.requests` | The requested resources for the Jenkins exporter container | `{}` |
| `metrics.service.type` | Jenkins exporter service type | `ClusterIP` |
| `metrics.service.port` | Jenkins exporter service port | `9122` |
| `metrics.service.nodePort` | Node port for exporter | `""` |
| `metrics.service.externalTrafficPolicy` | Jenkins exporter service external traffic policy | `Cluster` |
| `metrics.service.loadBalancerIP` | Jenkins exporter service Load Balancer IP | `""` |
| `metrics.service.loadBalancerSourceRanges` | Jenkins exporter service Load Balancer sources | `[]` |
| `metrics.service.annotations` | Additional custom annotations for Jenkins exporter service | `{}` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.namespace` | The namespace in which the ServiceMonitor will be created | `""` |
| `metrics.serviceMonitor.interval` | The interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | The timeout after which the scrape is ended | `""` |
| `metrics.serviceMonitor.relabellings` | Metrics relabellings to add to the scrape endpoint | `[]` |
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor resource(s) can be discovered by Prometheus | `{}` |
| Name | Description | Value |
| -------------------------------------------- | --------------------------------------------------------------------------------- | ----------------------------- |
| `metrics.enabled` | Start a sidecar prometheus exporter to expose Jenkins metrics | `false` |
| `metrics.image.registry` | Jenkins Exporter image registry | `docker.io` |
| `metrics.image.repository` | Jenkins Exporter image repository | `bitnami/jenkins-exporter` |
| `metrics.image.tag` | Jenkins Jenkins Exporter image tag (immutable tags are recommended) | `0.20171225.0-debian-10-r701` |
| `metrics.image.pullPolicy` | Jenkins Exporter image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Jenkins Exporter image pull secrets | `[]` |
| `metrics.containerSecurityContext.enabled` | Enabled Jenkins exporter containers' Security Context | `true` |
| `metrics.containerSecurityContext.runAsUser` | Set Jenkins exporter containers' Security Context runAsUser | `1001` |
| `metrics.resources.limits` | The resources limits for the Jenkins exporter container | `{}` |
| `metrics.resources.requests` | The requested resources for the Jenkins exporter container | `{}` |
| `metrics.service.type` | Jenkins exporter service type | `ClusterIP` |
| `metrics.service.port` | Jenkins exporter service port | `9122` |
| `metrics.service.nodePort` | Node port for exporter | `""` |
| `metrics.service.externalTrafficPolicy` | Jenkins exporter service external traffic policy | `Cluster` |
| `metrics.service.loadBalancerIP` | Jenkins exporter service Load Balancer IP | `""` |
| `metrics.service.loadBalancerSourceRanges` | Jenkins exporter service Load Balancer sources | `[]` |
| `metrics.service.annotations` | Additional custom annotations for Jenkins exporter service | `{}` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.namespace` | The namespace in which the ServiceMonitor will be created | `""` |
| `metrics.serviceMonitor.interval` | The interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | The timeout after which the scrape is ended | `""` |
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` |
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
| `metrics.serviceMonitor.selector` | ServiceMonitor selector labels | `{}` |
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
The above parameters map to the env variables defined in [bitnami/jenkins](https://github.com/bitnami/bitnami-docker-jenkins). For more information please refer to the [bitnami/jenkins](https://github.com/bitnami/bitnami-docker-jenkins) image documentation.
@@ -311,6 +329,15 @@ Find more information about how to deal with common errors related to Bitnami's
## Upgrading
### To 9.0.0
This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository.
Affected values:
- `service.port` renamed as `service.ports.http`.
- `service.httpsPort` renamed as `service.ports.https`.
- `serviceMonitor.additionalLabels` renamed as `serviceMonitor.labels`.
### To 8.0.0
Due to recent changes in the container image (see [Notable changes](https://github.com/bitnami/bitnami-docker-jenkins#notable-changes)), the major version of the chart has been bumped preemptively.

View File

@@ -28,13 +28,13 @@ APP VERSION: {{ .Chart.AppVersion }}
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }} **
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
{{- $port:=.Values.service.port | toString }}
echo "Jenkins URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
{{- $port:=.Values.service.ports.http | toString }}
echo "Jenkins URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.ports.http }}{{ end }}/"
{{- else if contains "ClusterIP" .Values.service.type }}
echo "Jenkins URL: http://127.0.0.1:8080/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} 8080:{{ .Values.service.port }}
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} 8080:{{ .Values.service.ports.http }}
{{- end }}
{{- end }}
@@ -45,9 +45,3 @@ APP VERSION: {{ .Chart.AppVersion }}
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.data.jenkins-password}" | base64 --decode)
{{- include "jenkins.checkRollingTags" . }}
{{- $passwordValidationErrors := list -}}
{{- $secretName := include "common.names.fullname" . -}}
{{- $requiredJenkinsPassword := dict "valueKey" "jenkinsPassword" "secret" $secretName "field" "jenkins-password" "context" $ -}}
{{- $requiredJenkinsPasswordError := include "common.validations.values.single.empty" $requiredJenkinsPassword -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $requiredJenkinsPasswordError -}}
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}}

View File

@@ -45,6 +45,12 @@ spec:
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName }}
{{- end }}
{{- if .Values.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
@@ -87,15 +93,19 @@ spec:
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.command }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.args }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
env:
- name: JENKINS_USERNAME
value: {{ .Values.jenkinsUser | quote }}
@@ -111,9 +121,9 @@ spec:
- name: JENKINS_HOST
value: {{ include "jenkins.host" . | quote }}
- name: JENKINS_EXTERNAL_HTTP_PORT_NUMBER
value: {{ .Values.service.port | quote }}
value: {{ .Values.service.ports.http | quote }}
- name: JENKINS_EXTERNAL_HTTPS_PORT_NUMBER
value: {{ .Values.service.httpsPort | quote }}
value: {{ .Values.service.ports.https | quote }}
{{- if .Values.javaOpts }}
- name: JAVA_OPTS
value: {{ .Values.javaOpts | join " " | quote }}
@@ -139,6 +149,14 @@ spec:
- name: https
containerPort: {{ .Values.containerPorts.https }}
protocol: TCP
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: http
{{- else if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
@@ -165,6 +183,7 @@ spec:
{{- else if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
@@ -220,7 +239,7 @@ spec:
- name: jenkins-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "common.names.fullname" . }}
claimName: {{ default (include "common.names.fullname" .) (tpl .Values.persistence.existingClaim $) }}
{{- else }}
emptyDir: {}
{{- end }}

View File

@@ -14,13 +14,16 @@ metadata:
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}

View File

@@ -25,7 +25,7 @@ spec:
{{- end }}
ports:
- name: metrics
port: {{ .Values.metrics.service.port }}
port: {{ .Values.metrics.service.ports.http }}
targetPort: metrics
{{- if (and (or (eq .Values.metrics.service.type "NodePort") (eq .Values.metrics.service.type "LoadBalancer")) (not (empty .Values.metrics.service.nodePort))) }}
nodePort: {{ .Values.metrics.service.nodePort }}

View File

@@ -1,4 +1,4 @@
{{- if .Values.persistence.enabled -}}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
@@ -24,5 +24,8 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.selector }}
selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 4 }}
{{- end -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 2 }}
{{- end -}}

View File

@@ -9,19 +9,24 @@ metadata:
namespace: {{ .Release.Namespace | quote }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.labels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }}
{{- end }}
app.kubernetes.io/component: metrics
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: metrics
{{- if .Values.metrics.serviceMonitor.selector }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
{{- end }}
endpoints:
- port: metrics
path: /metrics
@@ -34,10 +39,13 @@ spec:
{{- if .Values.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabellings }}
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.relabellings | nindent 6 }}
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabelings }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
- {{ .Release.Namespace | quote }}
{{- end }}

View File

@@ -7,26 +7,36 @@ metadata:
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
{{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges) }}
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- if .Values.service.sessionAffinity }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
{{- end }}
{{- if .Values.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
ports:
- name: http
port: {{ .Values.service.port }}
port: {{ .Values.service.ports.http }}
protocol: TCP
targetPort: http
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http))) }}
@@ -35,7 +45,7 @@ spec:
nodePort: null
{{- end }}
- name: https
port: {{ .Values.service.httpsPort }}
port: {{ .Values.service.ports.https }}
protocol: TCP
targetPort: https
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.https))) }}
@@ -43,4 +53,7 @@ spec:
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}

View File

@@ -39,6 +39,20 @@ clusterDomain: cluster.local
## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []
## Enable diagnostic mode in the deployment
##
diagnosticMode:
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
##
enabled: false
## @param diagnosticMode.command Command to override all containers in the deployment
##
command:
- sleep
## @param diagnosticMode.args Args to override all containers in the deployment
##
args:
- infinity
## @section Jenkins Image parameters
@@ -54,7 +68,7 @@ extraDeploy: []
image:
registry: docker.io
repository: bitnami/jenkins
tag: 2.319.3-debian-10-r3
tag: 2.319.3-debian-10-r7
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -137,6 +151,15 @@ serviceAccountName: "default"
## @param priorityClassName Jenkins pod priority class name
##
priorityClassName: ""
## @param schedulerName Name of the k8s scheduler (other than default)
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
schedulerName: ""
## @param topologySpreadConstraints Topology Spread Constraints for pod assignment
## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
## The value is evaluated as a template
##
topologySpreadConstraints: []
## @param hostAliases Jenkins pod host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
@@ -254,8 +277,22 @@ containerSecurityContext:
enabled: true
runAsUser: 1001
runAsNonRoot: true
## Configure extra options for Jenkins containers' liveness and readiness probes
## Configure extra options for Jenkins containers' startup, liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
## @param startupProbe.enabled Enable startupProbe
## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
## @param startupProbe.periodSeconds Period seconds for startupProbe
## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
## @param startupProbe.failureThreshold Failure threshold for startupProbe
## @param startupProbe.successThreshold Success threshold for startupProbe
##
startupProbe:
enabled: false
initialDelaySeconds: 180
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 6
## @param livenessProbe.enabled Enable livenessProbe
## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
## @param livenessProbe.periodSeconds Period seconds for livenessProbe
@@ -284,6 +321,9 @@ readinessProbe:
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
## @param customStartupProbe Custom startupProbe that overrides the default one
##
customStartupProbe: {}
## @param customLivenessProbe Custom livenessProbe that overrides the default one
##
customLivenessProbe: {}
@@ -299,12 +339,12 @@ service:
## @param service.type Jenkins service type
##
type: LoadBalancer
## @param service.port Jenkins service HTTP port
## @param service.ports.http Jenkins service HTTP port
## @param service.ports.https Jenkins service HTTPS port
##
port: 80
## @param service.httpsPort Jenkins service HTTPS port
##
httpsPort: 443
ports:
http: 80
https: 443
## Node ports to expose
## @param service.nodePorts.http Node port for HTTP
## @param service.nodePorts.https Node port for HTTPS
@@ -428,6 +468,11 @@ ingress:
## -----END CERTIFICATE-----
##
secrets: []
## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
##
ingressClassName: ""
## @section Persistence Parameters
@@ -444,6 +489,9 @@ persistence:
## If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner
##
storageClass: ""
## @param persistence.existingClaim Use a existing PVC which must be created manually before bound
##
existingClaim: ""
## @param persistence.annotations Additional custom annotations for the PVC
##
annotations: {}
@@ -454,6 +502,14 @@ persistence:
## @param persistence.size Persistent Volume size
##
size: 8Gi
## @param persistence.selector Selector to match an existing Persistent Volume for Ingester's data PVC
## If set, the PVC can't have a PV dynamically provisioned for it
## E.g.
## selector:
## matchLabels:
## app: my-app
##
selector: {}
## 'volumePermissions' init container parameters
## Changes the owner and group of the persistent volume mount point to runAsUser:fsGroup values
## based on the podSecurityContext/containerSecurityContext parameters
@@ -473,7 +529,7 @@ volumePermissions:
image:
registry: docker.io
repository: bitnami/bitnami-shell
tag: 10-debian-10-r337
tag: 10-debian-10-r341
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
@@ -518,7 +574,7 @@ metrics:
image:
registry: docker.io
repository: bitnami/jenkins-exporter
tag: 0.20171225.0-debian-10-r701
tag: 0.20171225.0-debian-10-r705
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
@@ -575,7 +631,7 @@ metrics:
##
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.metrics.service.port }}"
prometheus.io/port: "{{ .Values.metrics.service.ports.http }}"
## Prometheus Service Monitor
## ref: https://github.com/coreos/prometheus-operator
## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
@@ -593,12 +649,27 @@ metrics:
## @param metrics.serviceMonitor.scrapeTimeout The timeout after which the scrape is ended
##
scrapeTimeout: ""
## @param metrics.serviceMonitor.relabellings Metrics relabellings to add to the scrape endpoint
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
##
relabellings: []
jobLabel: ""
## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
##
relabelings: []
## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
##
metricRelabelings: []
## @param metrics.serviceMonitor.selector ServiceMonitor selector labels
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
##
## selector:
## prometheus: my-prometheus
##
selector: {}
## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
##
honorLabels: false
## @param metrics.serviceMonitor.additionalLabels Additional labels that can be used so ServiceMonitor resource(s) can be discovered by Prometheus
## @param metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
##
additionalLabels: {}
labels: {}