From bed59e12ea06a1e4186f4d18319b14908c5af1e7 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 2 Nov 2023 18:53:17 +0300 Subject: [PATCH] :fire: Delete the non-existing field references in `_helpers.tpl` file --- helm-chart/templates/04-hub-deployment.yaml | 2 +- helm-chart/templates/06-front-deployment.yaml | 2 +- helm-chart/templates/_helpers.tpl | 20 ++----------------- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/helm-chart/templates/04-hub-deployment.yaml b/helm-chart/templates/04-hub-deployment.yaml index 7a1725b21..e83de9a2c 100644 --- a/helm-chart/templates/04-hub-deployment.yaml +++ b/helm-chart/templates/04-hub-deployment.yaml @@ -9,7 +9,7 @@ metadata: {{- if .Values.tap.annotations }} {{- toYaml .Values.tap.annotations | nindent 4 }} {{- end }} - name: {{ include "kubeshark.fullname" . }}-hub + name: {{ include "kubeshark.name" . }}-hub namespace: {{ .Release.Namespace }} spec: replicas: 1 # Set the desired number of replicas diff --git a/helm-chart/templates/06-front-deployment.yaml b/helm-chart/templates/06-front-deployment.yaml index 346fd2d00..f9c0235a0 100644 --- a/helm-chart/templates/06-front-deployment.yaml +++ b/helm-chart/templates/06-front-deployment.yaml @@ -8,7 +8,7 @@ metadata: {{- if .Values.tap.annotations }} {{- toYaml .Values.tap.annotations | nindent 4 }} {{- end }} - name: {{ include "kubeshark.fullname" . }}-front + name: {{ include "kubeshark.name" . }}-front namespace: {{ .Release.Namespace }} spec: replicas: 1 # Set the desired number of replicas diff --git a/helm-chart/templates/_helpers.tpl b/helm-chart/templates/_helpers.tpl index c075745af..16b1014a9 100644 --- a/helm-chart/templates/_helpers.tpl +++ b/helm-chart/templates/_helpers.tpl @@ -2,7 +2,7 @@ Expand the name of the chart. */}} {{- define "kubeshark.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -11,16 +11,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this If release name contains chart name it will be used as a full name. */}} {{- define "kubeshark.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 }} +{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -38,9 +29,6 @@ helm.sh/chart: {{ include "kubeshark.chart" . }} {{ include "kubeshark.selectorLabels" . }} app.kubernetes.io/version: {{ .Chart.Version | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- with .Values.additionalLabels }} -{{ toYaml . }} -{{- end }} {{- if .Values.tap.labels }} {{ toYaml .Values.tap.labels }} {{- end }} @@ -58,9 +46,5 @@ app.kubernetes.io/instance: {{ .Release.Name }} Create the name of the service account to use */}} {{- define "kubeshark.serviceAccountName" -}} -{{- if and .Values.serviceAccount .Values.serviceAccount.create }} -{{- default (include "kubeshark.fullname" .) .Values.serviceAccount.name }} -{{- else }} {{- printf "%s-service-account" .Release.Name }} {{- end }} -{{- end }}