Tailscale Operator

Kubernetes operator for Tailscale VPN connectivity

The Tailscale Operator provides secure VPN connectivity for the Infra Management Cluster, enabling operators to access internal services via Tailscale.

ArgoCD Resource

PropertyValue
KindApplication
Nametailscale-operator
Namespacetailscale
Projectinfra-services
Source TypeHelm
File Pathapps/tailscale-operator.yaml

Application Definition

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: tailscale-operator
  labels:
    domain: infra
    managed-by: global-infra-admins
    slack: 'infra-team'
spec:
  syncPolicy:
    automated:
      prune: true
  destination:
    namespace: tailscale
    server: https://kubernetes.default.svc
  project: infra-services
  source:
    chart: tailscale-operator
    repoURL: 'https://pkgs.tailscale.com/helmcharts'
    targetRevision: 1.92.5
    helm:
      valuesObject:
        installCRDs: true
        operatorConfig:
          defaultTags:
            - "tag:k8s-operator"
          image:
            repository: tailscale/k8s-operator
            tag: "v1.92.5"
          hostname: "tailscale-operator-infra-platform"
          resources:
            limits:
              cpu: 250m
              memory: 512Mi
            requests:
              cpu: 250m
              memory: 512Mi
        ingressClass:
          enabled: true
        proxyConfig:
          defaultTags: "tag:k8s"
          firewallMode: auto
        apiServerProxyConfig:
          mode: "true"

Key Configuration

Operator Settings

SettingValuePurpose
defaultTagstag:k8s-operatorACL tag for the operator
hostnametailscale-operator-infra-platformTailscale hostname
installCRDstrueInstall Tailscale CRDs

Proxy Settings

SettingValuePurpose
proxyConfig.defaultTagstag:k8sACL tag for proxies
firewallModeautoAutomatic firewall configuration
apiServerProxyConfig.modetrueEnable API server proxy

Ingress Class

The operator creates a Tailscale IngressClass, enabling services to be exposed via Tailscale.

How to Update

Upgrading the Operator

  1. Update targetRevision in apps/tailscale-operator.yaml
  2. Update operatorConfig.image.tag to match
  3. Review the Tailscale changelog
  4. Commit and push to main

Modifying Configuration

  1. Edit the valuesObject in apps/tailscale-operator.yaml
  2. Commit and push to main

OAuth Credentials

The operator requires OAuth credentials stored in a Secret named operator-oauth. This Secret must contain:

  • client_id: Tailscale OAuth client ID
  • client_secret: Tailscale OAuth client secret

The Secret is managed separately (not in this Application).

ResourcePurpose
operator-oauth SecretOAuth credentials for Tailscale
Tailscale CRDsCustom resources for Tailscale configuration
IngressClass tailscaleEnables Tailscale-based ingress

Tailscale ACL Requirements

The Tailscale ACL must grant the operator ownership of the configured tags:

{
  "tagOwners": {
    "tag:k8s-operator": ["autogroup:admin"],
    "tag:k8s": ["tag:k8s-operator"]
  }
}