diff --git a/README.md b/README.md new file mode 100644 index 0000000..467471e --- /dev/null +++ b/README.md @@ -0,0 +1,54 @@ +# tailscale-derp + +Helm chart and container image for running [tailscale DERP](https://tailscale.com/kb/1232/derp-servers) servers. + +Tailscale offers [documentation for running custom DERP servers](https://tailscale.com/kb/1118/custom-derp-servers). + +The helm chart is availble in [`./chart/tailscale-derp`](./chart/tailscale-derp) and it's supporting container image can be found in [`Docker`](./Docker). + +The container image follows tailscale's upstream version. + +## Getting Started + +## TL;DR + +```console +helm install tailscale-derp oci://ghcr.io/coreweave/tailscale-derp/chart +``` + +## Installing the Chart + +To install the chart with the release name `tailscale-derp` + +```console +helm install tailscale-derp oci://ghcr.io/coreweave/tailscale-derp/chart +``` + +## Uninstalling the Chart + +To uninstall the `tailscale-derp` deployment + +```console +helm uninstall tailscale-derp +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +Read through the [values.yaml](./chart/tailscale-derp/values.yaml) file. It has several commented out suggested values. +`DERP_*` enviroment variables are arguments passed down to the `derper` [binary](https://tailscale.com/kb/1118/custom-derp-servers#step-1-starting-your-own-derp-server). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install tailscale-derp \ + --set derpServerHostname="your-hostname.com" \ + oci://ghcr.io/coreweave/tailscale-derp/chart +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install tailscale-derp oci://ghcr.io/coreweave/tailscale-derp/chart -f values.yaml +``` diff --git a/chart/tailscale-derp/README.md b/chart/tailscale-derp/README.md new file mode 100644 index 0000000..fdadfc7 --- /dev/null +++ b/chart/tailscale-derp/README.md @@ -0,0 +1,72 @@ +# tailscale-derp + +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.68.0](https://img.shields.io/badge/AppVersion-v1.68.0-informational?style=flat-square) + +Run a custom tailscale derp server on Kubernetes. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| deploymentAnnotations | object | `{}` | | +| derpServerHostname | string | `"derp.foo.bar"` | | +| env[0].name | string | `"GOMAXPROCS"` | | +| env[0].valueFrom.resourceFieldRef.resource | string | `"limits.cpu"` | | +| env[1].name | string | `"GOMEMLIMIT"` | | +| env[1].valueFrom.resourceFieldRef.resource | string | `"limits.memory"` | | +| env[2].name | string | `"DERP_HOSTNAME"` | | +| env[2].value | string | `"{{ include \"tailscale-derp.hostname\" . }}"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"ghcr.io/coreweave/tailscale-derp"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| livenessProbe.exec.command[0] | string | `"/bin/bash"` | | +| livenessProbe.exec.command[1] | string | `"-c"` | | +| livenessProbe.exec.command[2] | string | `"/app/healthprobe.sh"` | | +| livenessProbe.initialDelaySeconds | int | `300` | | +| livenessProbe.timeoutSeconds | int | `60` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.exec.command[0] | string | `"/bin/bash"` | | +| readinessProbe.exec.command[1] | string | `"-c"` | | +| readinessProbe.exec.command[2] | string | `"/app/healthprobe.sh"` | | +| readinessProbe.initialDelaySeconds | int | `300` | | +| readinessProbe.timeoutSeconds | int | `60` | | +| replicaCount | int | `1` | | +| resources.limits.cpu | string | `"2000m"` | | +| resources.limits.memory | string | `"2Gi"` | | +| resources.requests.cpu | string | `"100m"` | | +| resources.requests.memory | string | `"2Gi"` | | +| securityContext | object | `{}` | | +| service.annotations."externaldns.alpha.kubernetes.io/hostname" | string | `"{{ include \"tailscale-derp.hostname\" . }}"` | | +| service.directAttach.annotations | object | `{}` | | +| service.directAttach.enabled | bool | `false` | | +| service.enabled | bool | `false` | | +| service.externalTrafficPolicy | string | `"Local"` | | +| service.internalTrafficPolicy | string | `"Cluster"` | | +| service.ports[0].name | string | `"http"` | | +| service.ports[0].port | int | `80` | | +| service.ports[0].targetPort | int | `80` | | +| service.ports[1].name | string | `"https"` | | +| service.ports[1].port | int | `443` | | +| service.ports[1].targetPort | int | `443` | | +| service.ports[2].name | string | `"stun"` | | +| service.ports[2].port | int | `3478` | | +| service.ports[2].targetPort | int | `3478` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `false` | | +| serviceAccount.create | bool | `false` | | +| serviceAccount.name | string | `""` | | +| tls | object | `{}` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/derpmap/derpmap.json b/derpmap/derpmap.json new file mode 100644 index 0000000..c36f2e1 --- /dev/null +++ b/derpmap/derpmap.json @@ -0,0 +1,70 @@ +{ + "Regions": { + "900": { + "RegionID": 900, + "RegionCode": "rno2", + "Nodes": [ + { + "Name": "1", + "RegionID": 900, + "HostName": "derp.rno2.coreweave.com" + } + ] + }, + "901": { + "RegionID": 901, + "RegionCode": "rdu1", + "Nodes": [ + { + "Name": "1", + "RegionID": 901, + "HostName": "derp.rdu1.coreweave.com" + } + ] + }, + "902": { + "RegionID": 902, + "RegionCode": "us-east-02", + "Nodes": [ + { + "Name": "1", + "RegionID": 901, + "HostName": "derp.us-east-02.coreweave.com" + } + ] + }, + "903": { + "RegionID": 903, + "RegionCode": "us-east-03", + "Nodes": [ + { + "Name": "1", + "RegionID": 903, + "HostName": "derp.us-east-03.coreweave.com" + } + ] + }, + "904": { + "RegionID": 904, + "RegionCode": "us-east-04", + "Nodes": [ + { + "Name": "1", + "RegionID": 904, + "HostName": "derp.us-east-04.coreweave.com" + } + ] + }, + "905": { + "RegionID": 905, + "RegionCode": "us-west-03", + "Nodes": [ + { + "Name": "1", + "RegionID": 905, + "HostName": "derp.us-west-03.coreweave.com" + } + ] + } + } +}