blob: 88ca0dedfbeb7988b31196fa104bbe8d7930afac [file] [log] [blame]
Giorgi Lekveishvili08a19412023-02-04 22:36:01 +04001apiVersion: v1
2kind: ConfigMap
3metadata:
4 name: config
5 namespace: {{ .Release.Namespace }}
6data:
7 config.yaml: |
8 # headscale will look for a configuration file named `config.yaml` (or `config.json`) in the following order:
9 #
10 # - `/etc/headscale`
11 # - `~/.headscale`
12 # - current working directory
13
14 # The url clients will connect to.
15 # Typically this will be a domain like:
16 #
17 # https://myheadscale.example.com:443
18 #
19 server_url: https://headscale.{{ .Values.domain }}
20
21 # Address to listen to / bind to on the server
22 #
23 # For production:
24 listen_addr: 0.0.0.0:8080
25 # listen_addr: 127.0.0.1:8080
26
27 # Address to listen to /metrics, you may want
28 # to keep this endpoint private to your internal
29 # network
30 #
31 metrics_listen_addr: 0.0.0.0:9090
32 # metrics_listen_addr: 127.0.0.1:9090
33
34 # Address to listen for gRPC.
35 # gRPC is used for controlling a headscale server
36 # remotely with the CLI
37 # Note: Remote access _only_ works if you have
38 # valid certificates.
39 #
40 # For production:
41 grpc_listen_addr: 0.0.0.0:50443
42 # grpc_listen_addr: 127.0.0.1:50443
43
44 # Allow the gRPC admin interface to run in INSECURE
45 # mode. This is not recommended as the traffic will
46 # be unencrypted. Only enable if you know what you
47 # are doing.
48 grpc_allow_insecure: false
49
50 # Private key used to encrypt the traffic between headscale
51 # and Tailscale clients.
52 # The private key file will be autogenerated if it's missing.
53 #
54 # For production:
55 # /var/lib/headscale/private.key
56 private_key_path: /headscale/data/private.key
57
58 # The Noise section includes specific configuration for the
59 # TS2021 Noise protocol
60 noise:
61 # The Noise private key is used to encrypt the
62 # traffic between headscale and Tailscale clients when
63 # using the new Noise-based protocol. It must be different
64 # from the legacy private key.
65 #
66 # For production:
67 # private_key_path: /var/lib/headscale/noise_private.key
68 private_key_path: /headscale/data/noise_private.key
69
70 # List of IP prefixes to allocate tailaddresses from.
71 # Each prefix consists of either an IPv4 or IPv6 address,
72 # and the associated prefix length, delimited by a slash.
73 ip_prefixes:
74 # - fd7a:115c:a1e0::/48
75 - 100.64.0.0/10
76
77 # DERP is a relay system that Tailscale uses when a direct
78 # connection cannot be established.
79 # https://tailscale.com/blog/how-tailscale-works/#encrypted-tcp-relays-derp
80 #
81 # headscale needs a list of DERP servers that can be presented
82 # to the clients.
83 derp:
84 server:
85 # If enabled, runs the embedded DERP server and merges it into the rest of the DERP config
86 # The Headscale server_url defined above MUST be using https, DERP requires TLS to be in place
87 enabled: false
88
89 # Region ID to use for the embedded DERP server.
90 # The local DERP prevails if the region ID collides with other region ID coming from
91 # the regular DERP config.
92 region_id: 999
93
94 # Region code and name are displayed in the Tailscale UI to identify a DERP region
95 region_code: "headscale"
96 region_name: "Headscale Embedded DERP"
97
98 # Listens over UDP at the configured address for STUN connections - to help with NAT traversal.
99 # When the embedded DERP server is enabled stun_listen_addr MUST be defined.
100 #
101 # For more details on how this works, check this great article: https://tailscale.com/blog/how-tailscale-works/
102 stun_listen_addr: "0.0.0.0:3478"
103
104 # List of externally available DERP maps encoded in JSON
105 urls:
106 - https://controlplane.tailscale.com/derpmap/default
107
108 # Locally available DERP map files encoded in YAML
109 #
110 # This option is mostly interesting for people hosting
111 # their own DERP servers:
112 # https://tailscale.com/kb/1118/custom-derp-servers/
113 #
114 # paths:
115 # - /etc/headscale/derp-example.yaml
116 paths: []
117
118 # If enabled, a worker will be set up to periodically
119 # refresh the given sources and update the derpmap
120 # will be set up.
121 auto_update_enabled: true
122
123 # How often should we check for DERP updates?
124 update_frequency: 24h
125
126 # Disables the automatic check for headscale updates on startup
127 disable_check_updates: true
128
129 # Time before an inactive ephemeral node is deleted?
130 ephemeral_node_inactivity_timeout: 30m
131
132 # Period to check for node updates within the tailnet. A value too low will severely affect
133 # CPU consumption of Headscale. A value too high (over 60s) will cause problems
134 # for the nodes, as they won't get updates or keep alive messages frequently enough.
135 # In case of doubts, do not touch the default 10s.
136 node_update_check_interval: 10s
137
138 # SQLite config
139 db_type: sqlite3
140
141 # For production:
142 # db_path: /var/lib/headscale/db.sqlite
143 db_path: /headscale/data/db.sqlite
144
145 # # Postgres config
146 # If using a Unix socket to connect to Postgres, set the socket path in the 'host' field and leave 'port' blank.
147 # db_type: postgres
148 # db_host: localhost
149 # db_port: 5432
150 # db_name: headscale
151 # db_user: foo
152 # db_pass: bar
153
154 # If other 'sslmode' is required instead of 'require(true)' and 'disabled(false)', set the 'sslmode' you need
155 # in the 'db_ssl' field. Refers to https://www.postgresql.org/docs/current/libpq-ssl.html Table 34.1.
156 # db_ssl: false
157
158 ### TLS configuration
159 #
160 ## Let's encrypt / ACME
161 #
162 # headscale supports automatically requesting and setting up
163 # TLS for a domain with Let's Encrypt.
164 #
165 # URL to ACME directory
166 acme_url: https://acme-v02.api.letsencrypt.org/directory
167
168 # Email to register with ACME provider
169 acme_email: ""
170
171 # Domain name to request a TLS certificate for:
172 tls_letsencrypt_hostname: ""
173
174 # Path to store certificates and metadata needed by
175 # letsencrypt
176 # For production:
177 # tls_letsencrypt_cache_dir: /var/lib/headscale/cache
178 tls_letsencrypt_cache_dir: ./cache
179
180 # Type of ACME challenge to use, currently supported types:
181 # HTTP-01 or TLS-ALPN-01
182 # See [docs/tls.md](docs/tls.md) for more information
183 tls_letsencrypt_challenge_type: HTTP-01
184 # When HTTP-01 challenge is chosen, letsencrypt must set up a
185 # verification endpoint, and it will be listening on:
186 # :http = port 80
187 tls_letsencrypt_listen: ":http"
188
189 ## Use already defined certificates:
190 tls_cert_path: ""
191 tls_key_path: ""
192
193 log:
194 # Output formatting for logs: text or json
195 format: text
196 level: info
197
198 # Path to a file containg ACL policies.
199 # ACLs can be defined as YAML or HUJSON.
200 # https://tailscale.com/kb/1018/acls/
201 acl_policy_path: ""
202
203 ## DNS
204 #
205 # headscale supports Tailscale's DNS configuration and MagicDNS.
206 # Please have a look to their KB to better understand the concepts:
207 #
208 # - https://tailscale.com/kb/1054/dns/
209 # - https://tailscale.com/kb/1081/magicdns/
210 # - https://tailscale.com/blog/2021-09-private-dns-with-magicdns/
211 #
212 dns_config:
213 # Whether to prefer using Headscale provided DNS or use local.
214 override_local_dns: true
215
216 # List of DNS servers to expose to clients.
217 nameservers:
218 - 8.8.8.8
219 - 1.1.1.1
220
221 # NextDNS (see https://tailscale.com/kb/1218/nextdns/).
222 # "abc123" is example NextDNS ID, replace with yours.
223 #
224 # With metadata sharing:
225 # nameservers:
226 # - https://dns.nextdns.io/abc123
227 #
228 # Without metadata sharing:
229 # nameservers:
230 # - 2a07:a8c0::ab:c123
231 # - 2a07:a8c1::ab:c123
232
233 # Split DNS (see https://tailscale.com/kb/1054/dns/),
234 # list of search domains and the DNS to query for each one.
235 #
236 # restricted_nameservers:
237 # foo.bar.com:
238 # - 1.1.1.1
239 # darp.headscale.net:
240 # - 1.1.1.1
241 # - 8.8.8.8
242
243 # Search domains to inject.
244 domains: []
245
246 # Whether to use [MagicDNS](https://tailscale.com/kb/1081/magicdns/).
247 # Only works if there is at least a nameserver defined.
248 magic_dns: true
249
250 # Defines the base domain to create the hostnames for MagicDNS.
251 # `base_domain` must be a FQDNs, without the trailing dot.
252 # The FQDN of the hosts will be
253 # `hostname.namespace.base_domain` (e.g., _myhost.mynamespace.example.com_).
254 base_domain: example.com
255
256 # Unix socket used for the CLI to connect without authentication
257 # Note: for production you will want to set this to something like:
258 # unix_socket: /var/run/headscale.sock
259 unix_socket: ./headscale.sock
260 unix_socket_permission: "0770"
261 #
262 # headscale supports experimental OpenID connect support,
263 # it is still being tested and might have some bugs, please
264 # help us test it.
265 # OpenID Connect
266 # oidc:
267 # only_start_if_oidc_is_available: true
268 # issuer: "https://your-oidc.issuer.com/path"
269 # client_id: "your-oidc-client-id"
270 # client_secret: "your-oidc-client-secret"
271 #
272 # Customize the scopes used in the OIDC flow, defaults to "openid", "profile" and "email" and add custom query
273 # parameters to the Authorize Endpoint request. Scopes default to "openid", "profile" and "email".
274 #
275 # scope: ["openid", "profile", "email", "custom"]
276 # extra_params:
277 # domain_hint: example.com
278 #
279 # List allowed principal domains and/or users. If an authenticated user's domain is not in this list, the
280 # authentication request will be rejected.
281 #
282 # allowed_domains:
283 # - example.com
284 # Groups from keycloak have a leading '/'
285 # allowed_groups:
286 # - /headscale
287 # allowed_users:
288 # - alice@example.com
289 #
290 # If `strip_email_domain` is set to `true`, the domain part of the username email address will be removed.
291 # This will transform `first-name.last-name@example.com` to the namespace `first-name.last-name`
292 # If `strip_email_domain` is set to `false` the domain part will NOT be removed resulting to the following
293 # namespace: `first-name.last-name.example.com`
294 #
295 # strip_email_domain: true
296
297 # Logtail configuration
298 # Logtail is Tailscales logging and auditing infrastructure, it allows the control panel
299 # to instruct tailscale nodes to log their activity to a remote server.
300 logtail:
301 # Enable logtail for this headscales clients.
302 # As there is currently no support for overriding the log server in headscale, this is
303 # disabled by default. Enabling this will make your clients send logs to Tailscale Inc.
304 enabled: false
305
306 # Enabling this option makes devices prefer a random port for WireGuard traffic over the
307 # default static port 41641. This option is intended as a workaround for some buggy
308 # firewall devices. See https://tailscale.com/kb/1181/firewalls/ for more information.
309 randomize_client_port: true