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

egressgw: inject datapath config via hive #27414

Merged
merged 3 commits into from
Aug 14, 2023
Merged

Conversation

lmb
Copy link
Contributor

@lmb lmb commented Aug 10, 2023

datapath: allow injecting defines into NodeConfig via a map

The existing functionality to inject defines via a function is necessary for
cases where the defines are not know at construction time. If they are
known, it's nicer to be able to specify a plain map. This gives quicker
feedback if duplicate defines are attempted. It also allows leaving the map
nil if a feature is disabled, where in the existing implementation you'd
need a dummy function.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

egressgw: inject datapath config via hive

Remove the hardcoded defines from the HeaderfileWriter and inject them via a
hive value group instead. This allows adding back EGRESS_POLICY_MAP_SIZE.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

@lmb lmb added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. feature/egress-gateway Impacts the egress IP gateway feature. area/modularization labels Aug 10, 2023
@lmb
Copy link
Contributor Author

lmb commented Aug 10, 2023

/test

@lmb
Copy link
Contributor Author

lmb commented Aug 10, 2023

/test

@lmb lmb force-pushed the egw-node-config branch 2 times, most recently from ec1323c to 19b1ec4 Compare August 10, 2023 14:14
@lmb
Copy link
Contributor Author

lmb commented Aug 10, 2023

/test

@lmb
Copy link
Contributor Author

lmb commented Aug 10, 2023

/test

@lmb
Copy link
Contributor Author

lmb commented Aug 11, 2023

/test

The existing functionality to inject defines via a function is
necessary for cases where the defines are not know at construction
time. If they are known, it's nicer to be able to specify a plain
map. This gives quicker feedback if duplicate defines are attempted.
It also allows leaving the map nil if a feature is disabled, where
in the existing implementation you'd need a dummy function.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Due to the ordering of header includes we sometimes miss defining
HAVE_ENCAP even though the egress gateway code is enabled. Move
the definition of ENABLE_EGRESS_GATEWAY_COMMON into common.h.

Fixes: 6cad3dc ("bpf: gate egressgw datapath on separate defines")
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Remove the hardcoded defines from the HeaderfileWriter and
inject them via a hive value group instead. This allows adding
back EGRESS_POLICY_MAP_SIZE.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb
Copy link
Contributor Author

lmb commented Aug 11, 2023

/test

@lmb lmb marked this pull request as ready for review August 11, 2023 11:35
@lmb lmb requested review from a team as code owners August 11, 2023 11:35
Copy link
Member

@julianwiedmann julianwiedmann left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@dylandreimerink dylandreimerink left a comment

Choose a reason for hiding this comment

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

The nit is not blocking, just had to say something. Looks good otherwise

pkg/maps/egressmap/policy.go Show resolved Hide resolved
@maintainer-s-little-helper maintainer-s-little-helper bot added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Aug 14, 2023
@lmb lmb merged commit d84f0c7 into cilium:main Aug 14, 2023
59 checks passed
@lmb lmb deleted the egw-node-config branch August 14, 2023 16:13
@julianwiedmann julianwiedmann changed the title egressgw: inject datapath config via hive egressgw: inject datapath config via hive Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/modularization feature/egress-gateway Impacts the egress IP gateway feature. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants