mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-30 05:25:35 +00:00
e8bb5d1be5
Adds a new reconciler that reconciles ExternalName Services that define a tailnet target that should be exposed to cluster workloads on a ProxyGroup's proxies. The reconciler ensures that for each such service, the config mounted to the proxies is updated with the tailnet target definition and that and EndpointSlice and ClusterIP Service are created for the service. Adds a new reconciler that ensures that as proxy Pods become ready to route traffic to a tailnet target, the EndpointSlice for the target is updated with the Pods' endpoints. Updates tailscale/tailscale#13406 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
# Copyright (c) Tailscale Inc & AUTHORS
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: operator
|
|
namespace: {{ .Release.Namespace }}
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: tailscale-operator
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["events", "services", "services/status"]
|
|
verbs: ["create","delete","deletecollection","get","list","patch","update","watch"]
|
|
- apiGroups: ["networking.k8s.io"]
|
|
resources: ["ingresses", "ingresses/status"]
|
|
verbs: ["create","delete","deletecollection","get","list","patch","update","watch"]
|
|
- apiGroups: ["networking.k8s.io"]
|
|
resources: ["ingressclasses"]
|
|
verbs: ["get", "list", "watch"]
|
|
- apiGroups: ["tailscale.com"]
|
|
resources: ["connectors", "connectors/status", "proxyclasses", "proxyclasses/status", "proxygroups", "proxygroups/status"]
|
|
verbs: ["get", "list", "watch", "update"]
|
|
- apiGroups: ["tailscale.com"]
|
|
resources: ["dnsconfigs", "dnsconfigs/status"]
|
|
verbs: ["get", "list", "watch", "update"]
|
|
- apiGroups: ["tailscale.com"]
|
|
resources: ["recorders", "recorders/status"]
|
|
verbs: ["get", "list", "watch", "update"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: tailscale-operator
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: operator
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: tailscale-operator
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: operator
|
|
namespace: {{ .Release.Namespace }}
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets", "serviceaccounts", "configmaps"]
|
|
verbs: ["create","delete","deletecollection","get","list","patch","update","watch"]
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: ["get","list","watch"]
|
|
- apiGroups: ["apps"]
|
|
resources: ["statefulsets", "deployments"]
|
|
verbs: ["create","delete","deletecollection","get","list","patch","update","watch"]
|
|
- apiGroups: ["discovery.k8s.io"]
|
|
resources: ["endpointslices"]
|
|
verbs: ["get", "list", "watch", "create", "update", "deletecollection"]
|
|
- apiGroups: ["rbac.authorization.k8s.io"]
|
|
resources: ["roles", "rolebindings"]
|
|
verbs: ["get", "create", "patch", "update", "list", "watch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: operator
|
|
namespace: {{ .Release.Namespace }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: operator
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
kind: Role
|
|
name: operator
|
|
apiGroup: rbac.authorization.k8s.io
|