Skip to content

Commit e930d7a

Browse files
committed
Add ClusterIP support | generic 1.9.1
1 parent 39c1328 commit e930d7a

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

charts/generic/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v2
22
name: generic
33
description: Generic Chart
4-
version: 1.9.0
4+
version: 1.9.1

charts/generic/templates/services.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,28 @@ metadata:
1717
{{- end }}
1818
spec:
1919
type: {{ $service.type }}
20+
{{- if $service.clusterIP }}
21+
clusterIP: {{ $service.clusterIP }}
22+
{{- end }}
2023
{{- if $service.externalName }}
2124
externalName: {{ $service.externalName }}
2225
{{- end }}
26+
{{- if $service.ports }}
2327
ports:
2428
{{- range $port := $service.ports }}
2529
- port: {{ $port.port }}
2630
targetPort: {{ $port.targetPort | default $port.port }}
2731
{{- if $port.name }}
2832
name: {{ $port.name }}
2933
{{- end }}
34+
{{- if $port.protocol }}
35+
protocol: {{ $port.protocol }}
36+
{{- end }}
3037
{{- end }}
38+
{{- end }}
39+
{{- if ne $service.type "ExternalName" }}
3140
selector: {{ $selectorLabels | nindent 4 }}
41+
{{- end }}
3242
---
3343
{{- end }}
3444
{{- end }}

charts/generic/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,12 @@ serviceAccount:
190190
# default:
191191
# # fullName:
192192
# type: ClusterIP
193+
# # clusterIP: None # Set to "None" for headless service, or a specific IP
193194
# ports:
194195
# - port: 80
195196
# # targetPort: 80
197+
# # name: http
198+
# # protocol: TCP
196199

197200
# ingresses:
198201
# - name: app

0 commit comments

Comments
 (0)