Skip to content

Commit

Permalink
fix: update helper function name to be consistent with naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
jinja2 committed Oct 9, 2024
1 parent 2c92ee9 commit b80cd39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/splunk-synthetics-runner/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Render security context
{{/*
Render names compliant with DNS label standard as defined in RFC 1123
*/}}
{{- define "cleanupNames" -}}
{{- define "splunk-synthetics-runner.cleanupNames" -}}
{{- $name := regexReplaceAll "[^A-Za-z0-9\\-]" . "-" | lower -}}
{{- $name = regexReplaceAll "^-+|-+$" $name "" | trunc 63 | trimSuffix "-" -}}
{{- $name -}}
Expand Down
4 changes: 2 additions & 2 deletions charts/splunk-synthetics-runner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
{{- if .Values.synthetics.additionalCaCerts }}
{{- range $cert := keys .Values.synthetics.additionalCaCerts | sortAlpha }}
{{- $crtFile := regexReplaceAll "^(.*)\\.(\\w+)$" $cert "${1}.crt" }}
- name: {{ include "cleanupNames" $cert }}
- name: {{ include "splunk-synthetics-runner.cleanupNames" $cert }}
mountPath: {{ printf "/usr/local/share/ca-certificates/%s" $crtFile }}
subPath: {{ $crtFile }}
readOnly: false
Expand Down Expand Up @@ -124,7 +124,7 @@ spec:
{{- if .Values.synthetics.additionalCaCerts }}
{{- range $cert := keys .Values.synthetics.additionalCaCerts | sortAlpha }}
{{- $crtFile := regexReplaceAll "^(.*)\\.(\\w+)$" $cert "${1}.crt" }}
- name: {{ include "cleanupNames" $cert }}
- name: {{ include "splunk-synthetics-runner.cleanupNames" $cert }}
configMap:
name: {{ include "splunk-synthetics-runner.fullname" $ }}
items:
Expand Down

0 comments on commit b80cd39

Please sign in to comment.