Skip to content

Commit 3ac7a3f

Browse files
authored
Merge pull request #839 from snyk/fix/unique-helm-deployments
fix: ensure Helm releases have unique names for the resources
2 parents 86034b8 + ad18c38 commit 3ac7a3f

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

snyk-monitor/templates/_helpers.tpl

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,7 @@
33
Expand the name of the chart.
44
*/}}
55
{{- define "snyk-monitor.name" -}}
6-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7-
{{- end -}}
8-
9-
{{/*
10-
Create a default fully qualified app name.
11-
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12-
If release name contains chart name it will be used as a full name.
13-
*/}}
14-
{{- define "snyk-monitor.fullname" -}}
15-
{{- if .Values.fullnameOverride -}}
16-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17-
{{- else -}}
18-
{{- $name := default .Chart.Name .Values.nameOverride -}}
19-
{{- if contains $name .Release.Name -}}
20-
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21-
{{- else -}}
22-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23-
{{- end -}}
24-
{{- end -}}
6+
{{- default .Release.Name | trunc 63 | trimSuffix "-" -}}
257
{{- end -}}
268

279
{{/*

snyk-operator-certified/helm-charts/snyk-monitor/templates/_helpers.tpl

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,7 @@
33
Expand the name of the chart.
44
*/}}
55
{{- define "snyk-monitor.name" -}}
6-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7-
{{- end -}}
8-
9-
{{/*
10-
Create a default fully qualified app name.
11-
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12-
If release name contains chart name it will be used as a full name.
13-
*/}}
14-
{{- define "snyk-monitor.fullname" -}}
15-
{{- if .Values.fullnameOverride -}}
16-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17-
{{- else -}}
18-
{{- $name := default .Chart.Name .Values.nameOverride -}}
19-
{{- if contains $name .Release.Name -}}
20-
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21-
{{- else -}}
22-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23-
{{- end -}}
24-
{{- end -}}
6+
{{- default .Release.Name | trunc 63 | trimSuffix "-" -}}
257
{{- end -}}
268

279
{{/*

0 commit comments

Comments
 (0)