apiVersion: v1
kind: ServiceAccount
metadata:
  name: wgtsbridge
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: wgtsbridge
rules:
- apiGroups: [""]
  resources: ["secrets"]
  verbs: ["create"]
- apiGroups: [""]
  resourceNames: ["tsstate"]
  resources: ["secrets"]
  verbs: ["get", "update", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: wgtsbridge
subjects:
- kind: ServiceAccount
  name: wgtsbridge
roleRef:
  kind: Role
  name: wgtsbridge
  apiGroup: rbac.authorization.k8s.io