Merge pull request #16311 from travisn/csi-op-scc

security: Configure sccs for the ceph-csi operator
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-08-18 08:22:08 -06:00
commit 7e92d2fb03
2 files changed
+19 -2

No files matched your search

@@ -41,7 +41,7 @@ users:
- system:serviceaccount:{{ .Release.Namespace }}:rook-ceph-default
- system:serviceaccount:{{ .Release.Namespace }}:rook-ceph-mgr
- system:serviceaccount:{{ .Release.Namespace }}:rook-ceph-osd
- system:serviceaccount:{{ .Release.Namespace }}:rook-ceph-rgw
- system:serviceaccount:{{ .Release.Namespace }}:rook-ceph-rgw
---
# scc for the CSI driver
kind: SecurityContextConstraints
@@ -80,12 +80,21 @@ volumes:
- hostPath
- projected
users:
# A user needs to be added for each rook service account.
# A user needs to be added for each csi service account.
{{- if .Values.csi.rookUseCsiOperator }}
- system:serviceaccount:{{ .Release.Namespace }}:ceph-csi-cephfs-ctrlplugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:ceph-csi-cephfs-nodeplugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:ceph-csi-nfs-ctrlplugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:ceph-csi-nfs-nodeplugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:ceph-csi-rbd-ctrlplugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:ceph-csi-rbd-nodeplugin-sa
{{- else }}
- system:serviceaccount:{{ .Release.Namespace }}:rook-csi-rbd-plugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:rook-csi-rbd-provisioner-sa
- system:serviceaccount:{{ .Release.Namespace }}:rook-csi-cephfs-plugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:rook-csi-cephfs-provisioner-sa
- system:serviceaccount:{{ .Release.Namespace }}:rook-csi-nfs-plugin-sa
- system:serviceaccount:{{ .Release.Namespace }}:rook-csi-nfs-provisioner-sa
{{- end }}
---
{{- end }}
+8
View File
@@ -90,12 +90,20 @@ users:
# A user needs to be added for each rook service account.
# This assumes running in the default sample "rook-ceph" namespace.
# If other namespaces or service accounts are configured, they need to be updated here.
# Service accounts for the cephcsi driver (pre-cephcsi operator)
- system:serviceaccount:rook-ceph:rook-csi-rbd-plugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:rook-csi-rbd-provisioner-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:rook-csi-cephfs-plugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:rook-csi-cephfs-provisioner-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:rook-csi-nfs-plugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:rook-csi-nfs-provisioner-sa # serviceaccount:namespace:operator
# Service accounts for the csi operator
- system:serviceaccount:rook-ceph:ceph-csi-cephfs-ctrlplugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:ceph-csi-cephfs-nodeplugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:ceph-csi-nfs-ctrlplugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:ceph-csi-nfs-nodeplugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:ceph-csi-rbd-ctrlplugin-sa # serviceaccount:namespace:operator
- system:serviceaccount:rook-ceph:ceph-csi-rbd-nodeplugin-sa # serviceaccount:namespace:operator
---
# Rook Ceph Operator Config
# Use this ConfigMap to override operator configurations