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

Nginx custom ports #581

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Conversation

ameijer-corsha
Copy link
Contributor

Proposed changes

Addresses #580

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 master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@pleshakov pleshakov added the enhancement Pull requests for new features/feature enhancements label Jun 3, 2019
@pleshakov
Copy link
Contributor

@ameijer-corsha thanks for the PR! we will review it shortly

Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

@ameijer-corsha

Sorry for the delay in reviewing!

Currently, the controller.service.httpPort.* and controller.service.httpsPort.* parameters configure the ports of the service but don't configure the ports of the Ingress Controller deployment/deamonset. However, the proposed controller.service.customPorts parameter configures both service and deployment/deamonset ports. This is inconsistent.

What do you think about the following proposal, illustrated by an excerpt from a values file?

controller:

  . . .

  customPorts:
  - name: dns
    containerPort: 53

  . . . 

  service:

  . . .

    customPorts:
    - port: 53
      targetPort: 53
      protocol: UDP
      name: dns
 

Here we have independent customPorts - for deployment/daemonset and for the service.

I understand that this will lead to some duplication in the values file when configuring the ports. However, this will be consistent with the existing parameters and also allow some flexibility. For example, if a user wants to expose container ports but doesn't want to expose them through the service.

Please also see some comments regarding the current implementation.

deployments/helm-chart/README.md Outdated Show resolved Hide resolved
@@ -157,6 +157,9 @@ controller:
## The HTTPS port on the POD where the Ingress controller service is running.
targetPort: 443

## yaml definition of custom ports to expose in the service
Copy link
Contributor

Choose a reason for hiding this comment

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

the doc should match the doc string in the table in the README.

@@ -157,6 +157,9 @@ controller:
## The HTTPS port on the POD where the Ingress controller service is running.
targetPort: 443

## yaml definition of custom ports to expose in the service
customPorts: {}
Copy link
Contributor

Choose a reason for hiding this comment

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

customPorts is an array - []

@ameijer-corsha
Copy link
Contributor Author

@pleshakov Thank you for the review! I believe I have addressed all your concerns. I rendered this a few times, all looks good. Could you review again when you have the chance? much appreciated...

@pleshakov
Copy link
Contributor

@ameijer-corsha thx! looks good!
could you possible squash your commits? we will merge once it is done

@pleshakov
Copy link
Contributor

@ameijer-corsha could you possibly change the commit message to "Support custom ports in helm chart"? In the message body, you can add "Closes #580", which will close the issue once the commit is merged. Please see our git style guide https://github.com/nginxinc/kubernetes-ingress/blob/master/CONTRIBUTING.md#git-style-guide

We're trying to keep the commit history consistent https://github.com/nginxinc/kubernetes-ingress/commits/master Thanks for understanding!

closes nginxinc#580

dox

Update deployments/helm-chart/README.md

Co-Authored-By: Michael Pleshakov <pleshakov@users.noreply.github.com>

address code review feedback, allow different ports for each tier

fix indenting of container ports
@pleshakov pleshakov merged commit c4ac76b into nginxinc:master Jun 6, 2019
@pleshakov
Copy link
Contributor

@ameijer-corsha thanks!

@ameijer-corsha
Copy link
Contributor Author

@pleshakov is there a roadmap for when this feature will make it into the stable chart? we are trying to plan our prod deployment

@ameijer-corsha ameijer-corsha deleted the nginx-custom-ports branch December 1, 2019 16:14
@pleshakov
Copy link
Contributor

@ameijer-corsha
Next major release 1.6.0 is planned for the week of Dec 16th. It will include all the features that were added to the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants