netpol-crd

command
v0.0.0-...-056dfb2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 12 Imported by: 0

README

Network policy API design

Find out more about our goals!

Setup

brew install kind

git clone git@github.com:mattfenwick/kube-prototypes.git

cd kube-prototypes/cmd/netpol-crd

go run main.go

Interesting corner cases

Asymmetry of target selectors

In namespace n1, deny all egress from namespace d1:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-nothing-from-d1
  namespace: d1
spec:
  podSelector: {}
  policyTypes:
  - Egress

In namespace d2, allow all ingress:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-all-to-d2
  namespace: d2
spec:
  ingress:
  - {}
  podSelector: {}
  policyTypes:
  - Ingress

Expected result: requests from d1 -> d2 are allowed, since allows trump denies.

Actual result: requests from d1 -> d2 are denied.

  • Possible explanation: since the two policies have different targets, there must be something else going on?

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL