diff --git a/helm/charts/kratos-selfservice-ui-node/templates/service.yaml b/helm/charts/kratos-selfservice-ui-node/templates/service.yaml index d7169f985e..7d4eb371aa 100644 --- a/helm/charts/kratos-selfservice-ui-node/templates/service.yaml +++ b/helm/charts/kratos-selfservice-ui-node/templates/service.yaml @@ -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 }} diff --git a/helm/charts/kratos-selfservice-ui-node/values.yaml b/helm/charts/kratos-selfservice-ui-node/values.yaml index bb5eec8baa..690a2d7595 100644 --- a/helm/charts/kratos-selfservice-ui-node/values.yaml +++ b/helm/charts/kratos-selfservice-ui-node/values.yaml @@ -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 diff --git a/helm/charts/kratos/templates/service-admin.yaml b/helm/charts/kratos/templates/service-admin.yaml index 9838e6c204..e69174e40a 100644 --- a/helm/charts/kratos/templates/service-admin.yaml +++ b/helm/charts/kratos/templates/service-admin.yaml @@ -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 }} diff --git a/helm/charts/kratos/templates/service-public.yaml b/helm/charts/kratos/templates/service-public.yaml index 2895e5a078..26abb5d844 100644 --- a/helm/charts/kratos/templates/service-public.yaml +++ b/helm/charts/kratos/templates/service-public.yaml @@ -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 }} diff --git a/helm/charts/kratos/values.yaml b/helm/charts/kratos/values.yaml index 899416eed8..92c56bf078 100644 --- a/helm/charts/kratos/values.yaml +++ b/helm/charts/kratos/values.yaml @@ -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 @@ -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