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