Skip to content

Commit

Permalink
ts-sub-router: Use the new officially provide images
Browse files Browse the repository at this point in the history
Tailscale provides a default set that includes the subnet router.
  • Loading branch information
gtaylor committed Jul 11, 2022
1 parent a208bf3 commit 10b31df
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 27 deletions.
4 changes: 2 additions & 2 deletions charts/tailscale-subnet-router/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: tailscale-subnet-router
description: Deploy a Tailscale subnet router on Kubernetes
type: application
version: 1.0.2
appVersion: "v1.20"
version: 1.1.0
appVersion: "v1.26.2"
home: https://github.com/gtaylor/helm-charts/charts/tailscale-subnet-router
sources:
- https://github.com/gtaylor/helm-charts/charts/tailscale-subnet-router
Expand Down
15 changes: 4 additions & 11 deletions charts/tailscale-subnet-router/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tailscale-subnet-router

![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.20](https://img.shields.io/badge/AppVersion-v1.20-informational?style=flat-square)
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.26.2](https://img.shields.io/badge/AppVersion-1.26.2-informational?style=flat-square)

Deploy a Tailscale subnet router on Kubernetes

Expand All @@ -10,7 +10,7 @@ Deploy a Tailscale subnet router on Kubernetes

| Name | Email | Url |
| ---- | ------ | --- |
| Greg Taylor | [email protected] | https://gc-taylor.com |
| Greg Taylor | <[email protected]> | <https://gc-taylor.com> |

## Source Code

Expand All @@ -23,8 +23,7 @@ Before installing this Chart, you'll need the following:
1. A Tailscale account.
2. A reusable [auth key](https://tailscale.com/kb/1085/auth-keys/).
3. A Kubernetes Secret in the Namespace that you'll installing this Chart in.
4. Your own Docker image built from the Dockerfile found [here](https://github.com/tailscale/tailscale/tree/main/docs/k8s).
5. It's probably worth briefly reading the upstream [Subnet + Kubernetes](https://github.com/tailscale/tailscale/tree/main/docs/k8s#subnet-router) instructions from which this Chart was based on.
4. It's probably worth briefly reading the upstream [Subnet + Kubernetes](https://github.com/tailscale/tailscale/tree/main/docs/k8s#subnet-router) instructions from which this Chart was based on.

## A note on secrets

Expand All @@ -34,10 +33,6 @@ Whether you manually create it or sync it in via other means (Vault, Sealed Secr

Unless overridden, the Chart will assume that you have a Secret named `tailscale-subnet-router-secrets` whose `AUTH_KEY` key contains your router's Tailscale auth key.

## A note on Docker images

Due to the sensitivity of this component, no Docker image is referenced or provided. We recommend building the upstream Dockerfile found [here](https://github.com/tailscale/tailscale/tree/main/docs/k8s) and pushing it somewhere. **Make sure to set the `image.repository` value accordingly.**

## Installing the Chart

To install the chart with the release name `my-release`:
Expand Down Expand Up @@ -71,7 +66,7 @@ The command removes all the Kubernetes components associated with the chart and
| affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) for pod assignment |
| fullnameOverride | string | `""` | Optional override for app fullname |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `nil` | **Build your own image and override this!** |
| image.repository | string | `"ghcr.io/tailscale/tailscale:latest"` | **Build your own image and override this!** |
| image.tag | string | `"latest"` | |
| imagePullSecrets | list | `[]` | List the secrets containing the Docker creds for images in this Chart |
| nameOverride | string | `""` | Optional override for app name |
Expand All @@ -91,5 +86,3 @@ The command removes all the Kubernetes components associated with the chart and
| volumeMounts | list | `[]` | Additional volumes to add to mount to the primary container |
| volumes | list | `[]` | Additional volumes to add to the pod |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.7.0](https://github.com/norwoodj/helm-docs/releases/v1.7.0)
7 changes: 1 addition & 6 deletions charts/tailscale-subnet-router/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Before installing this Chart, you'll need the following:
1. A Tailscale account.
2. A reusable [auth key](https://tailscale.com/kb/1085/auth-keys/).
3. A Kubernetes Secret in the Namespace that you'll installing this Chart in.
4. Your own Docker image built from the Dockerfile found [here](https://github.com/tailscale/tailscale/tree/main/docs/k8s).
5. It's probably worth briefly reading the upstream [Subnet + Kubernetes](https://github.com/tailscale/tailscale/tree/main/docs/k8s#subnet-router) instructions from which this Chart was based on.
4. It's probably worth briefly reading the upstream [Subnet + Kubernetes](https://github.com/tailscale/tailscale/tree/main/docs/k8s#subnet-router) instructions from which this Chart was based on.

## A note on secrets

Expand All @@ -29,10 +28,6 @@ Whether you manually create it or sync it in via other means (Vault, Sealed Secr

Unless overridden, the Chart will assume that you have a Secret named `tailscale-subnet-router-secrets` whose `AUTH_KEY` key contains your router's Tailscale auth key.

## A note on Docker images

Due to the sensitivity of this component, no Docker image is referenced or provided. We recommend building the upstream Dockerfile found [here](https://github.com/tailscale/tailscale/tree/main/docs/k8s) and pushing it somewhere. **Make sure to set the `image.repository` value accordingly.**

## Installing the Chart

To install the chart with the release name `my-release`:
Expand Down
10 changes: 5 additions & 5 deletions charts/tailscale-subnet-router/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ required "A valid .Values.image.repository entry required!" .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: KUBE_SECRET
- name: TS_KUBE_SECRET
value: {{ .Values.tailscale.state.secretName }}
- name: USERSPACE
- name: TS_USERSPACE
value: "true"
- name: AUTH_KEY
- name: TS_AUTH_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.tailscale.auth.secretName }}
key: {{ .Values.tailscale.auth.secretKey }}
- name: ROUTES
- name: TS_ROUTES
value: {{ join "," .Values.tailscale.routes|quote }}
{{- with .Values.resources }}
resources: {{ toYaml . | nindent 16 }}
Expand Down
7 changes: 4 additions & 3 deletions charts/tailscale-subnet-router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ replicas: 1

image:
# -- **Build your own image and override this!**
repository:
pullPolicy: Always
tag: latest
repository: ghcr.io/tailscale/tailscale
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""

# -- List the secrets containing the Docker creds for images in this Chart
imagePullSecrets: []
Expand Down

0 comments on commit 10b31df

Please sign in to comment.