feat(refacto): move everything in internal package
This allows to install katenary with `go install` and to clean up the project folder.
This commit is contained in:
36
internal/generator/helmHelper.tpl
Normal file
36
internal/generator/helmHelper.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
{{- define "__APP__.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 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "__APP__.name" -}}
|
||||
{{- if .Values.nameOverride -}}
|
||||
{{- .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "__APP__.labels" -}}
|
||||
{{ include "__APP__.selectorLabels" .}}
|
||||
{{ if .Chart.Version -}}
|
||||
{{ printf "__PREFIX__/chart-version: '%s'" .Chart.Version }}
|
||||
{{- end }}
|
||||
{{ if .Chart.AppVersion -}}
|
||||
{{ printf "__PREFIX__/app-version: '%s'" .Chart.AppVersion }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "__APP__.selectorLabels" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{ printf "__PREFIX__/name: %s" $name }}
|
||||
{{ printf "__PREFIX__/instance: %s" .Release.Name }}
|
||||
{{- end -}}
|
Reference in New Issue
Block a user