Skip to content

policy: Allow to specify L4/L7 policy which depend on L3 sources#1064

Closed
tgraf wants to merge 6 commits intomasterfrom
l3-l4-policy
Closed

policy: Allow to specify L4/L7 policy which depend on L3 sources#1064
tgraf wants to merge 6 commits intomasterfrom
l3-l4-policy

Conversation

@tgraf
Copy link
Copy Markdown
Contributor

@tgraf tgraf commented Jul 1, 2017

  • Reserve the right to support L4/L7 policies which depend on L3 matching in the future when the datapath supports this. For now, reject any such rules but document that this will be supported in the future.

  • Reject combined policies for now as the datapath does not support them yet.

  • Adjust the tests and examples to use decoupled policies.

tgraf added 6 commits June 27, 2017 07:13
netperf was invoked with `docker run [...] netperf [...]` which will
cause netperf to be started while the labels and policy is being
rlicesolved for that endpoint in parallel. This can cause to random test
failyure if the policy is not put in place in time before netperf's
control  TCP connection gives up retrying.

Fixes: #1059

Signed-off-by: Thomas Graf <thomas@cilium.io>
Reserve the right to support L4/L7 policies which depend on L3 matching
in the future when the datapath supports this. For now, reject any
such rules but document that this will be supported in the future.

Signed-off-by: Thomas Graf <thomas@cilium.io>
- Reject k8s NetworkPolicy rules with combined L3/L4 policy rules.

- Don't generate api.Rule with with combined L3/L4 policy rules.

Signed-off-by: Thomas Graf <thomas@cilium.io>
This does not change behaviour, it only reflects the new policy syntax
to allow to specify combined policies at a later stage.

Signed-off-by: Thomas Graf <thomas@cilium.io>
- Do not run testsuite against DaemonSet, policy and demo yaml of git
  master. Use the local checked out git tree instead.

- Be less verbose when running test

Signed-off-by: Thomas Graf <thomas@cilium.io>
If HAVE_L4_POLICY is set, the policy map will be looked up with the
destination port and protocol set. Allows to establish L4 policies
which are tied to a particular source identity.

Signed-off-by: Thomas Graf <thomas@cilium.io>
@tgraf tgraf added the kind/bug This is a bug in the Cilium logic. label Jul 1, 2017
@tgraf tgraf added this to the 0.10 milestone Jul 3, 2017
@tgraf tgraf changed the title policy: Reject policy rules with combined L3/L4 policies policy: Allow to specify L4/L7 policy which depend on L3 sources Jul 3, 2017
@tgraf tgraf force-pushed the l3-l4-policy branch 4 times, most recently from bd7fcf4 to 5f64ae0 Compare July 3, 2017 20:38
func (key *policyKey) String() string {
if key.DestPort != 0 {
return fmt.Sprintf("%d %d/%d", key.Identity, key.DestPort, key.Nexthdr)
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if block ends with a return statement, so drop this else and outdent its block

func (key *policyKey) String() string {
if key.DestPort != 0 {
return fmt.Sprintf("%d %d/%d", key.Identity, key.DestPort, key.Nexthdr)
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

if block ends with a return statement, so drop this else and outdent its block

@tgraf tgraf modified the milestones: 0.11, 0.10 Jul 21, 2017
@tgraf tgraf modified the milestones: 0.12, 0.11 Sep 7, 2017
@tgraf
Copy link
Copy Markdown
Contributor Author

tgraf commented Oct 2, 2017

Obsoleted by #1599

@tgraf tgraf closed this Oct 2, 2017
@tgraf tgraf deleted the l3-l4-policy branch December 4, 2017 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug This is a bug in the Cilium logic.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants