Files
my-rook-config/pkg/operator/ceph/csi/secrets_test.go
T
Felix Prasse 8f53522162 csi: update caps to include executable permission
ceph-csi uses an exclusive lock for cryptfs operations. This needs the x capability on the metadata pool.

Fixes #15283

Signed-off-by: Felix Prasse <1330854+flx5@users.noreply.github.com>
2025-04-29 19:48:40 +02:00

44 lines
1.6 KiB
Go

/*
Copyright 2019 The Rook Authors. All rights reserved.
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
http://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.
*/
package csi
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCephCSIKeyringRBDNodeCaps(t *testing.T) {
caps := cephCSIKeyringRBDNodeCaps()
assert.Equal(t, caps, []string{"mon", "profile rbd", "mgr", "allow rw", "osd", "profile rbd"})
}
func TestCephCSIKeyringRBDProvisionerCaps(t *testing.T) {
caps := cephCSIKeyringRBDProvisionerCaps()
assert.Equal(t, caps, []string{"mon", "profile rbd, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "profile rbd"})
}
func TestCephCSIKeyringCephFSNodeCaps(t *testing.T) {
caps := cephCSIKeyringCephFSNodeCaps()
assert.Equal(t, caps, []string{"mon", "allow r", "mgr", "allow rw", "osd", "allow rwx tag cephfs metadata=*, allow rw tag cephfs data=*", "mds", "allow rw"})
}
func TestCephCSIKeyringCephFSProvisionerCaps(t *testing.T) {
caps := cephCSIKeyringCephFSProvisionerCaps()
assert.Equal(t, caps, []string{"mon", "allow r, allow command 'osd blocklist'", "mgr", "allow rw", "osd", "allow rw tag cephfs metadata=*", "mds", "allow *"})
}