mvisonneau / docker-tailscale

Run a Tailscale agent/relay in a container
Apache License 2.0
86 stars 41 forks source link

headscale #21

Open adelorenzo-portainer opened 1 year ago

adelorenzo-portainer commented 1 year ago

Hello, thank you for the helm chart. how can I make this work with a headscale server please?

SCLogo commented 1 year ago

I am trying the same. if I can solve it will let you know, or hopefully we will get answer from here :)

adelorenzo-portainer commented 1 year ago

I actually managed to make it work with headscale. Edit the values.yaml and add the headscale login server url like in the example below. works perfectly:

# Other variables to use during the tailscale up command
  variables: {
    # eg:
    # TAILSCALE_ACCEPT_DNS: "true"
    # TAILSCALE_ACCEPT_ROUTES: "false"
    # TAILSCALE_ADVERTISE_EXIT_NODE: "false"
    # TAILSCALE_ADVERTISE_ROUTES: "",
    # TAILSCALE_ADVERTISE_TAGS: env:prod
    # TAILSCALE_EXIT_NODE: ""
    # TAILSCALE_EXIT_NODE_ALLOW_LAN_ACCESS: "false"
    # TAILSCALE_FORCE_REAUTH: "false"
    # TAILSCALE_HOST_ROUTES: "true"
    # TAILSCALE_HOSTNAME: hostname-override
    TAILSCALE_LOGIN_SERVER: https://headscale.example.com
    # TAILSCALE_NETFILTER_MODE: "on"
    # TAILSCALE_SHIELDS_UP: "false"
    # TAILSCALE_SNAT_SUBNET_ROUTES: "true"
    # TAILSCALED_PORT: "0"
    # TAILSCALED_SOCKET: "/var/run/tailscale/tailscaled.sock"
    # TAILSCALED_STATE: "/var/lib/tailscale/tailscaled.state"
    # TAILSCALED_TUN: "tailscale0"
    # TAILSCALED_VERBOSE: "0"
    }
luc-ass commented 1 year ago

@adelorenzo-portainer Might be a stupid question, but where can I find the values.yaml?

adelorenzo-portainer commented 1 year ago

@luc-ass, if I understood your question correctly, you will find it here: https://github.com/mvisonneau/helm-charts/blob/main/charts/tailscale-relay/values.yaml

or if you already added the helm repo on your kube cluster you can run the following:

helm show values mvisonneau/tailscale-relay

and you will get the contents of the values.yaml from helm chart. If you need to change the values.yaml in order to run this with your own headscale server, you can do a helm show values mvisonneau/tailscale-relay > values.yaml, edit the values.yaml and then run:

helm install \
  tailscale-relay \
  mvisonneau/tailscale-relay \
  --set config.authKey=<your_auth_key>
  -f values.yaml