{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "sumologic-fluentd.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end -}}

{{/*
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 "sumologic-fluentd.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end -}}

{{/*
A uniquely named secret, which includes the install time
*/}}
{{- define "sumologic-fluentd.fullname-secrets" -}}
{{- printf "%s-secrets-%d" (include "sumologic-fluentd.fullname" .) .Release.Time.Seconds -}}
{{- end -}}

{{/*
Create a default fully qualified fluentd user conf name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "sumologic-fluentd.fluentdUserConfig.fullname" -}}
{{- printf "%s-confd" (include "sumologic-fluentd.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
