Skip to content
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

Allow to specify a node port #181

Open
qdii opened this issue Jul 12, 2023 · 5 comments
Open

Allow to specify a node port #181

qdii opened this issue Jul 12, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@qdii
Copy link

qdii commented Jul 12, 2023

Use Case

On bare metal installations of Kubernetes, it is often useful to set up services of type NodePort to make a node's port available for the service.

Currently, the helm chart allow to change the type of the service, but note to specify a nodePort, which results in this port to be randomly allocated. Worse, the port isn't stable through upgrades of the charts.

Describe the Solution You Would Like

An additional nodePort field should be available in the chart.

Describe Alternatives You've Considered

TLS passthrough via Ingress may be a workaround.

Additional Context

None

@qdii qdii added the enhancement New feature or request label Jul 12, 2023
@ldaneliukas
Copy link
Collaborator

ldaneliukas commented Nov 17, 2023

Hey!

Does the following not meet your needs:

puppetserver:
  masters:
    service:
      type: NodePort
      ports:
        puppetserver:
          port: 8140
          nodePort: 18140
          protocol: TCP

Results in:

NAME                         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)
puppetserver-puppet          NodePort    10.252.178.61    <none>        8140:18140/TCP

@qdii
Copy link
Author

qdii commented Nov 17, 2023

That sounds perfect!

@qdii qdii closed this as completed Nov 17, 2023
@qdii qdii reopened this Nov 17, 2023
@ldaneliukas
Copy link
Collaborator

@qdii you seem to have re-opened this, can it be closed?

@qdii
Copy link
Author

qdii commented Nov 24, 2023

I think it can, however just a question: I can see that in templates/puppetserver-service-masters:

apiVersion: v1
kind: Service
metadata:
  ...
spec:
  ports:
    ...
  selector:
    ...
{{- if .Values.puppetserver.compilers.enabled }}
  type: ClusterIP
{{- else }}
  type: {{ .Values.puppetserver.masters.service.type }}
  {{- if (and (eq .Values.puppetserver.masters.service.type "LoadBalancer") (not (empty .Values.puppetserver.masters.service.loadBalancerIP))) }}
  loadBalancerIP: {{ .Values.puppetserver.masters.service.loadBalancerIP }}
  {{- end }}
{{- end }}

Does this mean that if compilers.enable = True, then it is not possible to define the service as a NodePort? (and is there a limitation why?)

@davidphay
Copy link
Collaborator

Yes it's correct.
for now you have to use a reverse proxy like traefik or nginx.

I guess we should update this parts to be able to update this field with a variable.

Feel free to fix the issue with a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants