Skip to content

Conversation

@kradalby
Copy link
Collaborator

@kradalby kradalby commented Oct 25, 2024

This PR is a series of commits which is exploring a new way of structuring the policy, the goals are:

  • Type as much as possible, making it possible to emit errors on load
  • Easier to maintain and work with
  • Pre-compute when there is a change, not when a node gets an update

Updates #2416

Signed-off-by: Kristoffer Dalby [email protected]

@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch from 2e68455 to 907449b Compare November 22, 2024 11:24
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch from 907449b to 02c76bd Compare November 25, 2024 09:06
@kradalby kradalby added this to the Next milestone Jan 3, 2025
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch from 02c76bd to 72f6bd2 Compare February 7, 2025 11:29
@kradalby kradalby modified the milestones: Next, v0.26.0 Feb 7, 2025
@kradalby kradalby changed the title policyv2: testing policyv2 Feb 7, 2025
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch 3 times, most recently from 0b8a312 to 6211eec Compare February 13, 2025 14:17
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch 2 times, most recently from b998b87 to 64f1eb1 Compare February 18, 2025 13:30
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch 2 times, most recently from 23681a3 to 1a10a8a Compare February 26, 2025 18:13
Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch from 1a10a8a to 2c417bc Compare February 26, 2025 18:33
This commit split out the common policy logic and policy implementation
into separate packages.

policy contains functions that are independent of the policy implementation,
this typically means logic that works on tailcfg types and generic formats.
In addition, it defines the PolicyManager interface which the v1 implements.

v1 is a subpackage which implements the PolicyManager using the "original"
policy implementation.

Signed-off-by: Kristoffer Dalby <[email protected]>
These can be marshalled back into JSON, which the
new format might not be able to.

Also, just dont change it all to JSON strings for now.

Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch 2 times, most recently from 61d3f8c to 199c50a Compare February 28, 2025 14:20
policy v2 is built from the ground up to be stricter
and follow the same pattern for all types of resolvers.

TODO introduce
aliass
resolver

Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby force-pushed the kradalby/typedpolicyv2 branch from 199c50a to 674be0d Compare February 28, 2025 16:01
@kradalby kradalby marked this pull request as ready for review February 28, 2025 16:40
@kradalby kradalby changed the title policyv2 Experimental implementation of Policy v2 Feb 28, 2025
Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby merged commit 87326f5 into juanfont:main Mar 10, 2025
523 of 535 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.

2 participants