-
Notifications
You must be signed in to change notification settings - Fork 874
feat(helm): add support for nodePort specification in LoadBalancer services helm chart #16032
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
Conversation
…on for LoadBalancer services, expanding coder#8993 work
… changes for nodeport values use cases
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Hi, @MRColorR, you also need to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a corresponding helm test for the new loadbalancer type.
hello, thank you for the help. i've done it in my code devcontainer but i see no new files in git status. |
could you please elaborate more ? i've see there's an already existing |
@MRColorR Sure thing! As I see it, there are three paths we need to consider:
Based on that, I think we need to:
Tip: you can run Hope that helps! |
ok , i was already working on a test file sorry for the overlap. now i'll add the case you've mentioned. |
I've added the test cases as requested. Please let me know if there's anything else I should do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual testing:
Ran kubectl apply
on following files in a temporary namespace:
default_values.golden
applied successfully:
NAME READY STATUS RESTARTS AGE
pod/coder-7cc8f95b66-d2gcs 0/1 Running 0 3s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/coder LoadBalancer 10.101.182.44 192.168.1.34 80:31198/TCP 3s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/coder 0/1 1 0 3s
NAME DESIRED CURRENT READY AGE
replicaset.apps/coder-7cc8f95b66 1 1 0 3s
svc_loadbalancer.golden
applied successfully:
NAME READY STATUS RESTARTS AGE
pod/coder-7cc8f95b66-wtw9j 0/1 Running 0 5s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/coder LoadBalancer 10.104.167.126 192.168.1.34 80:30080/TCP 5s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/coder 0/1 1 0 5s
NAME DESIRED CURRENT READY AGE
replicaset.apps/coder-7cc8f95b66 1 1 0 5s
svc_loadbalancer_class.golden
applied successfully:
NAME READY STATUS RESTARTS AGE
pod/coder-7cc8f95b66-tq5ht 0/1 Running 0 3s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/coder LoadBalancer 10.99.184.182 <pending> 80:32053/TCP 3s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/coder 0/1 1 0 3s
NAME DESIRED CURRENT READY AGE
replicaset.apps/coder-7cc8f95b66 1 1 0 3s
svc_nodeport.golden
applied successfully:
NAME READY STATUS RESTARTS AGE
pod/coder-7cc8f95b66-fnlg6 0/1 Running 0 6s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/coder NodePort 10.111.126.236 <none> 80:30080/TCP 6s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/coder 0/1 1 0 6s
NAME DESIRED CURRENT READY AGE
replicaset.apps/coder-7cc8f95b66 1 1 0 6s
@ericpaulsen OK to merge? |
@johnstcn LGTM - pressing the big green button. |
Short description:
This pull request introduces support for optionally specify
nodePort
values when usingLoadBalancer
service type in the Coder Helm chart. This enhancement addresses a limitation wherehttpNodePort
andhttpsNodePort
values were previously ignored forLoadBalancer
services. This PR should expand the service customization options without disrupting existing configurations.Why this is Useful
In some enterprise environments, applications may be required to use specific ports for compliance with organizational policies or cloud infrastructure requirements. For instance:
Since LoadBalancer in Kubernetes operates on top of nodePort, this feature is useful for enabling enterprises to adhere to such policies if they whish.
What Was Changed
Regarding backward compatibility:
If nodePort is not specified, Kubernetes dynamically assigns a port, maintaining the current behavior.
Testing Performed
Additional Notes