比较提交

..
修改 6 个文件,包含 97 行新增35 行删除
+5 -2
查看文件
@@ -1,5 +1,8 @@
helm charts ## helm charts
```shell
helm repo add devcm https://devcm-repo.github.io/helm-charts helm repo add devcm https://devcm-repo.github.io/helm-charts
```
pgedge ### charts
- tailscale-derp
+4 -4
查看文件
@@ -1,13 +1,13 @@
apiVersion: v2 apiVersion: v2
name: tailscale-derp name: tailscale-derp
description: Tailscale DERP Relay Server Helm Chart description: Tailscale DERP Relay Server Helm Chart
home: https://github.com/sspreitzer/helm-tailscale/tree/main/charts/tailscale-derp home: https://devcm-repo.github.io/helm-charts/
sources: sources:
- https://github.com/sspreitzer/helm-tailscale.git - https://github.com/devcm-repo/helm-charts
maintainers: maintainers:
- name: dev.cm - name: dev.cm
email: [email protected] email: [email protected]
url: https://github.com/devcm-repo url: https://github.com/devcm-repo
icon: https://tailscale.com/files/apple-touch-icon.png icon: https://tailscale.com/files/apple-touch-icon.png
version: 1.44.0 version: 0.0.3
appVersion: 1.44.0 appVersion: 1.68.0
+12 -9
查看文件
@@ -5,7 +5,7 @@ This Helm Chart is a Tailscale container deployment for a tailnet relay server (
## Installing the Helm Chart ## Installing the Helm Chart
```shell ```shell
helm repo add tailscale https://spreitzer.ch/helm-tailscale helm repo add tailscale https://devcm-repo.github.io/helm-charts
helm install tailscale-derp tailscale/tailscale-derp helm install tailscale-derp tailscale/tailscale-derp
``` ```
@@ -14,15 +14,10 @@ helm install tailscale-derp tailscale/tailscale-derp
A working configuration: A working configuration:
```yaml ```yaml
service: hostname: derp.dev.cm
annotations:
service.beta.kubernetes.io/azure-dns-label-name: my-derp-01
hostname: my-derp-01.switzerlandnorth.cloudapp.azure.com
nodeSelector: nodeSelector:
topology.kubernetes.io/region: switzerlandnorth topology.kubernetes.io/region: cn-hk
topology.kubernetes.io/zone: switzerlandnorth-1
``` ```
## Helm Chart Values ## Helm Chart Values
@@ -33,6 +28,14 @@ nodeSelector:
| `image.pullPolicy` | Kubernetes pullPolicy to use for starting the container image. | `IfNotPresent` | | `image.pullPolicy` | Kubernetes pullPolicy to use for starting the container image. | `IfNotPresent` |
| `service.type` | Kubernetes Service type. | `LoadBalancer` | | `service.type` | Kubernetes Service type. | `LoadBalancer` |
| `service.annotations` | A map/dict of Kubernetes Service annotations. | `{}` | | `service.annotations` | A map/dict of Kubernetes Service annotations. | `{}` |
| `hostname` | DERP hostname to use. Must be the same as of the derpMap in the tailnet ACL. | `derp.example.com` | | `hostNetwork` | This service will be disabled when hostNetwork is enableds. | `false` |
| `nodeSelector` | A map/dict of Kubernetes Pod nodeSelector node labels. | `{}` | | `nodeSelector` | A map/dict of Kubernetes Pod nodeSelector node labels. | `{}` |
| `extraVolumes` | Extra volumes to add to the deployment. | `[]` |
| `extraVolumeMounts` | Extra volume mounts to add to the container. Normally used with `extraVolumes`. | `[]` |
| `affinity` | A map/dict of Kubernetes Pod affinity rules. | `{}` | | `affinity` | A map/dict of Kubernetes Pod affinity rules. | `{}` |
| `derp.hostname` | Derp server hostname. | `'derp.examples.com'` |
| `derp.verify_clients` | Derp server will enable authentication. | `true` |
| `derp.certdir` | Start a derper with your own certificate. | `` |
| `derp.http_port` | The port on which to serve HTTP. Set to -1 to disable. | `80` |
| `derp.https_port` | The port on which to serve HTTPS. | `443` |
| `derp.stun_port` | The UDP port on which to serve STUN. | `3478` |
+51 -8
查看文件
@@ -21,11 +21,54 @@ spec:
affinity: {{- toYaml .Values.affinity | nindent 8 }} affinity: {{- toYaml .Values.affinity | nindent 8 }}
{{- end }} {{- end }}
containers: containers:
- name: "{{ .Release.Name }}-{{ .Chart.Name }}" - name: "{{ .Release.Name }}-{{ .Chart.Name }}"
image: "{{ .Values.image.name }}:v{{ .Chart.AppVersion }}" image: "{{ .Values.image.name }}:v{{ .Chart.AppVersion }}"
ports: ports:
- containerPort: 80 {{- if gt (int .Values.derp.http_port) -1 }}
- containerPort: 443 - name: http
- containerPort: 3478 hostPort: {{ .Values.derp.http_port }}
args: containerPort: {{ .Values.derp.http_port }}
- "--hostname={{ .Values.hostname }}" protocol: TCP
{{- end }}
- name: https
hostPort: {{ .Values.derp.https_port }}
containerPort: {{ .Values.derp.https_port }}
protocol: TCP
- name: stun
hostPort: {{ .Values.derp.stun_port }}
containerPort: {{ .Values.derp.stun_port }}
protocol: UDP
args:
- "--hostname={{ .Values.derp.hostname }}"
- "--verify-clients={{ .Values.derp.verify_clients }}"
{{- if .Values.derp.certdir }}
- "--certmode=manual"
- "--certdir={{ .Values.derp.certdir }}"
{{- end }}
{{- if .Values.derp.http_port }}
- "--http-port={{ .Values.derp.http_port }}"
{{- end }}
{{- if .Values.derp.https_port }}
- "--a=:{{ .Values.derp.https_port }}"
{{- end }}
{{- if .Values.derp.stun_port }}
- "--stun-port={{ .Values.derp.stun_port }}"
{{- end }}
volumeMounts:
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- if .Values.derp.verify_clients }}
- mountPath: /var/run/tailscale/tailscaled.sock
name: tailscale-socket
{{- end }}
{{- if .Values.hostNetwork }}
hostNetwork: true
{{- end }}
volumes:
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- if .Values.derp.verify_clients }}
- hostPath:
path: /run/tailscale/tailscaled.sock
type: Socket
name: tailscale-socket
{{- end }}
+14 -9
查看文件
@@ -1,3 +1,4 @@
{{- if not .Values.hostNetwork }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -10,12 +11,16 @@ spec:
selector: selector:
app: "{{ .Release.Name }}-{{ .Chart.Name }}" app: "{{ .Release.Name }}-{{ .Chart.Name }}"
ports: ports:
- name: http {{- if gt (int .Values.derp.http_port) -1 }}
port: 80 - name: http
targetPort: 80 port: {{ .Values.derp.http_port }}
- name: https targetPort: {{ .Values.derp.http_port }}
port: 443 {{- end }}
targetPort: 443 - name: https
- name: stun port: {{ .Values.derp.https_port }}
port: 3478 targetPort: {{ .Values.derp.https_port }}
targetPort: 3478 - name: stun
port: {{ .Values.derp.stun_port }}
targetPort: {{ .Values.derp.stun_port }}
protocol: UDP
{{- end }}
+11 -3
查看文件
@@ -1,12 +1,20 @@
image: image:
name: docker.io/sspreitzer/tailscale-derp name: docker.io/devcm/tailscale-derp
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
service: service:
type: LoadBalancer type: ClusterIP
annotations: {} annotations: {}
hostname: 'derp.example.com' hostNetwork: false
nodeSelector: {} nodeSelector: {}
affinity: {} affinity: {}
derp:
hostname: derp.examples.com
verify_clients: false
http_port: 80
https_port: 443
stun_port: 3478