connector
by kfirfer
Twingate Connector helm chart
About this chart
Twingate Connector Helm Chart
Twingate is remote access for the modern world.
Introduction
This chart bootstraps a Twingate Connector deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.12+
- Helm 2.0+
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add twingate https://twingate.github.io/helm-charts
$ helm upgrade --install my-release twingate/connector -n [namespace] \
--set connector.network=[network] \
--set connector.accessToken=[accessToken] \
--set connector.refreshToken=[refreshToken]
These commands deploy Twingate on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm ls -n [namespace]
Using an Existing Secret for Access/Refresh Tokens
Rather than passing in connector.accessToken and connector.refreshToken, you may provide the name of an existing secret that contains those values via connector.existingSecret.
Example secret:
apiVersion: v1
kind: Secret
metadata:
name: my-secret
type: Opaque
data:
TWINGATE_ACCESS_TOKEN: "your access token base64 encoded"
TWINGATE_REFRESH_TOKEN: "your refresh token base64 encoded"
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm del my-release -n [namespace]
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
The following table lists the configurable parameters of the Twingate chart and their default values.
| Parameter | Description | Default |
|---|---|---|
connector.network | The Twingate network name, eg. acme (required) | |
connector.url | The Twingate service domain | twingate.com |
connector.accessToken | Access Token (required unless connector.existingSecret is specified) | |
connector.refreshToken | Refresh Token (required unless connector.existingSecret is specified) | |
connector.existingSecret | The name of an existing secret to use for the access and refresh tokens | |
connector.logLevel | Log Level - supported : [error, warning, info, debug] | error |
connector.logAnalytics | Real-time connection logs (see https://www.twingate.com/docs/connector-real-time-logs) - supported : [v1, v2] | |
connector.dnsServer | Custom DNS server | |
image.registry | Twingate image registry | docker.io |
image.repository | Twingate image name | twingate/connector |
image.tag | Twingate image tag | latest |
image.pullPolicy | Twingate image pull policy | Always |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
nameOverride | String to partially override twingate.fullname template | nil |
fullnameOverride | String to fully override twingate.fullname template | nil |
icmpSupport.enabled | Enable the ICMP securityContext. See more in values file | false |
affinity | Map of node/pod affinities | {} (The value is evaluated as a template) |
nodeSelector | node labels for pod assignment | {} (The value is evaluated as a template) |
tolerations | Tolerations for pod assignment | [] (The value is evaluated as a template) |
resources | Resource requests and limits | {} (The value is evaluated as a template) |
additionalLabels | Additional labels for the deployment | {} (The value is evaluated as a template) |
podAnnotations | Map of annotations to add to pods | {} |
podDnsPolicy | Optional pod DNS policy | |
podDnsConfig | Optional pod DNS configurations | |
env | Additional environment variables for the deployment | {} (The value is evaluated as a template) |
hostNetwork | Enable/Disable host network for the pod | false (Disabled by default) |
Deploy connector with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has connector 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartconnector is pinned at v0.1.25 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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