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

egressgateway: fix manager logic #17813

Merged
merged 5 commits into from
Nov 26, 2021
Merged

Conversation

jibi
Copy link
Member

@jibi jibi commented Nov 8, 2021

This PR refactors the egress gateway manager in order to provide a
single reconcile() method, responsible for adding and removing entries
to and from the egress_policy map, that will be invoked on all events
received by the manager.

In addition to this, the manager will now wait for the k8s cache to be
fully synced before running its first reconciliation, in order to always
have the egress_policy map in a consistent state with the k8s
configuration.

Fixes: #17380
Fixes: #17753

@jibi jibi added release-note/bug This PR fixes an issue in a previous release of Cilium. feature/egress-gateway Impacts the egress IP gateway feature. labels Nov 8, 2021
@jibi jibi force-pushed the pr/jibi/refactor-egress-gw-manager branch 7 times, most recently from 6a80d9e to dd137a5 Compare November 12, 2021 13:44
@jibi jibi force-pushed the pr/jibi/refactor-egress-gw-manager branch from dd137a5 to 5db11fe Compare November 16, 2021 10:58
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.10.6 Nov 16, 2021
@jibi jibi requested review from pchaigno and kkourt November 16, 2021 12:47
@jibi jibi marked this pull request as ready for review November 16, 2021 12:47
@jibi jibi requested review from a team November 16, 2021 12:47
@jibi jibi requested a review from a team as a code owner November 16, 2021 12:47
@jibi jibi requested a review from a team November 16, 2021 12:47
@jibi jibi requested a review from a team as a code owner November 16, 2021 12:47
@jibi jibi force-pushed the pr/jibi/refactor-egress-gw-manager branch from 5db11fe to 3a5a069 Compare November 17, 2021 11:23
@jibi jibi force-pushed the pr/jibi/refactor-egress-gw-manager branch 2 times, most recently from f7faa2f to ebdd83b Compare November 17, 2021 13:56
@jibi
Copy link
Member Author

jibi commented Nov 25, 2021

/test

Job 'Cilium-PR-K8s-1.20-kernel-5.4' hit: #17069 (89.67% similarity)

@jibi jibi requested a review from joamaki November 25, 2021 19:50
@jibi
Copy link
Member Author

jibi commented Nov 25, 2021

/test-5.4

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 25, 2021
@qmonnet qmonnet merged commit ed73a31 into master Nov 26, 2021
@qmonnet qmonnet deleted the pr/jibi/refactor-egress-gw-manager branch November 26, 2021 08:05
}

# define lookup_ip4_egress_endpoint(sip, dip) \
egress_lookup4(&EGRESS_MAP, sip, dip)
Copy link
Member

@pchaigno pchaigno Nov 26, 2021

Choose a reason for hiding this comment

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

FYI, I'll have to revert all changes to this file in the SRv6 PR, except for the map/key name changes.

EDIT: Actually, I can preserve this function name change as well, doesn't make a different for SRv6 for now.

@qmonnet qmonnet mentioned this pull request Nov 26, 2021
12 tasks
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.10 in 1.11.0 Nov 30, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.10 in 1.10.6 Nov 30, 2021
nbusseneau added a commit to nbusseneau/cilium that referenced this pull request Dec 2, 2021
This backports cilium#17186 to `v1.10`.

Rationale: the original PR was required on `master` for cilium#17813. cilium#18082
is backporting cilium#17813 to `v1.10`, thus it also requires similar changes.

As we previously did on `master`, we switch the runtime tests to run on
net-next instead of 4.9 due to new unit tests requirements.

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
joestringer pushed a commit that referenced this pull request Dec 2, 2021
This backports #17186 to `v1.10`.

Rationale: the original PR was required on `master` for #17813. #18082
is backporting #17813 to `v1.10`, thus it also requires similar changes.

As we previously did on `master`, we switch the runtime tests to run on
net-next instead of 4.9 due to new unit tests requirements.

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
@joestringer joestringer added backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. and removed backport-pending/1.11 labels Dec 3, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.10 to Backport done to v1.11 in 1.11.0 Dec 3, 2021
@jibi jibi mentioned this pull request Dec 6, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.10 to Backport done to v1.10 in 1.10.6 Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. 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/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.10.6
Backport done to v1.10
1.11.0
Backport done to v1.11
7 participants