mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-26 11:36:26 -08:00
temp
This commit is contained in:
1 parent
713ed80a09
commit
4b43419923
2 files changed
+16
No files matched your search
@@ -106,6 +106,7 @@ func main() {
|
||||
Hostname: defaultEnv("TS_HOSTNAME", ""),
|
||||
Routes: defaultEnvPointer("TS_ROUTES"),
|
||||
ServeConfigPath: defaultEnv("TS_SERVE_CONFIG", ""),
|
||||
ConfigFilePath: defaultEnv("TS_CONFIG_FILE_PATH", ""),
|
||||
ProxyTo: defaultEnv("TS_DEST_IP", ""),
|
||||
TailnetTargetIP: defaultEnv("TS_TAILNET_TARGET_IP", ""),
|
||||
TailnetTargetFQDN: defaultEnv("TS_TAILNET_TARGET_FQDN", ""),
|
||||
@@ -637,6 +638,9 @@ func tailscaledArgs(cfg *settings) []string {
|
||||
if cfg.DaemonExtraArgs != "" {
|
||||
args = append(args, strings.Fields(cfg.DaemonExtraArgs)...)
|
||||
}
|
||||
if cfg.ConfigFilePath != "" {
|
||||
args = append(args, "--config="+cfg.ConfigFilePath)
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
@@ -888,6 +892,7 @@ type settings struct {
|
||||
AuthOnce bool
|
||||
Root string
|
||||
KubernetesCanPatch bool
|
||||
ConfigFilePath string
|
||||
}
|
||||
|
||||
// defaultEnv returns the value of the given envvar name, or defVal if
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"sigs.k8s.io/yaml"
|
||||
"tailscale.com/client/tailscale"
|
||||
"tailscale.com/ipn"
|
||||
"tailscale.com/net/netutil"
|
||||
"tailscale.com/tailcfg"
|
||||
"tailscale.com/tsnet"
|
||||
"tailscale.com/types/opt"
|
||||
@@ -481,6 +482,16 @@ func (a *tailscaleSTSReconciler) reconcileSTS(ctx context.Context, logger *zap.S
|
||||
return createOrUpdate(ctx, a.Client, a.operatorNamespace, &ss, func(s *appsv1.StatefulSet) { s.Spec = ss.Spec })
|
||||
}
|
||||
|
||||
func confFile(sts *tailscaleSTSConfig) (*ipn.ConfigVAlpha, error) {
|
||||
if sts.connector != nil {}
|
||||
routes, err := netutil.CalcAdvertiseRoutes(sts., advertiseDefaultRoute)
|
||||
|
||||
return &ipn.ConfigVAlpha{
|
||||
Hostname: &sts.Hostname,
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
||||
// ptrObject is a type constraint for pointer types that implement
|
||||
// client.Object.
|
||||
type ptrObject[T any] interface {
|
||||
|
||||
Reference in new issue
Block a user