Skip to content

Conversation

@willnorris
Copy link
Member

this overrides the name used to refer to the node in the caddy config, and is mostly useful because it can include environment variables.

Closes #18

@willnorris willnorris changed the base branch from main to will/controlurl May 8, 2024 19:44
Copy link
Contributor

@irbekrm irbekrm left a comment

Choose a reason for hiding this comment

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

Nice, I tested it with a simple Caddyfile

{
	tailscale {
		foo {
			hostname "{$FOO}"
		}
		bar {
			hostname "{$BAR}"
		}
	}
}

:8081 {
	bind tailscale/foo
	respond "hello foo"
}
:8082 {
	bind tailscale/bar
	respond "hello bar"
}

and got the expected two Tailscale nodes with hostnames set to the respective env var values.

Suggestion: should we add hostname to the nested node config in the top level example Caddyfile for documentation?
Suggestion2: should we have a test case for this?

Base automatically changed from will/controlurl to main May 9, 2024 14:39
@willnorris willnorris force-pushed the will/hostname branch 3 times, most recently from e679b94 to cff4339 Compare May 9, 2024 15:03
@willnorris
Copy link
Member Author

added tests, as well as for the previous control_url change, which I missed. I'll document all of these new field together in an upcoming change.

this overrides the name used to refer to the node in the caddy config,
and is mostly useful because it can include environment variables.

Closes #18

Co-authored-by: kdevan <[email protected]>
Signed-off-by: Will Norris <[email protected]>
@willnorris willnorris merged commit 98eb251 into main May 9, 2024
@willnorris willnorris deleted the will/hostname branch May 9, 2024 15:10
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.

2 participants