Skip to content

feat: add support for NodePort service type in Helm chart #8993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting & make update-golden-files
  • Loading branch information
ericpaulsen committed Aug 9, 2023
commit a78f88ed0211551216f7427f533c370249915607
8 changes: 6 additions & 2 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ spec:
port: 80
targetPort: "http"
protocol: TCP
{{ if eq .Values.coder.service.type "NodePort" }}nodePort: {{ .Values.coder.service.httpNodePort }}{{ end }}
{{ if eq .Values.coder.service.type "NodePort" }}
nodePort: {{ .Values.coder.service.httpNodePort }}
{{ end }}
{{- if eq (include "coder.tlsEnabled" .) "true" }}
- name: "https"
port: 443
targetPort: "https"
protocol: TCP
{{ if eq .Values.coder.service.type "NodePort" }}nodePort: {{ .Values.coder.service.httpsNodePort }}{{ end }}
{{ if eq .Values.coder.service.type "NodePort" }}
nodePort: {{ .Values.coder.service.httpsNodePort }}
{{ end }}
{{- end }}
{{- if eq "LoadBalancer" .Values.coder.service.type }}
{{- with .Values.coder.service.loadBalancerIP }}
Expand Down
1 change: 1 addition & 0 deletions helm/tests/testdata/command.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
1 change: 1 addition & 0 deletions helm/tests/testdata/command_args.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
1 change: 1 addition & 0 deletions helm/tests/testdata/default_values.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
1 change: 1 addition & 0 deletions helm/tests/testdata/labels_annotations.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
1 change: 1 addition & 0 deletions helm/tests/testdata/sa.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
2 changes: 2 additions & 0 deletions helm/tests/testdata/tls.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

- name: "https"
port: 443
targetPort: "https"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
1 change: 1 addition & 0 deletions helm/tests/testdata/workspace_proxy.golden
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
port: 80
targetPort: "http"
protocol: TCP

externalTrafficPolicy: "Cluster"
selector:
app.kubernetes.io/name: coder
Expand Down
8 changes: 4 additions & 4 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ coder:
# coder.service.annotations -- The service annotations. See:
# https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
annotations: {}
# coder.service.httpNodePort -- Must be set if coder.service.type is set to NodePort. If not set by default and for convenience,
# the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
# coder.service.httpNodePort -- Enabled if coder.service.type is set to NodePort.
# If not set, Kubernetes will allocate a port from the default range, 30000-32767.
httpNodePort: ""
# coder.service.httpsNodePort -- Must be set if coder.service.type is set to NodePort. If not set by default and for convenience,
# the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
# coder.service.httpsNodePort -- Enabled if coder.service.type is set to NodePort.
# If not set, Kubernetes will allocate a port from the default range, 30000-32767.
httpsNodePort: ""

# coder.ingress -- The Ingress object to expose for Coder.
Expand Down