Skip to content

Commit

Permalink
Merge pull request #97 from shoplineapp/feature/support-custom-servic…
Browse files Browse the repository at this point in the history
…e-clusterIP

Support custom service clusterIP
  • Loading branch information
ParinLL authored Feb 7, 2023
2 parents 5f18459 + 734d236 commit 354c1c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion simple/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
description: Helm chart with simple deployment/service template
name: simple
version: 0.12.0
version: 0.13.0
appVersion: 0.0.1
tillerVersion: ">=2.14.3"
3 changes: 3 additions & 0 deletions simple/templates/_service_multiple.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
protocol: {{ .protocol | default "TCP" }}
{{- end}}
type: {{ $ref.type | default "ClusterIP" }}
{{- if hasKey $ref "clusterIP" }}
clusterIP: {{ $ref.clusterIP }}
{{- end }}
selector:
app: {{ $ref.selector.app | default $service_name }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions simple/templates/_service_single.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
protocol: {{ .protocol | default "TCP" }}
{{- end }}
type: {{ .Values.service.type }}
{{- if hasKey .Values.service "clusterIP" }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
selector:
app: {{ .Values.name }}
{{- end }}
Expand All @@ -31,6 +34,9 @@ spec:
protocol: {{ .protocol | default "TCP" }}
{{- end}}
type: ClusterIP
{{- if hasKey .Values.service "clusterIP" }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
selector:
app: {{ .Values.name }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions simple/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ EnableMutilpleIngress: false
# port: 80
# target: 5000
# type: ClusterIP
# clusterIP: 10.100.0.0
# selector:
# app: python-operator

Expand All @@ -117,6 +118,7 @@ EnableMutilpleIngress: false
# - name: "svc"
# port: 8080
# type: ClusterIP
# clusterIP: 10.100.0.0
# selector:
# app: svc
# service-2: # service name
Expand Down

0 comments on commit 354c1c0

Please sign in to comment.