apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: tailscale-operator
  namespace: flux-system
spec:
  interval: 10m
  targetNamespace: tailscale-system
  chart:
    spec:
      chart: ./infrastructure/charts/tailscale-operator
      sourceRef:
        kind: GitRepository
        name: platform
        namespace: flux-system
  install:
    createNamespace: true
    remediation:
      retries: 3
  upgrade:
    remediation:
      retries: 3
  values:
    installCRDs: true
    apiServerProxyConfig:
      mode: "true"
    operatorConfig:
      defaultTags:
        - tag:k8s
      image:
        repository: ghcr.io/tailscale/k8s-operator
        tag: v1.96.5
        pullPolicy: IfNotPresent
      nodeSelector:
        kubernetes.io/hostname: k8s-cluster-cp-1
      tolerations:
        - key: node-role.kubernetes.io/control-plane
          operator: Exists
          effect: NoSchedule
    proxyConfig:
      defaultTags: tag:k8s
      defaultProxyClass: infra-stable
      image:
        repository: ghcr.io/tailscale/tailscale
        tag: v1.96.5
