diff --git a/stable/agent/Chart.yaml b/stable/agent/Chart.yaml index dc3888f8..78ba6b32 100644 --- a/stable/agent/Chart.yaml +++ b/stable/agent/Chart.yaml @@ -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: diff --git a/stable/agent/README.md b/stable/agent/README.md index 9e554d8f..5b5afb65 100644 --- a/stable/agent/README.md +++ b/stable/agent/README.md @@ -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`. diff --git a/stable/agent/templates/_helpers.tpl b/stable/agent/templates/_helpers.tpl index 559791e9..724c5b25 100644 --- a/stable/agent/templates/_helpers.tpl +++ b/stable/agent/templates/_helpers.tpl @@ -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.