deploy/base/controller/controller_setup.yaml (73 lines of code) (raw):

# Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ##### Controller Service Account, Roles, Rolebindings apiVersion: v1 kind: ServiceAccount metadata: name: lustre-csi-controller-sa --- apiVersion: scheduling.k8s.io/v1 kind: PriorityClass metadata: name: csi-lustre-controller value: 900000000 globalDefault: false description: "This priority class should be used for the Lustre CSI driver controller deployment only." --- # xref: https://github.com/kubernetes-csi/external-provisioner/blob/master/deploy/kubernetes/rbac.yaml kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: lustre-csi-provisioner-role rules: - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch", "create", "delete", "patch"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["csinodes"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch"] --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: lustre-csi-provisioner-binding subjects: - kind: ServiceAccount name: lustre-csi-controller-sa roleRef: kind: ClusterRole name: lustre-csi-provisioner-role apiGroup: rbac.authorization.k8s.io --- kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: lustre-csi-leaderelection-role labels: k8s-app: lustre-csi-driver rules: - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create"] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: lustre-csi-leaderelection-binding labels: k8s-app: lustre-csi-driver subjects: - kind: ServiceAccount name: lustre-csi-controller-sa roleRef: kind: Role name: lustre-csi-leaderelection-role apiGroup: rbac.authorization.k8s.io