-
Notifications
You must be signed in to change notification settings - Fork 814
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
Chart: add egress network policy for controller #1828
Chart: add egress network policy for controller #1828
Conversation
Welcome @calvix! |
Hi @calvix. 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 Once the patch is verified, the new status will be reflected by the 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
What's the effect of this on non-airgapped environments? Should this be put behind a conditional? |
/retest |
if the environment is not running any network policy controller it should have no effect If the environment is running a network policy controller in non-strict mode (all traffic is allowed unless network policy specifies otherwise) it should work the same As you can see all tests passed so it does not have an influence on the non-airgapped environments But if you feel this should be conditional and enabled only when a certain value is set than I am fine to adjust the changes. |
My personal preference would be to put it behind a flag so that it doesn't surprise users updating to a new version of the chart (even though there's no functional change). @torredil @ConnorJC3 @AndrewSirenko are the arbiters, though. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @calvix, thank you for your contribution.
Let's consider the case where a cluster administrator has already deployed a network policy for the controller.
By deploying this network policy we could be unintentionally overriding restrictions set by that existing policy because network policies are additive. This would allow for broad egress traffic, which in environments where traffic needs to be controlled for compliance or security reasons would be very undesirable.
+1 to @rdpsin's suggestion. See an example in minio's chart here: https://github.com/minio/minio/blob/754f7a8a395e87a744050476d8b16c16af50a800/helm/minio/values.yaml#L500 where they provide this configuration, disabled by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the late review on this, but agree with above. We definitely cannot have this enabled by default, our security-conscious users would be very mad if we suddenly deploy a default-enabled NetworkPolicy
that bypasses their configurations.
To be honest, I'm not sure if there's even a strong need for this at all - in environments so security conscious the user has defaulted the NetworkPolicy
to egress disabled, would they really want a policy with an unlimited egress policy?
kind: NetworkPolicy | ||
metadata: | ||
name: {{ include "aws-ebs-csi-driver.name" . }}-controller | ||
namespace: kube-system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be hardcoded, it should use Release.Namespace
egress: | ||
- {} | ||
podSelector: | ||
matchLabels: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use aws-ebs-csi-driver.selectorLabels
/close Hi, the team talked about this, and we decided that we don't want to move forwards with this change at the moment. Deploying a default-enabled |
@ConnorJC3: Closed this PR. In response to this:
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. |
Is this a bug fix or adding a new feature?
Bug fix
What is this PR about? / Why do we need it?
In a secure environment with strict network policy mode, all traffic is denied except traffic allowed by the network policies.
In order to be able to run the
aws-ebs-csi-driver
in such an environment it is necessary to specify the network policy for the controller otherwise it will end with the error:What testing is done?