Commit cf7cacbb authored by Geoff Simmons's avatar Geoff Simmons

Reduce some repetition in the "hello" example helm charts.

parent e2060a7e
......@@ -5,12 +5,7 @@ metadata:
labels:
app.kubernetes.io/name: {{ $name }}
app.kubernetes.io/component: ingressBackend
helm.sh/chart: {{ printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- if $.Chart.AppVersion }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{- include "viking-ingress.labels" $ | nindent 4 }}
name: {{ $name }}
spec:
replicas: {{ default "1" $app.replicas }}
......@@ -23,12 +18,7 @@ spec:
labels:
app.kubernetes.io/name: {{ $name }}
app.kubernetes.io/component: ingressBackend
helm.sh/chart: {{ printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- if $.Chart.AppVersion }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{- include "viking-ingress.labels" $ | nindent 8 }}
spec:
containers:
- name: {{ $name }}
......
......@@ -5,12 +5,7 @@ metadata:
labels:
app.kubernetes.io/name: {{ $name }}-svc
app.kubernetes.io/component: ingressBackend
helm.sh/chart: {{ printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- if $.Chart.AppVersion }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{- include "viking-ingress.labels" $ | nindent 4 }}
name: {{ $name }}-svc
spec:
ports:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment