<p>I’ve created helm chart which is working as expected, however I want to change the names of the deployed 
application
currently for each deployment I got different (random) name and I want it to be a fixed name, how can I do that?</p>

<p>This is the helper</p>

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

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some K8S name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "unleash.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

</code></pre>

<p>This is the outcome of the name after deployment</p>

<pre><code>crabby-ibex-postgresql-0              0/1    Pending            0         1s
crabby-ibex-unleash-86775cdffd-xt575  0/1    ContainerCreating  0         1s
</code></pre>

<p>This is the names from the values yaml</p>

<pre><code>replicaCount: 1
namespace: unleash
restartPolicy: Never
name: a-unleash
nameOverride: unleash
</code></pre>

<p>e.g. I want it instead of </p>

<pre><code>crabby-ibex-unleash-86775cdffd-xt575
</code></pre>

<p>to be like</p>

<pre><code>unleash-service
uleash-postgressql 

</code></pre>

<p><strong>update</strong></p>

<p>I've added the following to the <code>_helper.tpl</code></p>

<pre><code>{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}}
{{- end -}}

</code></pre>

<p>and put the following in the <code>values.yml</code>
<code>fullnameOverride: apps</code></p>

<p>i expect that the artifacts will start with <code>apps</code> and it doesnt work</p>

<p>Based of name <code>crabby-ibex-unleash-86775cdffd-xt575</code> I guess you are using <code>kind: Deployment</code> for this application, if you change <code>kind</code> to <code>StatefulSet</code> in you yaml you will end up with pod named <code>uleash-postgressql-0</code>, but because of helm you have additional prefix, you could use <code>--name=you_relese_name</code> which will create pod <code>you_relese_name-uleash-postgressql-0</code>.</p>

<p>If you really want to get rid of helm chart prefix you have to set <code>fullnameOverride</code> for every chart you are deploying.</p>

<p>EDIT:
To make use of <code>fullnameOverride</code> you have to define it in your <code>_helpers.tpl</code> file.</p>

<pre><code>{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "unleash.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some K8S name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "unleash.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
</code></pre>
