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

Fix bug when using tailscale config by file #10074

Merged
merged 1 commit into from
May 23, 2024

Conversation

manuelbuil
Copy link
Contributor

Proposed Changes

When passing the config of tailscale using the config file, Tailscale was not working correctly in the agent. The reason is that we were setting the variable cmds.AgentConfig.VPNAuth which is not used by the agent. A few lines before, k3s is doing cfg := cmds.AgentConfig and after that, anything set in cmds.AgentConfig will get lost. Therefore, we should set the variable cfg.VPNAuth instead, which is the one being read by the agent. This PR does exactly that

Types of Changes

Bugfix

Verification

Deploy k3s+tailscale using the docs and using the vpn-auth-file config

Testing

Linked Issues

#10064

User-Facing Change

Fix bug when using `vpn-auth-file` in the agent

Further Comments

Signed-off-by: Manuel Buil <mbuil@suse.com>
@manuelbuil manuelbuil requested a review from a team as a code owner May 7, 2024 09:35
Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 37.00%. Comparing base (fe7d114) to head (be94efe).
Report is 3 commits behind head on master.

Files Patch % Lines
pkg/cli/agent/agent.go 0.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10074       +/-   ##
===========================================
- Coverage   48.92%   37.00%   -11.93%     
===========================================
  Files         158      156        -2     
  Lines       14032    13999       -33     
===========================================
- Hits         6865     5180     -1685     
- Misses       5885     7770     +1885     
+ Partials     1282     1049      -233     
Flag Coverage Δ
e2etests 36.10% <0.00%> (-10.68%) ⬇️
inttests 6.10% <0.00%> (?)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

3 participants