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

Make hostNetwork configurable for daemonset #1716

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

bseenu
Copy link
Contributor

@bseenu bseenu commented Aug 11, 2023

Is this a bug fix or adding new feature?

bug fix

What is this PR about? / Why do we need it?

we want to run the daemonsets in host network, and want to make that configurable

What testing is done?

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 11, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

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

Welcome @bseenu!

It looks like this is your first PR to kubernetes-sigs/aws-ebs-csi-driver 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/aws-ebs-csi-driver has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 11, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @bseenu. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 requested review from gtxu and torredil August 11, 2023 22:25
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 11, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 11, 2023
@diranged
Copy link

Yes please - can we help get this pushed across the line?

@ConnorJC3
Copy link
Contributor

/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 Aug 14, 2023
@ConnorJC3
Copy link
Contributor

ConnorJC3 commented Aug 14, 2023

Hi @bseenu - a few things:

First, is there a particular reason you want to run the driver in host network mode? This is a potentially footgun-ish feature, so I'm hesitant to expose it to users without a good reason.

Second, please remove the modifications to CHANGELOG.md and Chart.yaml. We generally do not accept PRs that add a feature and perform a release at the same time - releases are performed by our maintainers on a semi-regular schedule and take into account details such as backwards compatibility and support policies.

Third, you seem to have some minor test failures, please fix those (the Windows test is a known flake and is marked as optional, so you can ignore it, but the other test failures are likely legitimate).

@bseenu
Copy link
Contributor Author

bseenu commented Aug 14, 2023

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 16, 2023
@diranged
Copy link

First, is there a particular reason you want to run the driver in host network mode? This is a potentially footgun-ish feature, so I'm hesitant to expose it to users without a good reason.

@ConnorJC3,
I would put this the other way around ... Is there a particular reason why we shouldn't be able to use hostNetwork: true here? This is following the pattern of the aws-efs-csi-driver https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/helm-chart-aws-efs-csi-driver-2.4.1/charts/aws-efs-csi-driver/templates/node-daemonset.yaml#L56. Sadly the aws-efs-csi-driver chart was updated without much explanation to remove this setting (kubernetes-sigs/aws-efs-csi-driver#910 (comment)) ... I have commented and am asking for clarity going forward.

Fundamentally DaemonSets not using hostNetwork have a few problems... not the least of which is the waste of IP space on large clusters (1000+ nodes). There are other issues like the fact that these pods can come up and fail if the CNI isn't ready yet (hint: IP/CIDR exhaustion), and that just causes more pods to be stuck in ContainerCreating for no good reason.

@jacobwolfaws
Copy link
Contributor

First, is there a particular reason you want to run the driver in host network mode? This is a potentially footgun-ish feature, so I'm hesitant to expose it to users without a good reason.

@ConnorJC3, I would put this the other way around ... Is there a particular reason why we shouldn't be able to use hostNetwork: true here? This is following the pattern of the aws-efs-csi-driver https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/helm-chart-aws-efs-csi-driver-2.4.1/charts/aws-efs-csi-driver/templates/node-daemonset.yaml#L56. Sadly the aws-efs-csi-driver chart was updated without much explanation to remove this setting (kubernetes-sigs/aws-efs-csi-driver#910 (comment)) ... I have commented and am asking for clarity going forward.

Fundamentally DaemonSets not using hostNetwork have a few problems... not the least of which is the waste of IP space on large clusters (1000+ nodes). There are other issues like the fact that these pods can come up and fail if the CNI isn't ready yet (hint: IP/CIDR exhaustion), and that just causes more pods to be stuck in ContainerCreating for no good reason.

@diranged The reason why EFS (and FSx) removed hostNetwork: true from our repositories is that it exposes security risks to users. This link provides a good explanation for what those risks are.

In terms of the PR, I think if users want to configure hostNetwork: true they should be able to, just with the knowledge that doing so exposes their cluster to potential security risks.

@bseenu
Copy link
Contributor Author

bseenu commented Sep 21, 2023

First, is there a particular reason you want to run the driver in host network mode? This is a potentially footgun-ish feature, so I'm hesitant to expose it to users without a good reason.

@ConnorJC3, I would put this the other way around ... Is there a particular reason why we shouldn't be able to use hostNetwork: true here? This is following the pattern of the aws-efs-csi-driver https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/helm-chart-aws-efs-csi-driver-2.4.1/charts/aws-efs-csi-driver/templates/node-daemonset.yaml#L56. Sadly the aws-efs-csi-driver chart was updated without much explanation to remove this setting (kubernetes-sigs/aws-efs-csi-driver#910 (comment)) ... I have commented and am asking for clarity going forward.
Fundamentally DaemonSets not using hostNetwork have a few problems... not the least of which is the waste of IP space on large clusters (1000+ nodes). There are other issues like the fact that these pods can come up and fail if the CNI isn't ready yet (hint: IP/CIDR exhaustion), and that just causes more pods to be stuck in ContainerCreating for no good reason.

@diranged The reason why EFS (and FSx) removed hostNetwork: true from our repositories is that it exposes security risks to users. This link provides a good explanation for what those risks are.

In terms of the PR, I think if users want to configure hostNetwork: true they should be able to, just with the knowledge that doing so exposes their cluster to potential security risks.

By default the chart would still be having it false, but makes that configurable whoever wants to change it

@bseenu
Copy link
Contributor Author

bseenu commented Sep 21, 2023

Hi @bseenu - a few things:

First, is there a particular reason you want to run the driver in host network mode? This is a potentially footgun-ish feature, so I'm hesitant to expose it to users without a good reason.

Second, please remove the modifications to CHANGELOG.md and Chart.yaml. We generally do not accept PRs that add a feature and perform a release at the same time - releases are performed by our maintainers on a semi-regular schedule and take into account details such as backwards compatibility and support policies.

Third, you seem to have some minor test failures, please fix those (the Windows test is a known flake and is marked as optional, so you can ignore it, but the other test failures are likely legitimate).

removed the changes to changelog and chart.yaml, Thanks

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 21, 2023
@ConnorJC3
Copy link
Contributor

We had some discussion about this and decided we're good with the change as long as it defaults to hostNetwork: false.

/lgtm
/cc @torredil @AndrewSirenko

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 22, 2023
@torredil
Copy link
Member

/lgtm

@jacobwolfaws
Copy link
Contributor

@bseenu can you squash the commits in this PR? It seems like they should all be in a single commit

@torredil
Copy link
Member

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 22, 2023
@ConnorJC3
Copy link
Contributor

We can let prow squash it

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ConnorJC3

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 Sep 22, 2023
@ConnorJC3
Copy link
Contributor

/retest

1 similar comment
@bseenu
Copy link
Contributor Author

bseenu commented Sep 22, 2023

/retest

@k8s-ci-robot k8s-ci-robot merged commit 6f85184 into kubernetes-sigs:master Sep 22, 2023
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. 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. 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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants