Skip to content

Commit

Permalink
Add beta for headscale
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-sanders committed Jul 23, 2023
1 parent 2a03a32 commit ac1517c
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/headscale/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: replicated-library
repository: https://replicatedhq.github.io/helm-charts
version: 0.13.7
digest: sha256:04bbecac57159b26db8a6e677f6a226408592c52b78210fbb1ac85982f40ed61
generated: "2023-07-22T12:07:47.139232276-05:00"
11 changes: 11 additions & 0 deletions charts/headscale/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v2
appVersion: 1
name: headscale
version: 0.0.1-beta.1
description: headscale open source tailscale implementation
dependencies:
- name: replicated-library
#repository: file://../../../helm-charts-library/charts/replicated-library
repository: https://replicatedhq.github.io/helm-charts
version: '^0.13.7'
kubeVersion: '>=1.25.0-0'
22 changes: 22 additions & 0 deletions charts/headscale/templates/replicated-library.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{/* Make sure all variables are set properly */}}
{{- include "replicated-library.values.setup" . }}

{{- define "hardcodedValues" -}}
apps:
headscale:
containers:
headscale:
image:
repository: {{ .Values.image.repository }}
tag: {{ .Values.image.tag }}

configmaps:
headscale:
data:
{{- $headscaleConfig := .Values.headscale.config | toYaml | trim }}
etc: |
{{ $headscaleConfig | indent 8 }}
{{ end }}
{{ $_ := mergeOverwrite .Values (include "hardcodedValues" . | fromYaml) }}

{{ include "replicated-library.all" . }}
88 changes: 88 additions & 0 deletions charts/headscale/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
global:
fullNameOverride: "net1"
apps:
headscale:
enabled: true
type: statefulset
containers:
headscale:
command:
- headscale
args:
- serve
volumeMounts:
- name: data
mountPath: /vol/data
- name: config
mountPath: /etc/headscale/config.yaml
subPath: etc
readOnly: true
volumes:
- name: data
persistentVolumeClaim:
claimName: data
- name: config
configMap:
name: net1-headscale

services:
headscale:
enabled: true
appName: ["headscale"]
ports:
http:
enabled: true
port: 8080
protocol: HTTP
targetPort: 8080
grpc:
enabled: true
port: 50443
protocol: TCP
targetPort: 50443
derp:
enabled: true
port: 3478
protocol: UDP
targetPort: 3478

persistence:
data:
enabled: true
type: persistentVolumeClaim
persistentVolumeClaim:
#existingClaimName: existing-claim-name
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
persistentvolumeReclaimPolicy: Retain
resources:
requests:
storage: 1Gi

configmaps:
headscale:
enabled: true

# Setting at the top level for convenience
image:
repository: ghcr.io/juanfont/headscale
tag: 0.22.3

# headscale config
headscale:
# See https://github.com/replicatedhq/helm-charts/blob/main/charts/replicated-library/values-example.yaml
config:
server_url: http://127.0.0.1:8080
listen_addr: 0.0.0.0:8080
grpc_listen_addr: 0.0.0.0:50443
grpc_allow_insecure: true
private_key_path: /vol/data/private.key
noise:
private_key_path: /vol/data/noise_private.key
ip_prefixes:
- fd7a:115c:a1e0::/48
- 100.64.0.0/10
db_type: sqlite3
db_path: /vol/data/db.sqlite

0 comments on commit ac1517c

Please sign in to comment.