Expose ability to configure GitLab Shells' Service with a specified nodePort when type: NodePort
The following discussion from !629 (closed) should be addressed:
-
@dm3ch started a discussion: (+1 comment) I have just understood that this change is located in ingress controller subchart.
But I think such functionality (ability to expose nodePort) would be also useful for installations without ingress controller or external ingress controller.
So i think https://gitlab.com/gitlab-org/charts/gitlab/blob/master/charts/gitlab/charts/gitlab-shell/templates/service.yaml would be a better place for such thing.
@WarheadsSE @gdoucet What do you think about this?
Currently, the gitlab/gitlab-shell chart has the ability to set service.type: NodePort
, but does not expose service.nodePort
as a way to explicitly choose the port vs allowing random allocation.
We should be able to do the following:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ include "gitlab.shell.port" . | int }}
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
name: ssh
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort | int64 }}
{{- end }}
cc @dm3ch