Skip to content

Chart: Add option to run webhook in hostNetwork - #3113

Merged
jetstack-bot merged 4 commits into
cert-manager:masterfrom
jfrancisco0:master
Jul 29, 2020
Merged

jetstack-bot merged 4 commits into
cert-manager:masterfrom
jfrancisco0:master

Conversation

@jfrancisco0

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
When using AWS EKS with a third party CNI (such as Weave or Calico), cert-manager cannot reach the webhook. Running the webhook on the host network solves this issue.
Used the comment from https://github.com/helm/charts/blob/master/stable/prometheus-operator/values.yaml#L1294 in the values.yaml.

Which issue this PR fixes:
Fixes some occurrences of issue #2109, such as #2109 (comment).

Release note:

Add `webhook.hostNetwork` option to the Helm Chart to run the webhook in hostNetwork mode

/kind feature

@jetstack-bot jetstack-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Jul 23, 2020
@jetstack-bot
jetstack-bot requested a review from munnerz July 23, 2020 11:07
@jetstack-bot jetstack-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 23, 2020
@jetstack-bot

Copy link
Copy Markdown
Contributor

Hi @jfrancisco0. Thanks for your PR.

I'm waiting for a jetstack or cert-manager 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.

Details

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.

@jetstack-bot jetstack-bot added the area/deploy Indicates a PR modifies deployment configuration label Jul 23, 2020
@jfrancisco0

Copy link
Copy Markdown
Contributor Author

/assign @munnerz

@urmet

urmet commented Jul 24, 2020

Copy link
Copy Markdown

default webhook port should be changed as well, because it will conflict with kubelet

@jfrancisco0

Copy link
Copy Markdown
Contributor Author

default webhook port should be changed as well, because it will conflict with kubelet

You're right, I have it running in my cluster by setting webhook.securePort as 10251. I saw the comment for that flag

  # The port that the webhook should listen on for requests.
  # In GKE private clusters, by default kubernetes apiservers are allowed to
  # talk to the cluster nodes only on 443 and 10250. so configuring
  # securePort: 10250, will work out of the box without needing to add firewall
  # rules or requiring NET_BIND_SERVICE capabilities to bind port numbers <1000

And I didn't want to break anyone's deployment. I may, however, add a comment to webhook.hostNetwork to note the securePort must be changed if it's enabled. Since I think this is mostly a EKS issue, because you can't change the CNI on the control plane nodes, people who need to enable host network won't have issues changing the port.

Does this sound good to you?

@jfrancisco0

Copy link
Copy Markdown
Contributor Author

Added a comment to the hostNetwork option, regarding the need to change port.
While it's running well in my cluster, I think port 10251 may be used by kube-scheduler, so I made the comment generic.

What do you think?

@urmet

urmet commented Jul 25, 2020

Copy link
Copy Markdown

Didn't know that about GKE private clusters. Makes sense to keep it working where it already works, so the comment will have to do.

Comment thread deploy/charts/cert-manager/values.yaml Resolved
@meyskens

meyskens commented Jul 27, 2020 •

Copy link
Copy Markdown
Contributor

Thank you for this!
We should not change the port by default, if you can set 1 variable for your network to work you can sure set 2 😄
Just one tiny suggestion then it is good to go!

This will probably land in v1.0, so would you mind making a PR at https://github.com/cert-manager/website/ to the release-next branch to document this it will help a lot of users!

@jetstack-bot jetstack-bot added dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Jul 29, 2020
@jfrancisco0

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @meyskens!
Opened the PR as suggested at cert-manager/website#268 and changed the wording as suggested.

@jfrancisco0
jfrancisco0 requested a review from meyskens July 29, 2020 03:19
@meyskens

Copy link
Copy Markdown
Contributor

Looks great! Thanks for this!
We plan to cut an alpha of v1.0 very early so you can use it soon!

/lgtm
/approve
/ok-to-test

@jetstack-bot jetstack-bot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 29, 2020
@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 29, 2020
@jetstack-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jfrancisco0, meyskens

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

The pull request process is described here

Details 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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 29, 2020
@jetstack-bot
jetstack-bot merged commit 44a6a35 into cert-manager:master Jul 29, 2020
@jetstack-bot jetstack-bot added this to the v1.0 milestone Jul 29, 2020
@snapfast

snapfast commented Feb 3, 2021

Copy link
Copy Markdown

securePort should be changed to something that works out-of-the-box

@urmet

urmet commented Feb 3, 2021 •

Copy link
Copy Markdown

If I remember correctly, the current value is explicitly chosen because it works out of the box on GKE. Optimising for the minority of EKS users using custom overlay networks would make not work for more people than it would help.

edit:
reasoning is documented in chart values file https://github.com/jetstack/cert-manager/blob/master/deploy/charts/cert-manager/values.yaml#L284-L289

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/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

6 participants