Files
charts/bitnami/jenkins/templates/_helpers.tpl
Miguel Ruiz 6a32c8df62 [bitnami/jenkins] Major release 12.0.0 (#14541)
* [bitnami/jenkins] Major release 12.0.0

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

* Disable tls by default

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

* Revert file rename

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

* Replace .Release.Namespace

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

* Fix values metadata

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

* Update README.md with readme-generator-for-helm

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

* Fix typo

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

* Remove extra whitespaces

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

* Fix issues and minor changes

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

* Fix values metadata

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

* Update README.md with readme-generator-for-helm

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

* Update jenkins-agent image

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

* Small change in agent podTemplate

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

* Update README.md with readme-generator-for-helm

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

* Update README.md with readme-generator-for-helm

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

---------

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
2023-03-06 08:48:47 +01:00

96 lines
2.6 KiB
Smarty

{{/* vim: set filetype=mustache: */}}
{{/*
Return the proper Jenkins image name
*/}}
{{- define "jenkins.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Jenkins agent image name
*/}}
{{- define "jenkins.agent.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.agent.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "jenkins.volumePermissions.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "jenkins.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "jenkins.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Gets the host to be used for this application.
When using Ingress, it will be set to the Ingress hostname.
*/}}
{{- define "jenkins.host" -}}
{{- if .Values.ingress.enabled }}
{{- .Values.ingress.hostname | default "" -}}
{{- else -}}
{{- .Values.jenkinsHost | default "" -}}
{{- end -}}
{{- end -}}
{{/*
Gets the host to be used for this application.
When using Ingress, it will be set to the Ingress hostname.
*/}}
{{- define "jenkins.configAsCodeCM" -}}
{{- if .Values.configAsCode.existingConfigmap -}}
{{- .Values.configAsCode.existingConfigmap -}}
{{- else -}}
{{- printf "%s-casc" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Jenkins TLS secret name
*/}}
{{- define "jenkins.tlsSecretName" -}}
{{- $secretName := .Values.tls.existingSecret -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- else -}}
{{- printf "%s-crt" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Jenkins JKS password secret name
*/}}
{{- define "jenkins.tlsPasswordsSecret" -}}
{{- $secretName := .Values.tls.passwordsSecret -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- else -}}
{{- printf "%s-tls-pass" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Check if there are rolling tags in the images
*/}}
{{- define "jenkins.checkRollingTags" -}}
{{- include "common.warnings.rollingTag" .Values.image }}
{{- end -}}