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] configure allow to configure hostAliases #10180

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

jkroepke
Copy link
Contributor

@jkroepke jkroepke commented Jul 5, 2023

What this PR does / why we need it:

This PR allows to configure the hostAliases property for an pod.

The hostAliases property allows to add hostname to the /etc/hosts.

I would like to use this in combination with nginx.ingress.kubernetes.io/auth-url: "https://$host/api/auth/keys".

By default, ingress-nginx it call a URL on the same domain. Since the domain points to an external DNS, ingress-nginx do create an ingress over Internet Gateway, back to the Public LB and passed again to the same ingress-nginx instance.

To avoid the loop, I would like to put some domains into the hostAlias property to overwrite the DNS entry with 127.0.0.1

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?

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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 5, 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-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 Jul 5, 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.

@netlify
Copy link

netlify bot commented Jul 5, 2023

Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit 5c3ec31
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/64a5d7250b06ff0008d608b9

@k8s-ci-robot k8s-ci-robot added needs-priority size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 5, 2023
@k8s-ci-robot k8s-ci-robot added the area/helm Issues or PRs related to helm charts label Jul 5, 2023
@jkroepke jkroepke marked this pull request as ready for review July 5, 2023 20:49
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 5, 2023
@rikatz
Copy link
Contributor

rikatz commented Jul 6, 2023

/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 Jul 6, 2023
@jkroepke
Copy link
Contributor Author

@rikatz this is okay and we can continue the process here?

@jkroepke jkroepke closed this Jul 20, 2023
@jkroepke jkroepke reopened this Jul 20, 2023
@jkroepke
Copy link
Contributor Author

@rikatz Could you take a look here?

I have misclicked and re-open this PR.

@jkroepke
Copy link
Contributor Author

@rikatz I would appreciate a review here.

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.

/lgtm

thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 28, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkroepke, tao12345666333

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2023
@k8s-ci-robot k8s-ci-robot merged commit afd1311 into kubernetes:main Jul 28, 2023
60 checks passed
@jkroepke jkroepke deleted the hostAliases branch July 28, 2023 12:02
@Gacko
Copy link
Member

Gacko commented Jul 31, 2023

And again... missing in DaemonSet. Would be nice to take more care about implementing such changes in both, the Deployment and the DaemonSet. :)

@jkroepke
Copy link
Contributor Author

it would be really nice if deployment and daemonset could share the same pod template ... like on the grafana chart to prevent this...

@Gacko
Copy link
Member

Gacko commented Jul 31, 2023

Yes, probably. Actually this was less of a criticism and rather a possible improvement for the review. It's basically the same for the controller-service.yaml and controller-service-internal.yaml. I still have a PR open for aligning Deployment with DaemonSet and both services.

Gacko added a commit to giantswarm/ingress-nginx-upstream that referenced this pull request Aug 1, 2023
[helm] configure allow to configure hostAliases (kubernetes#10180)
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants