-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Shubham Gupta <[email protected]>
- Loading branch information
1 parent
6f0dd52
commit e9641f1
Showing
4 changed files
with
220 additions
and
114 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
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* Define common labels */}} | ||
{{- define "common.labels" -}} | ||
app.kubernetes.io/name: {{ .Release.Name }} | ||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion }} | ||
app.kubernetes.io/component: middleware | ||
{{- if .Values.labels }} | ||
{{- range $labelkey, $labelvalue := .Values.labels }} | ||
{{ $labelkey}}: {{ $labelvalue }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* Generate init container properties */}} | ||
{{- define "initContainer.properties" -}} | ||
{{- with .Values.initContainer }} | ||
{{- if .enabled }} | ||
image: {{ .image }} | ||
{{- if .imagePullPolicy }} | ||
imagePullPolicy: {{ .imagePullPolicy }} | ||
{{- end }} | ||
{{- if .resources }} | ||
resources: | ||
{{ toYaml .resources | nindent 2 }} | ||
{{- end }} | ||
{{- if .env }} | ||
env: | ||
{{ toYaml .env | nindent 2 }} | ||
{{- end }} | ||
{{- if .command }} | ||
command: | ||
{{ toYaml .command | nindent 2 }} | ||
{{- end }} | ||
{{- if .args }} | ||
args: | ||
{{ toYaml .args | nindent 2 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{/* Generate sidecar properties */}} | ||
{{- define "sidecar.properties" -}} | ||
{{- with .Values.sidecars }} | ||
name: {{ .name }} | ||
image: {{ .image }} | ||
{{- if .imagePullPolicy }} | ||
imagePullPolicy: {{ .imagePullPolicy }} | ||
{{- end }} | ||
{{- if .resources }} | ||
resources: | ||
{{ toYaml .resources | nindent 2 }} | ||
{{- end }} | ||
{{- if .env }} | ||
env: | ||
{{ toYaml .env | nindent 2 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
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
Oops, something went wrong.