Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add configMaps component to tailnet#11400

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 1 commit intomainfromspike/10533-configmaps-initial
Jan 10, 2024

Conversation

spikecurtis
Copy link
Contributor

Work in progress on a subcomponent of the Conn which will handle configuring the wireguard engine on changes. I've implemented setAddresses as the simplest case and added unit tests of the reconfiguration loop.

Besides making the code easier to test and understand, the goal is for this component to handle disconnect and loss updates about peers, and thereby, implement the v2 Tailnet API.

Further PRs will handle peer updates, status updates, and net info updates.

Then, after the subcomponent is implemented and tested, I will refactor Conn to use it instead of the current monolithic architecture.

@spikecurtisGraphite App
Copy link
ContributorAuthor

spikecurtis commentedJan 4, 2024
edited
Loading

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@spikecurtis and the rest of your teammates onGraphiteGraphite

@spikecurtisspikecurtisforce-pushed thespike/unused-context-tailnet branch from9704400 tod9c25c1CompareJanuary 4, 2024 09:46
@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch fromda115a4 to86113e2CompareJanuary 4, 2024 09:46
@spikecurtisspikecurtisforce-pushed thespike/unused-context-tailnet branch fromd9c25c1 to9af1797CompareJanuary 4, 2024 10:37
@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch from86113e2 to8d938f7CompareJanuary 4, 2024 10:37
Base automatically changed fromspike/unused-context-tailnet tomainJanuary 5, 2024 04:15
@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch 2 times, most recently from3b7ebdf to032d52dCompareJanuary 8, 2024 13:00
@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch 2 times, most recently fromb03a760 to6f37b9bCompareJanuary 9, 2024 11:37
Copy link
Contributor

@coadlercoadler left a comment

Choose a reason for hiding this comment

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

Definitely feels like a significant improvement over the previous mutex-guarded engine

return out
}

func (c *configMaps) setAddresses(ips []netip.Prefix) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Even though these won't be used outside of tailnet, I think it would be clearer to export the functions that callers are expected to use. Otherwise they feel a little lost next to all of the internal-only functions.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Do you think it's worth putting into its own package? Otherwise I don't think the internal/external distinction is meaningful and I'm not sure readers would will pick up on the difference.

Maybe adding some method comments would help make it clear.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

As I was going through, other than the configLoop() routine, I don't know if any internal/external distinction is going to pass the test of time. For example, right now the functions that return the current config are only called from the configLoop(), but there isn't any strong reason we couldn't call them from the Conn later---there are a lot of functions already that query various aspects of config---so long as they obey the locking requirements.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense. I was initially a bit confused on what was intended to be called externally. Comments sound helpful 👍

@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch from6f37b9b to0ec3722CompareJanuary 10, 2024 06:10
@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch from0ec3722 tod013264CompareJanuary 10, 2024 06:34
@spikecurtisspikecurtisforce-pushed thespike/10533-configmaps-initial branch fromd013264 to018e3b8CompareJanuary 10, 2024 06:51
@spikecurtisspikecurtis merged commit89e3bbe intomainJan 10, 2024
@spikecurtisspikecurtis deleted the spike/10533-configmaps-initial branchJanuary 10, 2024 06:58
@spikecurtisGraphite App
Copy link
ContributorAuthor

Merge activity

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
1 more reviewer

@coadlercoadlercoadler approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@spikecurtis@coadler

[8]ページ先頭

©2009-2025 Movatter.jp