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

[helm] Support custom port configuration for internal service #9846

Merged

Conversation

jkroepke
Copy link
Contributor

@jkroepke jkroepke commented Apr 11, 2023

What this PR does / why we need it:

I have to implement Azure Private Link service on my setup. I have to support proxy_protocol in additional to the normal listeners to gain the client ip addresses from the Private Link Services. All my ingress services should be exposed through the public and the internal loadbalancer (which will be exposed to customers through Private Link Services). Setup a 2nd ingress controller and duplicate all ingress objects feel like unnecessary overhead. I'm currently trying to handle both if one ingress-nginx installation.

At least I could archive a working configuration:

defaultBackend:
  enabled: true

controller:
  containerPort:
    http: 80
    https: 443
    http-proxy: 5080
    https-proxy: 5443
  config:
    use-proxy-protocol: false
    http-snippet: |
      server {
        server_name _ ;

        listen 5080 default_server reuseport backlog=4096;
        listen 5443 default_server reuseport backlog=4096 ssl http2;
      
        deny all;
      }
    server-snippet: |
      listen 5080;
      listen 5443 ssl http2;
      real_ip_header proxy_protocol;
  service:
    type: ClusterIP
    external:
      enabled: true
    internal:
      enabled: true
      annotations:
        service.beta.kubernetes.io/azure-load-balancer-internal: "true"
        service.beta.kubernetes.io/azure-pls-create: "true"
        service.beta.kubernetes.io/azure-pls-proxy-protocol: "true"
      # needs to be implemented
      targetPorts:
        http: http-proxy
        https: https-proxy

At the moment, the internal and external service maps the the same port. In my use case, I would like to remap the http port of the internal service to 5080.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • CVE Report (Scanner found CVE and adding report)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

Which issue/s this PR fixes

How Has This Been Tested?

Minikube, lokal developement and curl

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.
  • Added Release Notes.

Does my pull request need a release note?

Any user-visible or operator-visible change qualifies for a release note. This could be a:

  • CLI change
  • API change
  • UI change
  • configuration schema change
  • behavioral change
  • change in non-functional attributes such as efficiency or availability, availability of a new platform
  • a warning about a deprecation
  • fix of a previous Known Issue
  • fix of a vulnerability (CVE)

No release notes are required for changes to the following:

  • Tests
  • Build infrastructure
  • Fixes for unreleased bugs

For more tips on writing good release notes, check out the Release Notes Handbook

[helm] Support custom port configuration for internal service

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 11, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Apr 11, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @jkroepke. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-priority size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 11, 2023
@k8s-ci-robot k8s-ci-robot added the area/helm Issues or PRs related to helm charts label Apr 11, 2023
@k8s-ci-robot k8s-ci-robot requested a review from cpanato April 11, 2023 18:59
@jkroepke jkroepke force-pushed the internal-service-port-mapping branch from f29db33 to 89b6370 Compare April 11, 2023 21:16
Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 13, 2023
@jkroepke
Copy link
Contributor Author

Hey, is there anything where I could help here to push forward this PR?

@jkroepke jkroepke requested a review from tao12345666333 April 23, 2023 13:39
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold to check with @strongjz if need to update the chart version or any other thing

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2023
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 25, 2023
@strongjz
Copy link
Member

new tests, docs, and CI is passing

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, jkroepke, strongjz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jkroepke jkroepke requested a review from cpanato April 27, 2023 09:56
@cpanato
Copy link
Member

cpanato commented May 1, 2023

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 1, 2023
@k8s-ci-robot k8s-ci-robot merged commit d8f5442 into kubernetes:main May 1, 2023
@jkroepke jkroepke deleted the internal-service-port-mapping branch May 1, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/helm Issues or PRs related to helm charts cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants