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

Add loadBalancerSourceRanges to helm parameters #2773

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

salonichf5
Copy link
Contributor

@salonichf5 salonichf5 commented Nov 14, 2024

Proposed changes

Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:

Problem: Users need a way to provide the loadBalancerSourceRanges to restrict IPs that can access the load balancer.

Solution: Added a helm parameter to specify loadBalancerSourceRanges during helm install/upgrade

Testing: Manual testing by adding loadBalancerSourceRanges in values.yaml file and doing a helm install. Verified the service specifications for changes to be reflected correctly.

k get svc -n nginx-gateway ngf-nginx-gateway-fabric -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: ngf
    meta.helm.sh/release-namespace: nginx-gateway
  creationTimestamp: "2024-11-14T21:43:25Z"
  labels:
    app.kubernetes.io/instance: ngf
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: nginx-gateway-fabric
    app.kubernetes.io/version: edge
    helm.sh/chart: nginx-gateway-fabric-1.4.0
  name: ngf-nginx-gateway-fabric
  namespace: nginx-gateway
  resourceVersion: "8048"
  uid: ad7e9b3e-4421-4e74-8487-c93aed59561f
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 10.96.145.154
  clusterIPs:
  - 10.96.145.154
  externalTrafficPolicy: Local
  healthCheckNodePort: 30737
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  loadBalancerSourceRanges:
  - 192.168.0.0/24
  - 10.0.0.0/16
  ports:

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.

Closes #1865

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

Adds `loadBalancerSourceRanges` as a helm parameter to be configured during install/upgrade.

@salonichf5 salonichf5 requested a review from a team as a code owner November 14, 2024 20:46
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request helm-chart Relates to helm chart labels Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.40%. Comparing base (e7d217a) to head (c89255b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2773   +/-   ##
=======================================
  Coverage   89.40%   89.40%           
=======================================
  Files         110      110           
  Lines       10913    10913           
  Branches       50       50           
=======================================
  Hits         9757     9757           
  Misses       1098     1098           
  Partials       58       58           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sjberman sjberman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to link the issue in the PR description.

charts/nginx-gateway-fabric/templates/service.yaml Outdated Show resolved Hide resolved
@salonichf5 salonichf5 enabled auto-merge (squash) November 15, 2024 18:21
@salonichf5 salonichf5 merged commit 1f60f9e into nginx:main Nov 15, 2024
47 checks passed
@sjberman sjberman removed the enhancement New feature or request label Nov 15, 2024
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
Add loadBalancerSourceRanges to helm parameters

Problem: Users need a way to provide the loadBalancerSourceRanges to restrict IPs that can access the load balancer.

Solution: Added a helm parameter to specify loadBalancerSourceRanges during helm install/upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation helm-chart Relates to helm chart release-notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add loadBalancerSourceRanges to Helm Chart for Enhanced IP Allowlisting Support
3 participants