Skip to content

Conversation

mhofstetter
Copy link
Member

This PR extracts the local identity restoration logic and state from the Daemon.

Please review the individual commits.

@mhofstetter mhofstetter added kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact. area/modularization Relates to code modularization and maintenance. labels May 9, 2025
@github-actions github-actions bot added the sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. label May 9, 2025
@mhofstetter mhofstetter changed the title endpoint: extract identity restoration logic from Daemon identity: extract identity restoration logic from Daemon May 9, 2025
@mhofstetter mhofstetter changed the title identity: extract identity restoration logic from Daemon identity/ipcache: extract identity restoration logic from Daemon May 9, 2025
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/extract-identityrestorer branch from 93f4423 to a1510ed Compare May 9, 2025 14:14
Currently, the functionality that restores the local identities is
part of the daemon and is placed in package `daemon/cmd`.

To eventually delete the legacy daemon logic, this commit extracts
this logic (and state about restored identities) into its own Go
struct (including Hive Cell) `LocalIdentityRestorer`.

While this commit extracts the logic, the lifecycle is still
controlled by the daemon init logic (by calling the respective
methods on the restorer).

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
…oration

This comit moves the extracted identity restorer from package `daemon/cmd`
to `pkg/identity/restoration`.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
This commit migrates the identity restorer to use a Hive injected
slog logger instead of the package scoped logrus instance.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/extract-identityrestorer branch from a1510ed to 3b5cc40 Compare May 14, 2025 09:26
@mhofstetter
Copy link
Member Author

/test

@mhofstetter mhofstetter marked this pull request as ready for review May 14, 2025 10:40
@mhofstetter mhofstetter requested review from a team as code owners May 14, 2025 10:40
@mhofstetter mhofstetter requested review from squeed and bimmlerd May 14, 2025 10:40
Copy link
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

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

Definitely ripe for more cleanup, but incremental steps and all that 👍

@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 May 15, 2025
Copy link
Contributor

@squeed squeed left a comment

Choose a reason for hiding this comment

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

One suggestion for further cleanup, but then it looks good.

@julianwiedmann julianwiedmann added this pull request to the merge queue May 15, 2025
Merged via the queue into cilium:main with commit 175d4fa May 15, 2025
80 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/extract-identityrestorer branch May 15, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/modularization Relates to code modularization and maintenance. kind/cleanup This includes no functional changes. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants