Skip to content

Commit e610ba6

Browse files
committed
feat: remove Values.enclosingRun
BREAKING CHANGE: this may break ancient charts This also consolidates some of the pod and service labeling in charts/shell Signed-off-by: Nick Mitchell <[email protected]>
1 parent 23108c3 commit e610ba6

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{{- define "pod/labels" }}
22
labels:
3-
app.kubernetes.io/component: {{ .Values.component }}
4-
app.kubernetes.io/part-of: {{ .Values.partOf }}
5-
app.kubernetes.io/name: {{ .Values.lunchpail.instanceName }}
6-
app.kubernetes.io/instance: {{ .Values.name }}
7-
app.kubernetes.io/managed-by: lunchpail.io
3+
{{- include "labels" . | indent 2 }}
4+
{{- end }}
5+
6+
{{- define "labels" }}
7+
app.kubernetes.io/component: {{ $.Values.component }}
8+
app.kubernetes.io/part-of: {{ $.Values.partOf }}
9+
app.kubernetes.io/name: {{ $.Values.lunchpail.instanceName }}
10+
app.kubernetes.io/instance: {{ $.Values.name }}
11+
app.kubernetes.io/managed-by: lunchpail.io
812
{{- end }}

pkg/fe/transformer/api/shell/chart/templates/service.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ apiVersion: v1
44
kind: Service
55
metadata:
66
name: {{ .Release.Name }}
7-
labels:
8-
app.kubernetes.io/component: {{ .Values.component }}
9-
app.kubernetes.io/part-of: {{ .Values.partOf }}
10-
app.kubernetes.io/name: {{ .Values.name }}
11-
app.kubernetes.io/instance: {{ .Values.enclosingRun }}
12-
app.kubernetes.io/managed-by: lunchpail.io
7+
{{- include "pod/labels" . | indent 2 }}
138
spec:
149
ports:
1510
{{- range $port := .Values.expose }}
@@ -19,10 +14,7 @@ spec:
1914
targetPort: {{ index $parts 1 }}
2015
protocol: TCP
2116
selector:
22-
app.kubernetes.io/component: {{ $.Values.component }}
23-
app.kubernetes.io/part-of: {{ $.Values.partOf }}
24-
app.kubernetes.io/name: {{ $.Values.name }}
25-
app.kubernetes.io/instance: {{ $.Values.enclosingRun }}
17+
{{- include "labels" $ | indent 4 }}
2618
{{- end }}
2719
{{- end }}
2820
{{- end }}

pkg/fe/transformer/api/shell/lower.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ func LowerAsComponent(compilationName, runname, namespace string, app hlir.Appli
8484
values := []string{
8585
"lunchpail.instanceName=" + instanceName,
8686
"component=" + string(component),
87-
"enclosingRun=" + runname,
8887
"image=" + app.Spec.Image,
8988
"command=" + app.Spec.Command,
9089
"workers.count=" + strconv.Itoa(sizing.Workers),

0 commit comments

Comments
 (0)