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

Add new network policy for ingress controller webhook #5500

Merged
merged 1 commit into from Feb 21, 2024

Conversation

brandond
Copy link
Contributor

@brandond brandond commented Feb 21, 2024

Proposed Changes

Add new network policy for ingress controller webhook.

The ingress-nginx chart added a validating webhook a while back, but we did not have a policy that allowed access to it. Access was being allowed by the overly broad network policy that we removed in #5318.

Unfortunately we can't just add this to the existing netpol, as we document that it is not updated once the namespace annotation has been set.

Types of Changes

bugfix

Verification

See linked issue

Testing

Linked Issues

User-Facing Change


Further Comments

@brandond brandond requested a review from a team as a code owner February 21, 2024 21:13
@@ -120,13 +122,44 @@ var networkIngressPolicy = v1.NetworkPolicy{
{
Protocol: &tcp,
Port: &intstr.IntOrString{
IntVal: int32(80),
StrVal: "http",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

},
},
{
Protocol: &tcp,
Port: &intstr.IntOrString{
IntVal: int32(443),
StrVal: "https",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

{
Protocol: &tcp,
Port: &intstr.IntOrString{
StrVal: "webhook",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: targeting by name is more correct, as the numeric ports can be set by chart values.

https://github.com/rancher/rke2-charts/blob/main/charts/rke2-ingress-nginx/rke2-ingress-nginx/4.8.200/values.yaml#L600

Unfortunately we can't just add this to the existing netpol, as we document that it is not updated once the namespace annotation has been set.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond merged commit 03437e4 into rancher:master Feb 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants