2023-02-03 22:47:52 +00:00
|
|
|
# Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2023-10-30 18:18:09 +00:00
|
|
|
{{ if eq .Values.apiServerProxyConfig.mode "true" }}
|
2023-02-03 22:47:52 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
name: tailscale-auth-proxy
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
2023-03-13 15:48:09 +00:00
|
|
|
resources: ["users", "groups"]
|
2023-02-03 22:47:52 +00:00
|
|
|
verbs: ["impersonate"]
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: tailscale-auth-proxy
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: operator
|
2023-10-30 18:18:09 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2023-02-03 22:47:52 +00:00
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: tailscale-auth-proxy
|
2023-10-30 18:18:09 +00:00
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
{{ end }}
|