2023-02-03 14:47:52 -08:00
|
|
|
# Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2025-07-09 09:21:56 +01:00
|
|
|
# If old setting used, enable both old (operator) and new (ProxyGroup) workflows.
|
|
|
|
# If new setting used, enable only new workflow.
|
|
|
|
{{ if or (eq .Values.apiServerProxyConfig.mode "true")
|
|
|
|
(eq .Values.apiServerProxyConfig.allowImpersonation "true") }}
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: kube-apiserver-auth-proxy
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
---
|
2023-02-03 14:47:52 -08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: tailscale-auth-proxy
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
2023-03-13 08:48:09 -07:00
|
|
|
resources: ["users", "groups"]
|
2023-02-03 14:47:52 -08:00
|
|
|
verbs: ["impersonate"]
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: tailscale-auth-proxy
|
|
|
|
subjects:
|
2025-07-09 09:21:56 +01:00
|
|
|
{{- if eq .Values.apiServerProxyConfig.mode "true" }}
|
2023-02-03 14:47:52 -08:00
|
|
|
- kind: ServiceAccount
|
|
|
|
name: operator
|
2023-10-30 18:18:09 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2025-07-09 09:21:56 +01:00
|
|
|
{{- end }}
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: kube-apiserver-auth-proxy
|
|
|
|
namespace: {{ .Release.Namespace }}
|
2023-02-03 14:47:52 -08:00
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: tailscale-auth-proxy
|
2023-10-30 18:18:09 +00:00
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
{{ end }}
|