headscale

by serge.logvinov

Helm chartv0.1.5App v0.29.8Verified publisher

A Helm chart

About this chart

headscale

A Helm chart

Generate a private key for headscale:

headscale generate private-key

List of registered users/nodes:

headscale users list
headscale nodes list

Homepage: https://github.com/sergelogvinov/helm-charts

Maintainers

NameEmailUrl
sergelogvinovhttps://github.com/sergelogvinov

Source Code

Values

KeyTypeDefaultDescription
replicaCountint1
image.repositorystring"ghcr.io/juanfont/headscale"
image.pullPolicystring"IfNotPresent"
image.tagstring""
imagePullSecretslist[]This is for the secrets for pulling an image from a private repository ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
nameOverridestring""
fullnameOverridestring""
headscale.secrets.noisestring""
headscale.secrets.derpstring""
headscale.oidcobject{}OpenID Connect ref: https://headscale.net/stable/ref/oidc/
headscale.derp.urls[0]string"https://controlplane.tailscale.com/derpmap/default"
headscale.derp.regionsobject{}
headscale.policystring""Headscale policy ref: https://headscale.net/stable/ref/policy/
headscale.dnsobject{"base_domain":"tailscale.cluster.local","extra_records":[],"magic_dns":false,"nameservers":{"global":[],"split":{}},"override_local_dns":false,"search_domains":[]}MagicDNS ref: https://headscale.net/stable/ref/dns/
headscale.dns.search_domainslist[]Set custom DNS search domains
headscale.dns.extra_recordslist[]Extra DNS records
serviceAccount.createbooltrue
serviceAccount.automountbooltrue
serviceAccount.annotationsobject{}
serviceAccount.namestring""
podAnnotationsobject{}Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podLabelsobject{}This is for setting Kubernetes Labels to a Pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podSecurityContextobject{"fsGroup":65532,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65532,"runAsUser":0}Pod Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
securityContextobject{"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":65532}Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
serviceobject{"ipFamilies":["IPv4"],"port":{"grpc":50443,"http":80,"metrics":9090},"type":"ClusterIP"}Service parameters ref: https://kubernetes.io/docs/user-guide/services/
derpobject{"affinity":{},"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/sergelogvinov/tailscale","tag":"1.102.5-derp"},"nodeSelector":{},"ports":{"https":443,"stun":3478},"resources":{},"tls":{"host":"chart-example.local","secretName":"chart-example-tls"},"tolerations":[]}ref: https://headscale.net/stable/ref/derp/
derp.resourcesobject{}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
derp.nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
derp.tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
derp.affinityobject{}Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
ingressobject{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":["/"]}],"tls":[]}Headscale ingress parameters ref: http://kubernetes.io/docs/user-guide/ingress/
resourcesobject{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
networkPolicyobject{"enabled":false}Network policy
persistenceobject{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"1Gi"}Persistence parameters ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
priorityClassNamestring""Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
updateStrategyobject{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}pod deployment update strategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment
nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
affinityobject{}Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity

Deploy headscale with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has headscale on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartheadscale is pinned at v0.1.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply