Skip to content

Commit

Permalink
add support for using nodeport in kratos and kratos-selfservice-ui-no…
Browse files Browse the repository at this point in the history
…de charts (#662)
  • Loading branch information
leodotcloud authored Jan 15, 2024
1 parent 17665dd commit 5c7dff5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helm/charts/kratos-selfservice-ui-node/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ spec:
targetPort: http
protocol: TCP
name: {{ .Values.service.name }}
{{- if eq .Values.service.type "NodePort" }}
{{- with .Values.service.nodePort }}
nodePort: {{ . }}
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "kratos-selfservice-ui-node.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
1 change: 1 addition & 0 deletions helm/charts/kratos-selfservice-ui-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ service:
type: ClusterIP
# -- The load balancer IP
loadBalancerIP: ""
nodePort: ""
port: 80
# -- The service port name. Useful to set a custom service port name if it must follow a scheme (e.g. Istio)
name: http
Expand Down
5 changes: 5 additions & 0 deletions helm/charts/kratos/templates/service-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ spec:
targetPort: http-admin
protocol: TCP
name: {{ .Values.service.admin.name }}
{{- if eq .Values.service.admin.type "NodePort" }}
{{- with .Values.service.admin.nodePort }}
nodePort: {{ . }}
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "kratos.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
Expand Down
5 changes: 5 additions & 0 deletions helm/charts/kratos/templates/service-public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ spec:
targetPort: http-public
protocol: TCP
name: {{ .Values.service.public.name }}
{{- if eq .Values.service.public.type "NodePort" }}
{{- with .Values.service.public.nodePort }}
nodePort: {{ . }}
{{- end }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "kratos.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/kratos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ service:
type: ClusterIP
# -- Load balancer IP
loadBalancerIP: ""
nodePort: ""
port: 80
# -- The service port name. Useful to set a custom service port name if it must follow a scheme (e.g. Istio)
name: http
Expand All @@ -47,6 +48,7 @@ service:
type: ClusterIP
# -- Load balancer IP
loadBalancerIP: ""
nodePort: ""
port: 80
# -- The service port name. Useful to set a custom service port name if it must follow a scheme (e.g. Istio)
name: http
Expand Down

0 comments on commit 5c7dff5

Please sign in to comment.