Skip to content

Commit 8140b0e

Browse files
committed
refactor: change names and fix LB/Ingress bug in service.yaml
1 parent 72c4d69 commit 8140b0e

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

templates/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
backend:
5050
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
5151
service:
52-
name: {{ $fullName }}-headless
52+
name: {{ $fullName }}
5353
port:
5454
number: {{ $svcPort }}
5555
{{- else }}
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1+
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.ingress.enabled) }}
12
apiVersion: v1
23
kind: Service
34
metadata:
4-
name: {{ include "emby.fullname" . }}-headless
5+
name: {{ include "emby.fullname" . }}-LB
56
labels:
67
{{- include "emby.labels" . | nindent 4 }}
78
spec:
8-
{{- if eq .Values.service.type "LoadBalancer" }}
9-
type: ClusterIP
10-
{{- else }}
11-
type: {{ .Values.service.type }}
12-
{{- end }}
9+
type: LoadBalancer
1310
ports:
1411
- port: {{ .Values.service.port }}
1512
targetPort: http
1613
protocol: TCP
1714
name: http
1815
selector:
1916
{{- include "emby.selectorLabels" . | nindent 4 }}
17+
{{- end }}

templates/service.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.ingress.enabled) }}
21
apiVersion: v1
32
kind: Service
43
metadata:
54
name: {{ include "emby.fullname" . }}
65
labels:
76
{{- include "emby.labels" . | nindent 4 }}
87
spec:
9-
type: LoadBalancer
8+
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.ingress.enabled) }}
9+
type: ClusterIP
10+
{{- else }}
11+
type: {{ .Values.service.type }}
12+
{{- end }}
1013
ports:
1114
- port: {{ .Values.service.port }}
1215
targetPort: http
1316
protocol: TCP
1417
name: http
1518
selector:
1619
{{- include "emby.selectorLabels" . | nindent 4 }}
17-
{{- end }}

0 commit comments

Comments
 (0)