Skip to content

Commit

Permalink
Merge pull request #100 from HealthEngineAU/master
Browse files Browse the repository at this point in the history
More configurability of fullname template variable
  • Loading branch information
rimusz authored Mar 21, 2023
2 parents 5ffc4be + c214925 commit a4da5e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Buildkite Agent Chart
name: agent
version: 0.6.1
version: 0.6.2
appVersion: 3.25.0
icon: https://buildkite.com/_next/static/assets/assets/images/brand-assets/buildkite-logo-portrait-on-light-61fc0230.png
keywords:
Expand Down
2 changes: 2 additions & 0 deletions stable/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ Parameter | Description | Default
`dind.resources` | Pod resource requests & limits for dind sidecar (if enabled) | `{}`
`dind.volumeMounts` | Extra volumeMounts configuration | `nil`
`terminationGracePeriodSeconds` | Duration in seconds the pod needs to terminate gracefully | `30`
`nameOverride` | Provide a name to override the default `$name` template variable | `nil`
`fullnameOverride` | Provide a name to substitute for the full names of resources | `nil`

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Expand Down
8 changes: 8 additions & 0 deletions stable/agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Set the Deployment API version based on the version of Kubernetes the chart is being deployed into.
Expand Down

0 comments on commit a4da5e8

Please sign in to comment.