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

default to any for empty fields is not working anymore #151

Open
mwennrich opened this issue Apr 13, 2023 · 0 comments · May be fixed by #166
Open

default to any for empty fields is not working anymore #151

mwennrich opened this issue Apr 13, 2023 · 0 comments · May be fixed by #166

Comments

@mwennrich
Copy link
Contributor

According to the spec, rules which leave to: or ports: fields empty, the rule should default to any for these fields:

FIELDS:
   ports        <[]Object>
     List of destination ports for outgoing traffic. Each item in this list is
     combined using a logical OR. If this field is empty or missing, this rule
     matches all ports (traffic not restricted by port) 

   to   <[]Object>
     List of destinations for outgoing traffic of a cluster for this rule. Items
     in this list are combined using a logical OR operation. If this field is
     empty or missing, this rule matches all destinations (traffic not
     restricted by destination).

This does not work anymore.

Example:

apiVersion: metal-stack.io/v1
kind: ClusterwideNetworkPolicy
metadata:
  name: allow-to-81
  namespace: firewall
spec:
  egress:
  - ports:
    - port: 81
      protocol: TCP

does not allow traffic on port 81. With an additional

    to:
    - cidr: 0.0.0.0/0

it does still work.

@Gerrit91 Gerrit91 linked a pull request Sep 6, 2023 that will close this issue
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 a pull request may close this issue.

1 participant