-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
401930d
commit a57b947
Showing
1 changed file
with
49 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,57 @@ | ||
#{{- define "microservice.fullname" -}} | ||
#{{- printf "%s-%s" (default .Chart.Name .Values.env.microservice.fullname) .Release.Name | trunc 63 | trimSuffix "-" }} | ||
#{{- end -}} | ||
|
||
#{{- define "microservice.labels" -}} | ||
#app.kubernetes.io/name: {{ .Chart.Name | quote }} | ||
#helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | replace ":" "-" | quote }} | ||
#app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
#app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" | replace ":" "-" | quote }} | ||
#app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
#{{- end -}} | ||
|
||
#{{- define "microservice.selectorLabels" -}} | ||
#app: {{ default .Values.env.microservice.selectorLabels .Chart.Name | quote }} | ||
#{{- end -}} | ||
|
||
#{{- define "microservice.matchLabels" -}} | ||
#app: {{ default .Values.env.microservice.selectorLabels .Chart.Name | quote }} | ||
#{{- end -}} | ||
|
||
{{/* Define the "microservice.fullname" template */}} | ||
{{- define "microservice.fullname" -}} | ||
{{- printf "%s-%s" (default .Chart.Name .Values.env.microservice.fullname) .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "microservice.labels" -}} | ||
app.kubernetes.io/name: {{ .Chart.Name | quote }} | ||
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | replace ":" "-" | quote }} | ||
app.kubernetes.io/instance: {{ .Release.Name | quote }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" | replace ":" "-" | quote }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service | quote }} | ||
{{/* Define the "microservice.name" template (if needed) */}} | ||
{{- define "microservice.name" -}} | ||
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "microservice.selectorLabels" -}} | ||
app: {{ default .Values.env.microservice.selectorLabels .Chart.Name | quote }} | ||
{{/* Define the "microservice.chart" template (if needed) */}} | ||
{{- define "microservice.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* Define other templates as necessary */}} | ||
{{/* Define the "microservice.labels" template */}} | ||
{{- define "microservice.labels" -}} | ||
{{- with .Values.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* Define the "microservice.matchLabels" template */}} | ||
{{- define "microservice.matchLabels" -}} | ||
app: {{ default .Values.env.microservice.selectorLabels .Chart.Name | quote }} | ||
{{- end -}} | ||
{{- with .Values.app.name }} | ||
app: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* Define the "microservice.selectorLabels" template */}} | ||
{{- define "microservice.selectorLabels" -}} | ||
{{- with .Values.app.name }} | ||
app: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
|